Skip to main content

Menus

10 API calls in this section.

List Menus​

Restaurant Menu / Menus
GET/restaurant/locations/:locationId/menus

Lists menus for a location with pagination and optional search. Includes is_available computed field.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 20

searchstring—
langstring

Example: en

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?page=1&limit=20&search=&lang=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{menuId}}",6      "name": {7        "en": "Lunch"8      },9      "activation_mode": "automatic",10      "manual_is_active": false,11      "is_published": true,12      "is_available": true13    }14  ],15  "page": 1,16  "limit": 20,17  "total": 118}

Get Menu​

Restaurant Menu / Menus
GET/restaurant/menus/:menuId

Get a menu by ID. Includes is_available.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

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/menus/${MENUID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{menuId}}",5    "location_id": "{{locationId}}",6    "name": {7      "en": "Lunch"8    },9    "activation_mode": "automatic",10    "manual_is_active": false,11    "is_published": true,12    "is_available": true13  }14}

Create Menu​

Restaurant Menu / Menus
POST/restaurant/locations/:locationId/menus

Create a new menu. activation_mode can be 'automatic' or 'manual'.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
descriptionobject—
description.enstring—
imagestring—
activation_modestring—
manual_is_activeboolean—
is_publishedboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/menus" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "name": {6    "en": "Lunch"7  },8  "description": {9    "en": "Lunch Menu"10  },11  "image": "https://example.com/menu.jpg",12  "activation_mode": "automatic",13  "manual_is_active": false,14  "is_published": true15}'

Response examples

201Created
Response body
text
1{ "success": true, "data": { "id": "{{menuId}}", ... } }

Update Menu​

Restaurant Menu / Menus
PUT/restaurant/menus/:menuId

Update menu details.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
is_publishedboolean—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/menus/${MENUID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "name": {6    "en": "Lunch Special"7  },8  "is_published": true9}'

Response examples

200OK
Response body
text
1{ "success": true, "data": { ... } }

Delete Menu​

Restaurant Menu / Menus
DELETE/restaurant/menus/:menuId

Soft delete a menu.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{menuId}}",5    "deleted_at": "..."6  }7}

Link Products to Menu​

Restaurant Menu / Menus
POST/restaurant/menus/:menuId/products

Link multiple products to a menu. Idempotent upsert.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
product_idsarray<string>—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/menus/${MENUID}/products" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "product_ids": [6    "{{productId1}}",7    "{{productId2}}"8  ]9}'

Replace {{placeholders}} with your own values before sending.

Response examples

200OK
Response body
text
1{ "success": true, "data": [ ... ] }

List Products in Menu​

Restaurant Menu / Menus
GET/restaurant/menus/:menuId/products

List products linked to a specific menu.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 20

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/menus/${MENUID}/products?page=1&limit=20" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
text
1{ "success": true, "data": [ ... ], "page": 1, "limit": 20, "total": 5 }

Pause Menu​

Restaurant Menu / Menus
POST/restaurant/menus/:menuId/pause

Temporarily pause the menu (deactivate current time window). Requires automatic schedule mode.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Menu paused successfully"4}

Resume Menu​

Restaurant Menu / Menus
POST/restaurant/menus/:menuId/resume

Resume the menu (reactivate current time window) if manually paused.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Menu resumed successfully"4}

Set Menu State​

Restaurant Menu / Menus
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    "activation_mode": "manual",6    "manual_is_active": true7  }8}