A pedido (order) is created each time a customer places a food or beverage order at your restaurant’s point of sale. When an order is recorded, the API auto-generates a sequential bill counter (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.
bill_counter), stamps the current date and time, and snapshots the ordered product along with all its extras. The two endpoints below let you create a new order and list all orders for a company with pagination.
All order 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 an Order
POST /api/pedido/restaurante/:company_id/:product_id
Creates a new restaurant order. The server looks up the product and company by their IDs, auto-generates the bill_counter, and saves the price snapshot.
Path Parameters
The MongoDB ObjectId of the owning company (tenant).
The MongoDB ObjectId of the product being ordered.
Body Parameters
The total price charged for this order (stored as a string, e.g.
"28000").Response Fields
Human-readable result message.
true on success, false on failure.The newly created order document.
Example
List Orders
GET /api/pedido/restaurante/:company_id/:pag?/:perpage?
Returns a paginated list of all orders for the specified company, sorted by most recently created. The optional :pag and :perpage path segments are processed by the Paginate middleware and control the page offset and page size.
Path Parameters
The MongoDB ObjectId of the company whose orders to retrieve.
Optional page number. Defaults to page
1 if omitted.Optional number of results per page. Defaults to the middleware default if omitted.
Response Fields
Human-readable result message.
true on success.Array of order documents for the company.
Pagination metadata.