Sessions
3 API calls in this section.
Create Dine-In Session
Public APIs / Public / Sessions
POST
/restaurant/sessionsCreates a dine-in session. The opener is the authenticated user. Optional customer_id can be passed; otherwise it falls back to opener.
Headers
| Parameter | Type | Description |
|---|---|---|
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
location_id | string | — |
slug | string | — |
table_id | string | — |
customer_id | string | — |
started_at | string | — |
closed_at | string | — |
note | string | — |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/sessions" \2 --header "Content-Type: application/json" \3 --data-raw '{4 "location_id": "{{location_id}}",5 "slug": "{{slug}}",6 "table_id": "{{table_id}}",7 "customer_id": "{{customer_id}}",8 "started_at": "{{started_at}}",9 "closed_at": "{{closed_at}}",10 "note": "{{note}}"11}'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)
Public APIs / Public / Sessions
GET
/restaurant/sessionsLists sessions for the authenticated user (or user_id query if allowed).
Query parameters
| Parameter | Type | Description |
|---|---|---|
time_filter | string | CSV of past,present,future Example: |
sort | string | asc|desc Example: |
page | string | Example: |
limit | string | Example: |
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/sessions?time_filter=${TIME_FILTER}&sort=${SORT}&page=${PAGE}&limit=${LIMIT}"Response examples
No saved response example. Use Try it to inspect a staging response.
Close Session
Public APIs / Public / Sessions
POST
/restaurant/sessions/:session_id/closeClose a restaurant dining session and record its closing time.
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_idRequired | string | Dynamic path value from the request URL. |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/sessions/${SESSION_ID}/close"Response examples
No saved response example. Use Try it to inspect a staging response.