Docs
Api reference

Table

GET
/api/table

Response Body

application/json

curl -X GET "https://example.com/api/table"
{  "success": true,  "data": [    {      "tableNumber": "string",      "capacity": 1,      "location": "string",      "status": "available",      "id": 1,      "createdAt": "string",      "updatedAt": "string"    }  ]}
POST
/api/table

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/table" \  -H "Content-Type: application/json" \  -d '{    "tableNumber": "string",    "capacity": 1  }'
{  "success": true,  "table": {    "tableNumber": "string",    "capacity": 1,    "location": "string",    "status": "available"  }}
DELETE
/api/table/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*number

Response Body

application/json

curl -X DELETE "https://example.com/api/table/0"
{  "success": true,  "message": "string"}
PUT
/api/table/{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

curl -X PUT "https://example.com/api/table/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "table": {    "tableNumber": "string",    "capacity": 1,    "location": "string",    "status": "available"  }}