Orders (pedidos) represent customer requests for sublimation work — a uniform batch, a set of caps, a custom t-shirt run, and so on. When an order is created, the system auto-generates a sequential bill counter (e.g.,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.
PD-0001) and sets the initial state to Pendiente. Orders then progress through the states En produccion and Entregado as production and delivery are completed.
All sublimation order endpoints require two middleware layers:
TokenAny validates any active bearer token (company or user-company token), and TokenAuthorize('Admin', 'Super Admin') restricts access to users holding the Admin or Super Admin role. Include the token in every request using the token-access: Bearer $TOKEN header.POST /api/pedido/:company_id/:client_id
Creates a new order for the specified client within the given company. The system records the current date and time automatically and setsstate_pedido to Pendiente. All four body fields are required.
Path parameters
The MongoDB ObjectId of the company placing the order.
The MongoDB ObjectId of the client the order belongs to.
A text description of the order — what is being made, design details, etc.
The type or category of product being ordered (e.g.,
Uniforme, Camisa, Gorras, Sudadera).The quantity of items requested.
The agreed price for the order.
Returns
"Nuevo pedido registrado correctamente" on success.true on success, false on failure.The saved order document. Includes
_id, bill_counter, date_pedido, hour_pedido, description_pedido, type_pedido, quantity_pedido, price_pedido, moneda (default COP), state_pedido, company, client (with _id, name_client, phone_client), createdAt, and updatedAt.PUT /api/pedido/update-state/:company_id/:pedido_id
Updates thestate_pedido field of an existing order. Use this endpoint to advance an order through the workflow — from Pendiente to En produccion and finally to Entregado.
Path parameters
The MongoDB ObjectId of the company that owns the order.
The MongoDB ObjectId of the order whose state is being updated.
The new state to apply to the order. Accepted values:
Pendiente, En produccion, Entregado.Returns
"Estado del pedido actualizado correctamente" on success.true on success.GET /api/pedido/list/:company_id/:pedido_id/:query/:pag?/:perpage?
Returns a paginated, optionally filtered list of orders. The:query path segment is a numeric filter: 0 returns only Pendiente orders, 1 returns En produccion, 2 returns Entregado, and any other number returns all orders unfiltered.
Path parameters
The MongoDB ObjectId of the company whose orders are listed.
A MongoDB ObjectId used to scope the initial document lookup. Pass a valid (or placeholder) ObjectId; the controller queries by this ID and then filters client-side.
Numeric filter string controlling which
state_pedido to return:0→Pendiente1→En produccion2→Entregado- Any other value → no state filter applied (all orders returned)
Optional page number. Defaults to
1 if omitted.Optional number of results per page. Defaults to the server’s configured default if omitted.
Returns
"Cargando informacion de pedidos" on success.true on success.Array of matching order documents for the current page, sorted by
_id descending.Pagination metadata.
GET /api/pedido/list-data/:company_id/:pedido_id/unique
Retrieves a single order document by its ID within a given company. Path parametersThe MongoDB ObjectId of the company that owns the order.
The MongoDB ObjectId of the specific order to retrieve.
Returns
"Cargando informacion de pedido" on success.true on success.The full order document including
_id, bill_counter, date_pedido, hour_pedido, description_pedido, type_pedido, quantity_pedido, price_pedido, moneda, state_pedido, company, client, createdAt, and updatedAt.