The Clients resource in the sublimation module lets you register and manage the customers associated with a specific company. Each client record captures identity and contact information and is scoped to a singleDocumentation 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. All four operations — create, update, list, and delete — are available through these endpoints.
All sublimation client 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/client/create-client-company/:company_id
Creates a new client record associated with the given company. Path parametersThe MongoDB ObjectId of the company under which the client is registered.
The type of identification document. Accepted values:
CC, NIT, CE, PP. Defaults to an empty string if omitted.The client’s identification document number. Defaults to
"Vacio" if omitted.The client’s full name or business name (razón social). Defaults to
"Vacio" if omitted.The client’s email address. Defaults to
"Vacio" if omitted.The client’s phone number. Defaults to
"Vacio" if omitted.Human-readable result message. Returns
"Nuevo cliente creado exitosamente" on success.true on success, false on failure.The newly created client document as stored in MongoDB, including the generated
_id, all submitted fields, company, and createdAt/updatedAt timestamps.PUT /api/client/update-client-company/:company_id/:client_id
Updates the fields of an existing client record. Path parametersThe MongoDB ObjectId of the company that owns the client.
The MongoDB ObjectId of the client to update.
Updated document type. Accepted values:
CC, NIT, CE, PP.Updated identification document number.
Updated client name or business name.
Updated email address.
Updated phone number.
Returns
"Cliente actualizado correctamente" on success.true on success, false on failure.GET /api/client/list-client-company/:company_id
Returns a paginated list of all clients belonging to a company. Pagination is handled by thePaginate middleware, which reads optional pag and perpage values and injects skippag and limit into req.body.
Path parameters
The MongoDB ObjectId of the company whose clients are to be listed.
?pag=1&perpage=10 as query parameters (or omit for defaults) to control the page number and results per page. The response includes a pagination object with the current page, items per page, and total page count.
Responses
Returns
"Cargando clientes" on success.true on success.Array of client documents sorted by
_id descending. Each element contains _id, company, document_type_client, number_document_client, name_client, email_client, phone_client, createdAt, and updatedAt.Pagination metadata.
DELETE /api/client/delete-client-company/:client_id
Permanently removes a client record. Path parametersThe MongoDB ObjectId of the client to delete.
Returns
"Cliente eliminado exitosamente" on success.true on success, false on failure.