Api reference
Order
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/create-order" \ -H "Content-Type: application/json" \ -d '{ "customerName": "string", "from": "string", "to": "string", "orderItems": [ { "id": 0, "quantity": 1 } ] }'{ "success": true, "data": { "restaurantId": 1, "tableId": 1, "customerId": 1, "orderType": "dine-in", "status": "pending", "totalAmount": 0, "customerName": "string", "customerPhone": "string", "customerEmail": "[email protected]", "deliveryAddressStreet": "string", "deliveryAddressCity": "string", "deliveryAddressZipCode": "string", "deliverySpecialInstructions": "string", "specialRequests": "string", "callId": "string", "isConfirmed": false, "id": 1, "createdAt": "string", "updatedAt": "string" }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Query Parameters
restaurantId?integer
Range
0 < valuestatus?string
Value in
- "pending"
- "confirmed"
- "preparing"
- "ready"
- "served"
- "completed"
- "cancelled"
orderType?string
Value in
- "dine-in"
- "takeaway"
- "delivery"
page?integer
Range
0 < valueDefault
1limit?integer
Range
0 < value <= 100Default
10search?string
Response Body
application/json
curl -X GET "https://example.com/api/order"{ "success": true, "data": [ { "restaurantId": 1, "tableId": 1, "customerId": 1, "orderType": "dine-in", "status": "pending", "totalAmount": 0, "customerName": "string", "customerPhone": "string", "customerEmail": "[email protected]", "deliveryAddressStreet": "string", "deliveryAddressCity": "string", "deliveryAddressZipCode": "string", "deliverySpecialInstructions": "string", "specialRequests": "string", "callId": "string", "isConfirmed": false, "id": 1, "createdAt": "string", "updatedAt": "string" } ], "pagination": { "page": 0, "limit": 0, "total": 0, "totalPages": 0 }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*number
Response Body
application/json
application/json
curl -X GET "https://example.com/api/order/0"{ "success": true, "order": { "restaurantId": 1, "tableId": 1, "customerId": 1, "orderType": "dine-in", "status": "pending", "totalAmount": 0, "customerName": "string", "customerPhone": "string", "customerEmail": "[email protected]", "deliveryAddressStreet": "string", "deliveryAddressCity": "string", "deliveryAddressZipCode": "string", "deliverySpecialInstructions": "string", "specialRequests": "string", "callId": "string", "isConfirmed": false, "id": 1, "createdAt": "string", "updatedAt": "string", "orderItems": [ { "id": 0, "quantity": 0, "price": 0, "size": "string", "customizations": "string", "notes": "string", "menuItem": { "id": 0, "name": "string", "description": "string", "price": 0 } } ], "customer": { "id": 0, "name": "string", "email": "string", "phone": "string" }, "table": { "id": 0, "tableNumber": "string", "capacity": 0 } }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*number
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/order/0"{ "success": true, "message": "string"}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*number
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/api/order/0" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "order": { "tableId": 1, "orderType": "dine-in", "status": "pending", "totalAmount": 0, "customerName": "string", "customerPhone": "string", "customerEmail": "[email protected]", "deliveryAddressStreet": "string", "deliveryAddressCity": "string", "deliveryAddressZipCode": "string", "deliverySpecialInstructions": "string", "specialRequests": "string", "callId": "string", "isConfirmed": false }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/order/bulk-delete" \ -H "Content-Type: application/json" \ -d '{ "ids": [ 0 ] }'{ "success": true, "message": "string"}