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.
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_idExamplestring
Example field from the request body.
slugExamplestring
Example field from the request body.
table_idExamplestring
Example field from the request body.
customer_idExamplestring
Example field from the request body.
started_atExamplestring
Example field from the request body.
closed_atExamplestring
Example field from the request body.
noteExamplestring
Example field from the request body.
Headers
Content-TypeOptionalheader 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_filterOptionalquery string
{{time_filter}}
CSV of past,present,future
sortOptionalquery string
{{sort}}
asc|desc
pageOptionalquery string
{{page}}
limitOptionalquery string
{{limit}}
Responses
No response example is available for this endpoint yet.
Close Session
Public APIs / Public / Sessions
POST
/restaurant/sessions/:session_id/closeMost 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_idRequiredpath string
Responses
No response example is available for this endpoint yet.