Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/MultiSas/llms.txt

Use this file to discover all available pages before exploring further.

The sublimation module covers every stage of a print shop’s operational cycle. From the moment a client places an order (Pedido) through production tracking and final sale generation, this module provides structured data models and REST endpoints to manage clients, suppliers, production jobs, employees, and invoicing — all scoped to a single company tenant.

Workflow Overview

1

Create Client

Register the client who is placing the order. Client records store document type, contact details, and are linked to the company via company (company ID string).
2

Create Order (Pedido)

Create a Pedido linked to the client. Specify the type of item (type_pedido), quantity, price, and delivery date. The order starts with state_pedido: "" and advances through "Pendiente""En produccion""Entregado".
3

Move to Production

Create a Production record referencing the pedido. Set priority_production (Baja, Media, Alta, or Urgente) and the delivery_date_production.
4

Assign Employee

Assign a responsible_production (employee name or ID) to the production job so work can be tracked per team member.
5

Finalize Production

Mark the production as finalized by setting finalized_production and stamping production_finalized_date. The linked pedido state advances to "Entregado".
6

Generate Sale (Invoice)

Create a Sale record referencing the finalized production and the client. Choose a payment_method and record the price, sub_total, and total. The sale defaults to state: "Pagado".

Data Models

Client

Stored in collection client_sublimacion. Represents a customer of the print shop.
FieldTypeNotes
companyStringID of the owning company
document_type_clientString (enum)"CC", "NIT", "CE", "PP", or ""
number_document_clientStringDocument number (defaults to "Vacio")
name_clientStringLegal name / trade name (defaults to "Vacio")
email_clientStringContact email (defaults to "Vacio")
phone_clientStringContact phone (defaults to "Vacio")

Supplier

Stored in collection supplier_sublimacion. Represents a materials or services vendor.
FieldTypeNotes
companyStringID of the owning company
document_type_supplierString (enum)"CC", "NIT", or ""
number_document_supplierStringSupplier document number
company_nameStringSupplier trade name / legal name
contact_nameStringContact person at the supplier
email_supplierStringSupplier email address
phone_supplierStringSupplier phone number
address_supplierStringSupplier street address
city_supplierStringSupplier city

Pedido (Order)

Stored in collection pedido_sublimacion. Represents a client’s purchase order.
FieldTypeNotes
bill_counterStringAuto-generated order number
date_pedidoStringDate the order was placed (DD/MM/YY)
hour_pedidoStringTime the order was placed
description_pedidoStringFree-text description of the order
type_pedidoStringItem type (e.g., uniform, shirt, cap)
quantity_pedidoStringQuantity ordered
price_pedidoStringUnit price
monedaStringCurrency code (defaults to "COP")
companyStringID of the owning company
client._idStringClient ID snapshot
client.name_clientStringClient name snapshot
client.phone_clientStringClient phone snapshot
state_pedidoString (enum)"Pendiente", "En produccion", "Entregado", or ""

Production

Stored in collection production_sublimacion. Tracks a production job derived from a pedido.
FieldTypeNotes
bill_counterStringAuto-generated production number
price_productionNumberProduction cost / sale price
type_productionStringItem type being produced
quantity_productionStringProduction quantity
delivery_date_productionStringExpected delivery date
responsible_productionStringName of the assigned designer or operator
priority_productionString (enum)"Baja", "Media", "Alta", "Urgente", or ""
finalized_productionStringFinalization flag (defaults to "")
production_finalized_dateStringDate production was completed
userCompany._idStringID of the sub-user who created the record
userCompany.name_user_companyStringSub-user name snapshot
companyObjectSnapshot of company identity fields
clientObjectSnapshot of client identity fields
pedidoObjectSnapshot of the source pedido fields

Sale

Stored in collection sale_sublimacion. Records a completed transaction.
FieldTypeNotes
bill_numberStringAuto-generated sale invoice number
date_saleStringDate of sale
client._idStringClient ID snapshot
client.name_clientStringClient name snapshot
payment_methodString (enum)"Tarjeta de credito", "Transferencia", or "Efectivo" (default)
productionObjectSnapshot of production fields (bill_counter, type, price, etc.)
companyStringID of the owning company
quantityNumberQuantity sold (defaults to 0)
stateStringPayment state (defaults to "Pagado")
priceNumberUnit price
sub_totalNumberSubtotal before adjustments
totalNumberFinal total amount

Employee

Stored in collection employee_sublimacion. See the HR module for full details.
FieldTypeNotes
name_employeeStringEmployee full name
type_document_employeeStringDocument type (CC, PP, etc.)
number_document_employeeNumberDocument number
base_saraly_employeeNumberBase salary (note: field name contains a typo in the source schema — saraly instead of salary)
type_contract_employeeString (enum)"Fijo", "Indefinido", "Prestaciones", or ""
stade_employeeStringActive/inactive status
type_employeeStringRole (designer, operator, etc.)
companyStringID of the owning company

Bill Counters

The sublimation route group uses counters stored in the company’s counters Map. These are automatically incremented by the API when new documents are created. Because sublimation companies (sublimacion) are not defined in companyConfig.js, their counters are provisioned through the sublimation registration flow rather than the shared config:
Counter KeyUsed For
bill_counterPedido (order) numbers
bill_counter_productionProduction job numbers
bill_counter_creditCredit note numbers
bill_counter_debitDebit note numbers
Counter values are stored on the company document as a Map field. They persist across all sessions and guarantee sequential numbering within each company tenant.

API Endpoints Summary

Clients — /api/client

MethodEndpointDescription
POST/api/client/create-client-company/:company_idCreate a new client
PUT/api/client/update-client-company/:company_id/:client_idUpdate an existing client
GET/api/client/list-client-company/:company_idList all clients for a company (paginated)
DELETE/api/client/delete-client-company/:client_idDelete a client

Suppliers — /api/supplier

MethodEndpointDescription
POST/api/supplier/create-supplier-company/:company_idCreate a new supplier
PUT/api/supplier/update-supplier-company/:company_id/:supplier_idUpdate an existing supplier
GET/api/supplier/list-supplier-company/:company_idList all suppliers for a company (paginated)
DELETE/api/supplier/delete-supplier-company/:supplier_idDelete a supplier

Orders (Pedido) — /api/pedido

MethodEndpointDescription
POST/api/pedido/:company_id/:client_idCreate a new order linked to a client
PUT/api/pedido/update-state/:company_id/:pedido_idUpdate the state of an existing order
GET/api/pedido/list/:company_id/:pedido_id/:queryList orders with optional filters (paginated)
GET/api/pedido/list-data/:company_id/:pedido_id/uniqueFetch a single order by ID

Production — /api/production

MethodEndpointDescription
POST/api/production/:company_id/:pedido_idStart a production job from an order
POST/api/production/:company_id/assigned/:production_idAssign an employee to a production job
POST/api/production/finalized/:company_id/:pedido_id/:production_idFinalize a production job
GET/api/production/list/:company_id/:production_id/:queryList production jobs (paginated)
GET/api/production/list-one/:company_id/:production_idFetch a single production job by ID

Sales — /api/sale

MethodEndpointDescription
POST/api/sale/create-sale/:company_id/:production_idGenerate a sale from a finalized production
GET/api/sale/list-sale/:company_idList all sales for a company (paginated)
GET/api/sale/list/:company_id/unique/:sale_idFetch a single sale by ID

Full Sublimation API Reference

Browse the complete endpoint reference for clients, suppliers, orders, production, and sales in the sublimation module.

Build docs developers (and LLMs) love