Skip to main content

Tables

6 API calls in this section.

Create Table

Restaurant Menu / Tables
POST/restaurant/locations/:locationId/tables
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/locations/:locationId/tables" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "code": "A05",6  "name": {7    "en": "Table A05"8  },9  "section": "Patio",10  "seating_capacity": 4,11  "meta": {12    "position": {13      "x": 12,14      "y": 8,15      "rotation": 016    },17    "attributes": {18      "shape": "round",19      "tags": [20        "window"21      ]22    }23  },24  "active": true25}'
Request body
json
1{2  "code": "A05",3  "name": {4    "en": "Table A05"5  },6  "section": "Patio",7  "seating_capacity": 4,8  "meta": {9    "position": {10      "x": 12,11      "y": 8,12      "rotation": 013    },14    "attributes": {15      "shape": "round",16      "tags": [17        "window"18      ]19    }20  },21  "active": true22}

Path parameters

locationIdRequired
path string

Request body fields

codeExample
string

Example field from the request body.

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

sectionExample
string

Example field from the request body.

seating_capacityExample
number

Example field from the request body.

metaExample
object

Example field from the request body.

meta.positionExample
object

Example field from the request body.

meta.position.xExample
number

Example field from the request body.

meta.position.yExample
number

Example field from the request body.

meta.position.rotationExample
number

Example field from the request body.

meta.attributesExample
object

Example field from the request body.

meta.attributes.shapeExample
string

Example field from the request body.

meta.attributes.tagsExample
array<string>

Example field from the request body.

activeExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{tableId}}",5    "location_id": "{{locationId}}",6    "code": "A05",7    "name": {8      "en": "Table A05"9    },10    "section": "Patio",11    "seating_capacity": 4,12    "meta": {13      "position": {14        "x": 12,15        "y": 8,16        "rotation": 017      }18    },19    "active": true20  }21}

List Tables

Restaurant Menu / Tables
GET/restaurant/locations/:locationId/tables?page=1&limit=10&section=Patio&min_seating=2&max_seating=6
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/locations/:locationId/tables?page=1&limit=10&section=Patio&min_seating=2&max_seating=6" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Query parameters

pageOptional
query string

1

limitOptional
query string

10

sectionOptional
query string

Patio

min_seatingOptional
query string

2

max_seatingOptional
query string

6

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{tableId}}",6      "code": "A05",7      "section": "Patio",8      "seating_capacity": 4,9      "qr_label_url": "https://cdn.example.com/documents/restaurant/table-qr/{{tableId}}.pdf"10    }11  ],12  "page": 1,13  "limit": 10,14  "total": 115}

Get Table

Restaurant Menu / Tables
GET/restaurant/tables/:tableId
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/tables/:tableId" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

tableIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{tableId}}",5    "code": "A05",6    "name": {7      "en": "Table A05"8    },9    "section": "Patio",10    "seating_capacity": 4,11    "qr_label_url": "https://cdn.example.com/documents/restaurant/table-qr/{{tableId}}.pdf"12  }13}

Update Table

Restaurant Menu / Tables
PUT/restaurant/tables/:tableId
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/tables/:tableId" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "name": {6    "en": "Table A05 - Window"7  },8  "section": "Patio",9  "seating_capacity": 6,10  "meta": {11    "position": {12      "x": 14,13      "y": 9,14      "rotation": 015    },16    "attributes": {17      "shape": "round",18      "tags": [19        "window",20        "vip"21      ]22    }23  },24  "active": true25}'
Request body
json
1{2  "name": {3    "en": "Table A05 - Window"4  },5  "section": "Patio",6  "seating_capacity": 6,7  "meta": {8    "position": {9      "x": 14,10      "y": 9,11      "rotation": 012    },13    "attributes": {14      "shape": "round",15      "tags": [16        "window",17        "vip"18      ]19    }20  },21  "active": true22}

Path parameters

tableIdRequired
path string

Request body fields

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

sectionExample
string

Example field from the request body.

seating_capacityExample
number

Example field from the request body.

metaExample
object

Example field from the request body.

meta.positionExample
object

Example field from the request body.

meta.position.xExample
number

Example field from the request body.

meta.position.yExample
number

Example field from the request body.

meta.position.rotationExample
number

Example field from the request body.

meta.attributesExample
object

Example field from the request body.

meta.attributes.shapeExample
string

Example field from the request body.

meta.attributes.tagsExample
array<string>

Example field from the request body.

activeExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{tableId}}",5    "name": {6      "en": "Table A05 - Window"7    },8    "section": "Patio",9    "seating_capacity": 6,10    "active": true11  }12}

Delete Table

Restaurant Menu / Tables
DELETE/restaurant/tables/:tableId
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request DELETE "$ONDI_BASE_URL/restaurant/tables/:tableId" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

tableIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{tableId}}"5  }6}

List Sections

Restaurant Menu / Tables
GET/restaurant/locations/:locationId/sections?page=1&limit=10&search=
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/locations/:locationId/sections?page=1&limit=10&search=" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Query parameters

pageOptional
query string

1

limitOptional
query string

10

searchOptional
query string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "name": "Patio",6      "tenant_id": "..."7    }8  ],9  "page": 1,10  "limit": 10,11  "total": 112}