Skip to main content

Tables

6 API calls in this section.

Create Table​

Restaurant Menu / Tables
POST/restaurant/locations/:locationId/tables

Add a table to a restaurant location with its code, section and seating capacity.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
codestring—
nameobject—
name.enstring—
sectionstring—
seating_capacitynumber—
metaobject—
meta.positionobject—
meta.position.xnumber—
meta.position.ynumber—
meta.position.rotationnumber—
meta.attributesobject—
meta.attributes.shapestring—
Show 2 more body fields

Additional body parameters

ParameterTypeDescription
meta.attributes.tagsarray<string>—
activeboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/tables" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{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}'

Response examples

200OK
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

Browse a location’s tables, optionally filtering by section and seating capacity.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 10

sectionstring

Example: Patio

min_seatingstring

Example: 2

max_seatingstring

Example: 6

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/tables?page=1&limit=10&section=Patio&min_seating=2&max_seating=6" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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

Read one restaurant table’s configuration.

Path parameters

ParameterTypeDescription
tableIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/tables/${TABLEID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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

Change a table’s name, section, seating capacity or active state.

Path parameters

ParameterTypeDescription
tableIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
sectionstring—
seating_capacitynumber—
metaobject—
meta.positionobject—
meta.position.xnumber—
meta.position.ynumber—
meta.position.rotationnumber—
meta.attributesobject—
meta.attributes.shapestring—
meta.attributes.tagsarray<string>—
Show 1 more body fields

Additional body parameters

ParameterTypeDescription
activeboolean—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/tables/${TABLEID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{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}'

Response examples

200OK
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

Remove a table from the restaurant location’s configuration.

Path parameters

ParameterTypeDescription
tableIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/restaurant/tables/${TABLEID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

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

List Sections​

Restaurant Menu / Tables
GET/restaurant/locations/:locationId/sections

Browse the named seating sections of a restaurant location.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 10

searchstring—

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/sections?page=1&limit=10&search=" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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}