Sessions
4 API calls in this section.
Create Session
/restaurant/sessionsOpen a dining session for a restaurant table. A conflicting open session on the same table is rejected.
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
table_id | string | — |
slug | string | — |
started_at | string | — |
closed_at | string | — |
note | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/sessions" \2 --header "Content-Type: application/json" \3 --data-raw '{4 "table_id": "{{table_id}}",5 "slug": "{{slug}}",6 "started_at": "2024-01-01T12:00:00Z",7 "closed_at": "2024-01-01T14:00:00Z",8 "note": "Optional note about this session"9}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.
List Sessions By User
/restaurant/sessionsBrowse a customer’s dining sessions, optionally limited to a date range or time filter.
Query parameters
| Parameter | Type | Description |
|---|---|---|
user_id | string | Customer user ID. If omitted, falls back to authenticated user. Example: |
time_filter | string | Allowed: all (default), past, future. Example: |
sort | string | For all: Example: |
page | string | Page number (1-based). Example: |
limit | string | Items per page (max 100). Example: |
from_dateOptional | string | Filter sessions by Example: |
to_dateOptional | string | Filter sessions by Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/sessions?user_id=${USER_ID}&time_filter=all&sort=desc&page=1&limit=20&from_date=${FROM_DATE}&to_date=${TO_DATE}" \2 --header "Content-Type: application/json"Response examples
No saved response example. Use Try it to inspect a staging response.
List Sessions By Location
/restaurant/locations/{{location_id}}/sessionsBrowse dining sessions at a restaurant location for operational review.
Path parameters
| Parameter | Type | Description |
|---|---|---|
location_idRequired | string | Variable used inside the request path. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
time_filter | string | Allowed: all (default), past, future. Example: |
sort | string | For all: Example: |
page | string | Page number (1-based). Example: |
limit | string | Items per page (max 100). Example: |
from_dateOptional | string | Filter sessions by Example: |
to_dateOptional | string | Filter sessions by Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATION_ID}/sessions?time_filter=all&sort=desc&page=1&limit=20&from_date=${FROM_DATE}&to_date=${TO_DATE}" \2 --header "Content-Type: application/json"Response examples
No saved response example. Use Try it to inspect a staging response.
Close Session
/restaurant/sessions/:sessionId/closeClose a dine-in session and record its closing time.
Path parameters
| Parameter | Type | Description |
|---|---|---|
sessionIdRequired | string | Dynamic path value from the request URL. |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/sessions/${SESSIONID}/close"Response examples
No saved response example. Use Try it to inspect a staging response.