Skip to main content

Availability

5 API calls in this section.

Set Location State

Restaurant Menu / Availability
POST/restaurant/locations/:locationId/state

Toggles operational state for a location. When is_manual_mode=true, manual_is_open controls open/closed regardless of schedules.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/locations/:locationId/state" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "is_manual_mode": true,6  "manual_is_open": false7}'
Request body
json
1{2  "is_manual_mode": true,3  "manual_is_open": false4}

Path parameters

locationIdRequired
path string

Request body fields

is_manual_modeExample
boolean

Example field from the request body.

manual_is_openExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{locationId}}",5    "is_manual_mode": true,6    "manual_is_open": false,7    "availability_version": 428  }9}

Set Menu State

Restaurant Menu / Availability
POST/restaurant/menus/:menuId/state

Set a menu to automatic (schedule-driven) or manual (manual_is_active=true/false). Bumps location availability_version by trigger.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/menus/:menuId/state" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "activation_mode": "manual",6  "manual_is_active": true7}'
Request body
json
1{2  "activation_mode": "manual",3  "manual_is_active": true4}

Path parameters

menuIdRequired
path string

Request body fields

activation_modeExample
string

Example field from the request body.

manual_is_activeExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{menuId}}",5    "location_id": "{{locationId}}",6    "activation_mode": "manual",7    "manual_is_active": true8  }9}

List Active Menus

Restaurant Menu / Availability
GET/restaurant/locations/:locationId/menus/active

Returns menus active 'now' in the location time zone. Manual active menus are included.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/locations/:locationId/menus/active" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{menuId}}",6      "location_id": "{{locationId}}",7      "name": {8        "en": "Lunch"9      },10      "activation_mode": "automatic",11      "manual_is_active": false12    }13  ]14}

List Available Products (now)

Restaurant Menu / Availability
GET/restaurant/locations/:locationId/products/available?category_id={{category_id}}&limit=12&page=1

Lists currently available products (Location Open ∧ Any Menu Active ∧ Product Enabled) using optimized RPC.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/locations/:locationId/products/available?category_id={{category_id}}&limit=12&page=1" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Query parameters

category_idOptional
query string

{{category_id}}

limitOptional
query string

12

pageOptional
query string

1

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{productId}}",6      "location_id": "{{locationId}}",7      "category": {8        "id": "{{category_id}}",9        "name": {10          "en": "Burgers"11        }12      },13      "name": {14        "en": "Cheeseburger"15      },16      "description": {},17      "is_active": true,18      "images": [],19      "primary_variant": {20        "id": "{{variantId}}",21        "price": 8.99,22        "is_primary": true23      },24      "variant_count": 2,25      "created_at": "2025-11-10T10:00:00Z"26    }27  ],28  "page": 1,29  "limit": 1230}

List Available Products (at)

Restaurant Menu / Availability
GET/restaurant/locations/:locationId/products/available?at=2025-12-25T12:00:00Z

Lists available products at a specific timestamp (time-travel) using RPC.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/locations/:locationId/products/available?at=2025-12-25T12:00:00Z" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Query parameters

atOptional
query string

2025-12-25T12:00:00Z

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": [ ... ],4  "page": 1,5  "limit": 126}