Sessions
4 API calls in this section.
Create Session
/restaurant/sessions1curl --request POST "$ONDI_BASE_URL/restaurant/sessions" \2 --header "Content-Type: application/json" \3 --header "Content-Type: application/json" \4 --data '{5 "table_id": "{{table_id}}",6 "slug": "{{slug}}",7 "started_at": "2024-01-01T12:00:00Z",8 "closed_at": "2024-01-01T14:00:00Z",9 "note": "Optional note about this session"10}'1{2 "table_id": "{{table_id}}",3 "slug": "{{slug}}",4 "started_at": "2024-01-01T12:00:00Z",5 "closed_at": "2024-01-01T14:00:00Z",6 "note": "Optional note about this session"7}Request body fields
table_idExampleExample field from the request body.
slugExampleExample field from the request body.
started_atExampleExample field from the request body.
closed_atExampleExample field from the request body.
noteExampleExample field from the request body.
Headers
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Sessions By User
/restaurant/sessions?user_id={{user_id}}&time_filter=all&sort=desc&page=1&limit=20&from_date={{from_date}}&to_date={{to_date}}1curl --request GET "$ONDI_BASE_URL/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"Query parameters
user_idOptional{{user_id}}
Customer user ID. If omitted, falls back to authenticated user.
time_filterOptionalall
Allowed: all (default), past, future.
sortOptionaldesc
For all: created_at asc|desc (default desc). For past: started_at latest first. For future: started_at soonest first.
pageOptional1
Page number (1-based).
limitOptional20
Items per page (max 100).
from_dateOptional{{from_date}}
Filter sessions by started_at >= from_date (ISO datetime). Optional.
to_dateOptional{{to_date}}
Filter sessions by started_at <= to_date (ISO datetime). Optional.
Headers
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Sessions By Location
/restaurant/locations/{{location_id}}/sessions?time_filter=all&sort=desc&page=1&limit=20&from_date={{from_date}}&to_date={{to_date}}1curl --request GET "$ONDI_BASE_URL/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"Path parameters
location_idRequiredVariable used inside the request path.
Query parameters
time_filterOptionalall
Allowed: all (default), past, future.
sortOptionaldesc
For all: created_at asc|desc (default desc). For past: started_at latest first. For future: started_at soonest first.
pageOptional1
Page number (1-based).
limitOptional20
Items per page (max 100).
from_dateOptional{{from_date}}
Filter sessions by started_at >= from_date (ISO datetime). Optional.
to_dateOptional{{to_date}}
Filter sessions by started_at <= to_date (ISO datetime). Optional.
Headers
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Close Session
/restaurant/sessions/:sessionId/close1curl --request PUT "$ONDI_BASE_URL/restaurant/sessions/:sessionId/close" \2 --header "Authorization: Bearer $ONDI_ACCESS_TOKEN"Path parameters
sessionIdRequiredResponses
No response example is available for this endpoint yet.