Skip to main content

Sessions

3 API calls in this section.

Create Dine-In Session​

Public APIs / Public / Sessions
POST/restaurant/sessions

Creates a dine-in session. The opener is the authenticated user. Optional customer_id can be passed; otherwise it falls back to opener.

Headers

ParameterTypeDescription
Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
location_idstring—
slugstring—
table_idstring—
customer_idstring—
started_atstring—
closed_atstring—
notestring—
Staging
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/sessions

Lists sessions for the authenticated user (or user_id query if allowed).

Query parameters

ParameterTypeDescription
time_filterstring

CSV of past,present,future

Example: {{time_filter}}

sortstring

asc|desc

Example: {{sort}}

pagestring

Example: {{page}}

limitstring

Example: {{limit}}

Staging
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/close

Close a restaurant dining session and record its closing time.

Path parameters

ParameterTypeDescription
session_idRequiredstring

Dynamic path value from the request URL.

Staging
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.