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.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
is_manual_modeboolean—
manual_is_openboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/state" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "is_manual_mode": true,6  "manual_is_open": false7}'

Response examples

200OK
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.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
activation_modestring—
manual_is_activeboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/menus/${MENUID}/state" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "activation_mode": "manual",6  "manual_is_active": true7}'

Response examples

200OK
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.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/menus/active" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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

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

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
category_idstring

Example: {{category_id}}

limitstring

Example: 12

pagestring

Example: 1

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/products/available?category_id=${CATEGORY_ID}&limit=12&page=1" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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

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

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
atstring

Example: 2025-12-25T12:00:00Z

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/products/available?at=2025-12-25T12:00:00Z" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

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