The Suppliers resource manages the vendors and providers associated with a sublimation company. A supplier record captures both company-level information (business name, NIT/CC, city) and a contact person’s details. All supplier operations are scoped to aDocumentation 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.
company_id and all fields are required when creating a supplier.
All sublimation supplier 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/supplier/create-supplier-company/:company_id
Creates a new supplier record linked to the given company. All body fields are required — the controller returns403 if any field is missing.
Path parameters
The MongoDB ObjectId of the company under which the supplier is registered.
The type of identification document for the supplier. Accepted values:
CC, NIT.The supplier’s identification document number.
The supplier’s business name (razón social).
The name of the primary contact person at the supplier.
The supplier’s email address.
The supplier’s phone number.
The supplier’s physical address.
The city where the supplier is located.
Returns
"Nuevo proveedor creado exitosamente" on success.true on success, false on failure.The newly created supplier document as stored in MongoDB, including the generated
_id, all submitted fields, company, and createdAt/updatedAt timestamps.PUT /api/supplier/update-supplier-company/:company_id/:supplier_id
Updates an existing supplier record. Both the company and the supplier are validated before any changes are applied. Path parametersThe MongoDB ObjectId of the company that owns the supplier.
The MongoDB ObjectId of the supplier to update.
Updated document type. Accepted values:
CC, NIT.Updated identification document number.
Updated business name.
Updated contact person name.
Updated email address.
Updated phone number.
Updated address.
Updated city.
Returns
"Proveedor actualizado correctamente" on success.true on success, false on failure.The raw MongoDB
updateOne result object containing matchedCount and modifiedCount.GET /api/supplier/list-supplier-company/:company_id
Returns a paginated list of all suppliers belonging to a company. Pagination is driven by thePaginate middleware, which accepts pag and perpage query parameters.
Path parameters
The MongoDB ObjectId of the company whose suppliers are to be listed.
?pag=1&perpage=10 as query parameters to control which page of results to retrieve. The Paginate middleware computes skippag and limit and injects them into req.body. The response includes a pagination object.
Responses
Returns
"Cargando proveedores" on success.true on success.Array of supplier documents sorted by
_id descending. Each element contains _id, company, document_type_supplier, number_document_supplier, company_name, contact_name, email_supplier, phone_supplier, address_supplier, city_supplier, createdAt, and updatedAt.Pagination metadata.
DELETE /api/supplier/delete-supplier-company/:supplier_id
Permanently removes a supplier record. The supplier’scompany field is checked against the authenticated user’s identity before deletion proceeds.
Path parameters
The MongoDB ObjectId of the supplier to delete.
Returns
"Proveedor eliminado exitosamente" on success.true on success, false on failure.