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.

Productions represent the manufacturing stage of the sublimation workflow. Once an order (pedido) is confirmed, it is promoted to a production record, assigned to a responsible employee, and eventually finalized. The production inherits pricing, type, and quantity directly from the source order.
All production endpoints require TokenAny (accepts either a company or sub-user JWT) plus TokenAuthorize('Admin', 'Super Admin'). Pass your token in every request using the token-access: Bearer $TOKEN header.

POST /api/production/:company_id/:pedido_id

Creates a production record from an existing order. The production inherits price_production, type_production, and quantity_production from the referenced pedido. Provide additional scheduling fields in the request body. Path parameters
company_id
string
required
MongoDB ObjectId of the company owning the production.
pedido_id
string
required
MongoDB ObjectId of the order being moved into production.
Body parameters
responsible_production
string
Name or identifier of the person responsible for this production job.
delivery_date_production
string
Scheduled delivery date (e.g., "20/8/2024").
priority_production
string
Priority level. Accepted values: Baja, Media, Alta, Urgente.
Response
msj
string
"Pedido pasado a produccion" on success.
status
boolean
true on success.
save_production
object
The created production document.
curl -X POST https://api.example.com/api/production/64a1f2e3b5c8d90012345678/64d4c5e6f8a9b00045678901 \
  -H "token-access: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "responsible_production": "Carlos Diseño",
    "delivery_date_production": "25/8/2024",
    "priority_production": "Alta"
  }'
{
  "msj": "Pedido pasado a produccion",
  "status": true,
  "save_production": {
    "_id": "64e5d6f7a8b9c00056789012",
    "bill_counter": "PR-0001",
    "price_production": 350000,
    "type_production": "Camisa",
    "quantity_production": "10",
    "delivery_date_production": "25/8/2024",
    "responsible_production": "Carlos Diseño",
    "priority_production": "Alta",
    "finalized_production": "",
    "production_finalized_date": ""
  }
}

POST /api/production/:company_id/assigned/:production_id

Assigns a UserCompany sub-user to a production record as the responsible worker. Path parameters
company_id
string
required
MongoDB ObjectId of the company.
production_id
string
required
MongoDB ObjectId of the production to update.
Body parameters
user_company_id
string
required
MongoDB ObjectId of the sub-user (UserCompany) to assign.
Response
msj
string
"Empleado asignado a produccion" on success.
curl -X POST https://api.example.com/api/production/64a1f2e3b5c8d90012345678/assigned/64e5d6f7a8b9c00056789012 \
  -H "token-access: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"user_company_id": "64f6e7f8a9b0c00167890123"}'

POST /api/production/finalized/:company_id/:pedido_id/:production_id

Marks a production as "Finalizado", recording the completion date. This is required before generating a sale from this production. Path parameters
company_id
string
required
MongoDB ObjectId of the company.
pedido_id
string
required
MongoDB ObjectId of the source order.
production_id
string
required
MongoDB ObjectId of the production to finalize.
Body parameters
finalized_production
string
required
Must be "Finalizado" to trigger the state change.
Response
msj
string
"Produccion de producto finalizada. El trabajo ha sido completado exitosamente" on success.
status
boolean
true on success.
curl -X POST https://api.example.com/api/production/finalized/64a1f2e3b5c8d90012345678/64d4c5e6f8a9b00045678901/64e5d6f7a8b9c00056789012 \
  -H "token-access: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"finalized_production": "Finalizado"}'
{
  "msj": "Produccion de producto finalizada. El trabajo ha sido completado exitosamente",
  "status": true
}

GET /api/production/list/:company_id/:production_id/:query/:pag?/:perpage?

Returns a paginated list of productions, optionally filtered by priority level using the :query path segment. Path parameters
company_id
string
required
MongoDB ObjectId of the company.
production_id
string
required
MongoDB ObjectId used to scope the lookup.
query
string
required
Numeric filter for priority_production:
  • 0Baja
  • 1Media
  • 2Alta
  • 3Urgente
  • Any other value → no priority filter applied
pag
string
Page number (optional, defaults to 1).
perpage
string
Items per page (optional, defaults to server default).
Response
msj
string
"Cargandos informacion de producciones" on success.
status
boolean
true on success.
data
array
Array of production documents for the current page, sorted by _id descending.
pagination
object
Pagination metadata.
curl -X GET "https://api.example.com/api/production/list/64a1f2e3b5c8d90012345678/64e5d6f7a8b9c00056789012/2/1/10" \
  -H "token-access: Bearer $TOKEN"

GET /api/production/list-one/:company_id/:production_id

Retrieves a single production document by its ID. Path parameters
company_id
string
required
MongoDB ObjectId of the company.
production_id
string
required
MongoDB ObjectId of the production to retrieve.
Response
msj
string
"Cargando informacion de produccion" on success.
status
boolean
true on success.
productionX
object
Full production document with all fields.
curl -X GET https://api.example.com/api/production/list-one/64a1f2e3b5c8d90012345678/64e5d6f7a8b9c00056789012 \
  -H "token-access: Bearer $TOKEN"
{
  "msj": "Cargando informacion de produccion",
  "status": true,
  "productionX": {
    "_id": "64e5d6f7a8b9c00056789012",
    "bill_counter": "PR-0001",
    "price_production": 350000,
    "type_production": "Camisa",
    "quantity_production": "10",
    "delivery_date_production": "25/8/2024",
    "responsible_production": "Carlos Diseño",
    "priority_production": "Alta",
    "finalized_production": "Finalizado",
    "production_finalized_date": "20/8/2024"
  }
}

Build docs developers (and LLMs) love