Tables
6 API calls in this section.
Create Table
/restaurant/locations/:locationId/tablesAdd a table to a restaurant location with its code, section and seating capacity.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
code | string | — |
name | object | — |
name.en | string | — |
section | string | — |
seating_capacity | number | — |
meta | object | — |
meta.position | object | — |
meta.position.x | number | — |
meta.position.y | number | — |
meta.position.rotation | number | — |
meta.attributes | object | — |
meta.attributes.shape | string | — |
Show 2 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
meta.attributes.tags | array<string> | — |
active | boolean | — |
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
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/locations/:locationId/tablesBrowse a location’s tables, optionally filtering by section and seating capacity.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Example: |
limit | string | Example: |
section | string | Example: |
min_seating | string | Example: |
max_seating | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/tables?page=1&limit=10§ion=Patio&min_seating=2&max_seating=6" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
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/tables/:tableIdRead one restaurant table’s configuration.
Path parameters
| Parameter | Type | Description |
|---|---|---|
tableIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/tables/${TABLEID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
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/tables/:tableIdChange a table’s name, section, seating capacity or active state.
Path parameters
| Parameter | Type | Description |
|---|---|---|
tableIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | object | — |
name.en | string | — |
section | string | — |
seating_capacity | number | — |
meta | object | — |
meta.position | object | — |
meta.position.x | number | — |
meta.position.y | number | — |
meta.position.rotation | number | — |
meta.attributes | object | — |
meta.attributes.shape | string | — |
meta.attributes.tags | array<string> | — |
Show 1 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
active | boolean | — |
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
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/tables/:tableIdRemove a table from the restaurant location’s configuration.
Path parameters
| Parameter | Type | Description |
|---|---|---|
tableIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/restaurant/tables/${TABLEID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "data": {4 "id": "{{tableId}}"5 }6}List Sections
/restaurant/locations/:locationId/sectionsBrowse the named seating sections of a restaurant location.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Example: |
limit | string | Example: |
search | string | — |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
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
1{2 "success": true,3 "data": [4 {5 "name": "Patio",6 "tenant_id": "..."7 }8 ],9 "page": 1,10 "limit": 10,11 "total": 112}