Docs
Api reference

Order

POST
/api/create-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"  }}
GET
/api/order

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

restaurantId?integer
Range0 < value
status?string

Value in

  • "pending"
  • "confirmed"
  • "preparing"
  • "ready"
  • "served"
  • "completed"
  • "cancelled"
orderType?string

Value in

  • "dine-in"
  • "takeaway"
  • "delivery"
page?integer
Range0 < value
Default1
limit?integer
Range0 < value <= 100
Default10
search?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  }}
GET
/api/order/{id}

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    }  }}
DELETE
/api/order/{id}

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"}
PUT
/api/order/{id}

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  }}
POST
/api/order/bulk-delete

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"}