Skip to main content

Menus

10 API calls in this section.

List Menus

Restaurant Menu / Menus
GET/restaurant/locations/:locationId/menus?page=1&limit=20&search=&lang=en

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

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

Path parameters

locationIdRequired
path string

Query parameters

pageOptional
query string

1

limitOptional
query string

20

searchOptional
query string
langOptional
query string

en

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

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

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

Path parameters

menuIdRequired
path string

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    "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'.

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/menus" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "name": {3    "en": "Lunch"4  },5  "description": {6    "en": "Lunch Menu"7  },8  "image": "https://example.com/menu.jpg",9  "activation_mode": "automatic",10  "manual_is_active": false,11  "is_published": true12}

Path parameters

locationIdRequired
path string

Request body fields

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

descriptionExample
object

Example field from the request body.

description.enExample
string

Example field from the request body.

imageExample
string

Example field from the request body.

activation_modeExample
string

Example field from the request body.

manual_is_activeExample
boolean

Example field from the request body.

is_publishedExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

201 Created201Created
Response body
json
1{ "success": true, "data": { "id": "{{menuId}}", ... } }

Update Menu

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

Update menu details.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/menus/:menuId" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "name": {6    "en": "Lunch Special"7  },8  "is_published": true9}'
Request body
json
1{2  "name": {3    "en": "Lunch Special"4  },5  "is_published": true6}

Path parameters

menuIdRequired
path string

Request body fields

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

is_publishedExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{ "success": true, "data": { ... } }

Delete Menu

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

Soft delete a menu.

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

Path parameters

menuIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

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

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/products" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "product_ids": [6    "{{productId1}}",7    "{{productId2}}"8  ]9}'
Request body
json
1{2  "product_ids": [3    "{{productId1}}",4    "{{productId2}}"5  ]6}

Path parameters

menuIdRequired
path string

Request body fields

product_idsExample
array<string>

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{ "success": true, "data": [ ... ] }

List Products in Menu

Restaurant Menu / Menus
GET/restaurant/menus/:menuId/products?page=1&limit=20

List products linked to a specific menu.

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

Path parameters

menuIdRequired
path string

Query parameters

pageOptional
query string

1

limitOptional
query string

20

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
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.

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/pause" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

menuIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

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

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/resume" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

menuIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

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

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