Delivery records capture off-premises orders — orders where a product is dispatched to a customer’s address rather than served at a table. Each delivery stores client contact information, a delivery address, optional reference notes, and tracks its current status (in transit, delivered, or not delivered) and payment method. Four endpoints cover the full lifecycle: create, update status, update payment method, and list deliveries with optional status filtering.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 delivery 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 Delivery
POST /api/delivery/:company_id/:product_id
Creates a new delivery record. The product referenced by :product_id is looked up and its data is embedded as a snapshot.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the product being delivered.
Body Parameters
Full name of the customer receiving the delivery.
Contact phone number of the customer.
Delivery address for the customer.
Optional landmark or additional directions to help locate the address (defaults to an empty string).
Response Fields
Human-readable result message.
true on success, false on failure.The newly created delivery document.
Example
Update Delivery Status
PUT /api/delivery/status/:company_id/:delivery_id
Updates the status_delivery field of an existing delivery record.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the delivery record to update.
Body Parameters
New delivery status. Must be one of:
"En camino", "Entregado", "No entregado", or "".Response Fields
Human-readable result message.
true on success.Example
Update Delivery Payment Method
PUT /api/delivery/update/:company_id/methods/:delivery_id
Updates the payment_method and paid fields of a delivery record to record how and whether the customer has paid.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the delivery record to update.
Body Parameters
Payment method used. Must be one of:
"Efectivo", "Transferencia", or "".true once payment has been received, false if still pending.Response Fields
Human-readable result message.
true on success.Example
List Deliveries
GET /api/delivery/list/:company_id/:delivery_id/:query
Returns a paginated, optionally filtered list of deliveries. The :query path parameter is a numeric filter: 0 for En camino, 1 for Entregado, 2 for No entregado, and any other value returns all deliveries unfiltered.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId used to scope the delivery lookup.
Numeric string filter:
"0" = En camino, "1" = Entregado, "2" = No entregado. Any other value returns all records.Response Fields
Human-readable result message.
true on success.Array of delivery documents matching the filter.
Pagination metadata.