Pharmacy clients are optional customer records that can be linked to a sale. Registering a client allows you to associate purchases with a named individual or business, track their contact details, and apply client-specific logic at checkout. The four endpoints below let you create, update, list, and delete pharmacy clients scoped to a company tenant.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.
All client endpoints require two authentication middlewares.
TokenAny
validates the bearer token and attaches the user to the request. TokenAuthorize('Admin', 'Super Admin')
restricts access to users whose role is either Admin or Super Admin.
Include the token in every request as token-access: Bearer $TOKEN.Create a Client
POST /api/client-pharmacy/:company_id
Registers a new pharmacy client for the specified company. Only name_client is required; all other fields default to placeholder values if omitted.
Path Parameters
The MongoDB ObjectId of the owning company.
Body Parameters
Full name of the client.
Email address of the client. Defaults to
"--------------" if not provided.Phone number of the client. Defaults to
"--------------" if not provided.Tax identification number (NIT) of the client. Defaults to
"Sin NIT" if not provided.Client type. Must be one of:
"Individual", "Empresa", "--------------". Defaults to "--------------".Address of the client. Defaults to
"--------------" if not provided.Response Fields
Human-readable result message.
true on success, false on failure.The newly created client document.
Example
Update a Client
PUT /api/client-pharmacy/:company_id/updating/:client_id
Updates all editable fields of an existing pharmacy client.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the client to update.
Body Parameters
Updated full name of the client.
Updated email address.
Updated phone number.
Updated tax identification number.
Updated client type. Must be one of:
"Individual", "Empresa", "--------------".Updated address.
Response Fields
Human-readable result message.
true on success.Example
List Clients
GET /api/client-pharmacy/:company_id/:pag?/:perpage?
Returns a paginated list of all pharmacy clients belonging to the specified company, sorted by most recently created.
Path Parameters
The MongoDB ObjectId of the company whose clients to retrieve.
Optional page number.
Optional results per page.
Response Fields
Human-readable result message.
true on success.Array of client documents for the company.
Pagination metadata.
Example
Delete a Client
DELETE /api/client-pharmacy/:client_id
Permanently removes a pharmacy client record. This action is irreversible.
Path Parameters
The MongoDB ObjectId of the client to delete.
Response Fields
Human-readable result message.
true on success, false if the client was not found.