The sublimation module covers every stage of a print shop’s operational cycle. From the moment a client places an order (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.
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
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).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".Move to Production
Create a
Production record referencing the pedido. Set priority_production (Baja, Media, Alta, or Urgente) and the delivery_date_production.Assign Employee
Assign a
responsible_production (employee name or ID) to the production job so work can be tracked per team member.Finalize Production
Mark the production as finalized by setting
finalized_production and stamping production_finalized_date. The linked pedido state advances to "Entregado".Data Models
Client
Stored in collectionclient_sublimacion. Represents a customer of the print shop.
| Field | Type | Notes |
|---|---|---|
company | String | ID of the owning company |
document_type_client | String (enum) | "CC", "NIT", "CE", "PP", or "" |
number_document_client | String | Document number (defaults to "Vacio") |
name_client | String | Legal name / trade name (defaults to "Vacio") |
email_client | String | Contact email (defaults to "Vacio") |
phone_client | String | Contact phone (defaults to "Vacio") |
Supplier
Stored in collectionsupplier_sublimacion. Represents a materials or services vendor.
| Field | Type | Notes |
|---|---|---|
company | String | ID of the owning company |
document_type_supplier | String (enum) | "CC", "NIT", or "" |
number_document_supplier | String | Supplier document number |
company_name | String | Supplier trade name / legal name |
contact_name | String | Contact person at the supplier |
email_supplier | String | Supplier email address |
phone_supplier | String | Supplier phone number |
address_supplier | String | Supplier street address |
city_supplier | String | Supplier city |
Pedido (Order)
Stored in collectionpedido_sublimacion. Represents a client’s purchase order.
| Field | Type | Notes |
|---|---|---|
bill_counter | String | Auto-generated order number |
date_pedido | String | Date the order was placed (DD/MM/YY) |
hour_pedido | String | Time the order was placed |
description_pedido | String | Free-text description of the order |
type_pedido | String | Item type (e.g., uniform, shirt, cap) |
quantity_pedido | String | Quantity ordered |
price_pedido | String | Unit price |
moneda | String | Currency code (defaults to "COP") |
company | String | ID of the owning company |
client._id | String | Client ID snapshot |
client.name_client | String | Client name snapshot |
client.phone_client | String | Client phone snapshot |
state_pedido | String (enum) | "Pendiente", "En produccion", "Entregado", or "" |
Production
Stored in collectionproduction_sublimacion. Tracks a production job derived from a pedido.
| Field | Type | Notes |
|---|---|---|
bill_counter | String | Auto-generated production number |
price_production | Number | Production cost / sale price |
type_production | String | Item type being produced |
quantity_production | String | Production quantity |
delivery_date_production | String | Expected delivery date |
responsible_production | String | Name of the assigned designer or operator |
priority_production | String (enum) | "Baja", "Media", "Alta", "Urgente", or "" |
finalized_production | String | Finalization flag (defaults to "") |
production_finalized_date | String | Date production was completed |
userCompany._id | String | ID of the sub-user who created the record |
userCompany.name_user_company | String | Sub-user name snapshot |
company | Object | Snapshot of company identity fields |
client | Object | Snapshot of client identity fields |
pedido | Object | Snapshot of the source pedido fields |
Sale
Stored in collectionsale_sublimacion. Records a completed transaction.
| Field | Type | Notes |
|---|---|---|
bill_number | String | Auto-generated sale invoice number |
date_sale | String | Date of sale |
client._id | String | Client ID snapshot |
client.name_client | String | Client name snapshot |
payment_method | String (enum) | "Tarjeta de credito", "Transferencia", or "Efectivo" (default) |
production | Object | Snapshot of production fields (bill_counter, type, price, etc.) |
company | String | ID of the owning company |
quantity | Number | Quantity sold (defaults to 0) |
state | String | Payment state (defaults to "Pagado") |
price | Number | Unit price |
sub_total | Number | Subtotal before adjustments |
total | Number | Final total amount |
Employee
Stored in collectionemployee_sublimacion. See the HR module for full details.
| Field | Type | Notes |
|---|---|---|
name_employee | String | Employee full name |
type_document_employee | String | Document type (CC, PP, etc.) |
number_document_employee | Number | Document number |
base_saraly_employee | Number | Base salary (note: field name contains a typo in the source schema — saraly instead of salary) |
type_contract_employee | String (enum) | "Fijo", "Indefinido", "Prestaciones", or "" |
stade_employee | String | Active/inactive status |
type_employee | String | Role (designer, operator, etc.) |
company | String | ID of the owning company |
Bill Counters
The sublimation route group uses counters stored in the company’scounters 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 Key | Used For |
|---|---|
bill_counter | Pedido (order) numbers |
bill_counter_production | Production job numbers |
bill_counter_credit | Credit note numbers |
bill_counter_debit | Debit note numbers |
API Endpoints Summary
Clients — /api/client
| Method | Endpoint | Description |
|---|---|---|
POST | /api/client/create-client-company/:company_id | Create a new client |
PUT | /api/client/update-client-company/:company_id/:client_id | Update an existing client |
GET | /api/client/list-client-company/:company_id | List all clients for a company (paginated) |
DELETE | /api/client/delete-client-company/:client_id | Delete a client |
Suppliers — /api/supplier
| Method | Endpoint | Description |
|---|---|---|
POST | /api/supplier/create-supplier-company/:company_id | Create a new supplier |
PUT | /api/supplier/update-supplier-company/:company_id/:supplier_id | Update an existing supplier |
GET | /api/supplier/list-supplier-company/:company_id | List all suppliers for a company (paginated) |
DELETE | /api/supplier/delete-supplier-company/:supplier_id | Delete a supplier |
Orders (Pedido) — /api/pedido
| Method | Endpoint | Description |
|---|---|---|
POST | /api/pedido/:company_id/:client_id | Create a new order linked to a client |
PUT | /api/pedido/update-state/:company_id/:pedido_id | Update the state of an existing order |
GET | /api/pedido/list/:company_id/:pedido_id/:query | List orders with optional filters (paginated) |
GET | /api/pedido/list-data/:company_id/:pedido_id/unique | Fetch a single order by ID |
Production — /api/production
| Method | Endpoint | Description |
|---|---|---|
POST | /api/production/:company_id/:pedido_id | Start a production job from an order |
POST | /api/production/:company_id/assigned/:production_id | Assign an employee to a production job |
POST | /api/production/finalized/:company_id/:pedido_id/:production_id | Finalize a production job |
GET | /api/production/list/:company_id/:production_id/:query | List production jobs (paginated) |
GET | /api/production/list-one/:company_id/:production_id | Fetch a single production job by ID |
Sales — /api/sale
| Method | Endpoint | Description |
|---|---|---|
POST | /api/sale/create-sale/:company_id/:production_id | Generate a sale from a finalized production |
GET | /api/sale/list-sale/:company_id | List all sales for a company (paginated) |
GET | /api/sale/list/:company_id/unique/:sale_id | Fetch 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.