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.

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/sessions" \2  --header "Content-Type: application/json" \3  --header "Content-Type: application/json" \4  --data '{5  "location_id": "{{location_id}}",6  "slug": "{{slug}}",7  "table_id": "{{table_id}}",8  "customer_id": "{{customer_id}}",9  "started_at": "{{started_at}}",10  "closed_at": "{{closed_at}}",11  "note": "{{note}}"12}'
Request body
json
1{2  "location_id": "{{location_id}}",3  "slug": "{{slug}}",4  "table_id": "{{table_id}}",5  "customer_id": "{{customer_id}}",6  "started_at": "{{started_at}}",7  "closed_at": "{{closed_at}}",8  "note": "{{note}}"9}

Request body fields

location_idExample
string

Example field from the request body.

slugExample
string

Example field from the request body.

table_idExample
string

Example field from the request body.

customer_idExample
string

Example field from the request body.

started_atExample
string

Example field from the request body.

closed_atExample
string

Example field from the request body.

noteExample
string

Example field from the request body.

Headers

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

List Sessions (by user)

Public APIs / Public / Sessions
GET/restaurant/sessions?time_filter={{time_filter}}&sort={{sort}}&page={{page}}&limit={{limit}}

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

Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/sessions?time_filter={{time_filter}}&sort={{sort}}&page={{page}}&limit={{limit}}" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Query parameters

time_filterOptional
query string

{{time_filter}}

CSV of past,present,future

sortOptional
query string

{{sort}}

asc|desc

pageOptional
query string

{{page}}

limitOptional
query string

{{limit}}

Responses

No response example is available for this endpoint yet.

Close Session

Public APIs / Public / Sessions
POST/restaurant/sessions/:session_id/close
Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/sessions/:session_id/close" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"

Path parameters

session_idRequired
path string

Responses

No response example is available for this endpoint yet.