Skip to main content

Products

12 API calls in this section.

Create Product​

Restaurant Menu / Products
POST/restaurant/locations/:locationId/products

Add a menu product to a restaurant location with pricing, categories and menu assignments.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
category_idsarray<string>—
nameobject—
name.enstring—
descriptionobject—
pricenumber—
has_variantboolean—
skunull—
ingredientsarray<string>—
is_activeboolean—
tagsarray<string>—
imagesarray—
menu_idsarray<string>—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/products" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "category_ids": [6    "{{categoryId1}}",7    "{{categoryId2}}"8  ],9  "name": {10    "en": "Cheeseburger"11  },12  "description": {},13  "price": 9.99,14  "has_variant": false,15  "sku": null,16  "ingredients": [17    "beef",18    "cheese"19  ],20  "is_active": true,21  "tags": [22    "popular"23  ],24  "images": [],25  "menu_ids": [26    "{{menuId1}}",27    "{{menuId2}}"28  ]29}'

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

Response examples

No saved response example. Use Try it to inspect a staging response.

Update Product​

Restaurant Menu / Products
PUT/restaurant/products/:id

Change a restaurant product’s catalog details, pricing, categories or menu assignments.

Path parameters

ParameterTypeDescription
idRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
category_idsarray<string>—
nameobject—
name.enstring—
descriptionobject—
pricenumber—
has_variantboolean—
skunull—
ingredientsarray<string>—
is_activeboolean—
tagsarray<string>—
imagesarray—
menu_idsarray<string>—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/products/${ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "category_ids": [6    "{{categoryId1}}",7    "{{categoryId3}}"8  ],9  "name": {10    "en": "Cheeseburger Deluxe"11  },12  "description": {},13  "price": 10.99,14  "has_variant": false,15  "sku": null,16  "ingredients": [17    "beef",18    "cheese"19  ],20  "is_active": true,21  "tags": [22    "popular"23  ],24  "images": [],25  "menu_ids": [26    "{{menuId1}}",27    "{{menuId3}}"28  ]29}'

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

Response examples

No saved response example. Use Try it to inspect a staging response.

Delete Product​

Restaurant Menu / Products
DELETE/restaurant/products/:id

Remove a product from the restaurant catalog.

Path parameters

ParameterTypeDescription
idRequiredstring

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

Response examples

No saved response example. Use Try it to inspect a staging response.

List Products by Location​

Restaurant Menu / Products
GET/restaurant/locations/:locationId/products

Browse a location’s products using category, menu, availability and search filters.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
category_idsstring

Example: {{categoryId1}},{{categoryId2}}

menu_idsstring

Example: {{menuId1}}

modifier_group_idsstring

Example: {{modifierGroupId}}

is_activestring

Example: true

searchstring

Example: {{search}}

langstring

Example: en

sortstring

Example: created_at

orderstring

Example: desc

pagestring

Example: 1

limitstring

Example: 10

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?category_ids=${CATEGORYID1},${CATEGORYID2}&menu_ids=${MENUID1}&is_active=true&search=${SEARCH}&lang=en&sort=created_at&order=desc&page=1&limit=10" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

Get Product​

Restaurant Menu / Products
GET/restaurant/products/:id

Read the details of one restaurant product for its product or editing view.

Path parameters

ParameterTypeDescription
idRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
location_idstring

Example: {{location_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/products/${ID}?location_id=${LOCATION_ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

Create Variant​

Restaurant Menu / Products
POST/restaurant/products/:productId/variants

Add a separately priced variant to a restaurant product, such as a size or portion.

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
descriptionobject—
pricenumber—
skunull—
ingredientsarray<string>—
is_activeboolean—
is_primaryboolean—
imagesarray—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/products/${PRODUCTID}/variants" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "name": {6    "en": "Regular"7  },8  "description": {},9  "price": 8.99,10  "sku": null,11  "ingredients": [12    "beef",13    "cheese"14  ],15  "is_active": true,16  "is_primary": true,17  "images": []18}'

Response examples

No saved response example. Use Try it to inspect a staging response.

Update Variant​

Restaurant Menu / Products
PUT/restaurant/products/:productId/variants/:variantId

Change a product variant’s name, price, ingredients or availability.

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

variantIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
descriptionobject—
pricenumber—
skunull—
ingredientsarray<string>—
is_activeboolean—
is_primaryboolean—
imagesarray—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/products/${PRODUCTID}/variants/${VARIANTID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "name": {6    "en": "Large"7  },8  "description": {},9  "price": 10.99,10  "sku": null,11  "ingredients": [12    "beef",13    "cheese"14  ],15  "is_active": true,16  "is_primary": false,17  "images": []18}'

Response examples

No saved response example. Use Try it to inspect a staging response.

Delete Variant​

Restaurant Menu / Products
DELETE/restaurant/products/:productId/variants/:variantId

Remove a variant from its restaurant product.

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

variantIdRequiredstring

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/products/${PRODUCTID}/variants/${VARIANTID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

Create Variants (Bulk)​

Restaurant Menu / Products
POST/restaurant/products/:productId/variants/bulk

Add several variants to the same restaurant product in one request.

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
descriptionobject—
pricenumber—
skunull—
ingredientsarray<string>—
is_activeboolean—
is_primaryboolean—
imagesarray—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/products/${PRODUCTID}/variants/bulk" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '[5  {6    "name": {7      "en": "Regular"8    },9    "description": {},10    "price": 8.99,11    "sku": null,12    "ingredients": [13      "beef",14      "cheese"15    ],16    "is_active": true,17    "is_primary": true,18    "images": []19  },20  {21    "name": {22      "en": "Large"23    },24    "description": {},25    "price": 10.99,26    "sku": null,27    "ingredients": [28      "beef",29      "cheese"30    ],31    "is_active": true,32    "is_primary": false,33    "images": []34  }35]'

Response examples

No saved response example. Use Try it to inspect a staging response.

List Variants​

Restaurant Menu / Products
GET/restaurant/products/:productId/variants

Browse a restaurant product’s variants, with availability, sorting and pagination options.

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
is_activestring

Example: true

sortstring

Example: created_at

orderstring

Example: desc

pagestring

Example: 1

limitstring

Example: 25

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/products/${PRODUCTID}/variants?is_active=true&sort=created_at&order=desc&page=1&limit=25" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

No saved response example. Use Try it to inspect a staging response.

Link Product to Menus​

Restaurant Menu / Products
POST/restaurant/products/:productId/menus

Links a product to multiple menus (idempotent).

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

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

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "product_id": "{{productId}}",6      "menu_id": "{{menuId1}}"7    },8    {9      "product_id": "{{productId}}",10      "menu_id": "{{menuId2}}"11    }12  ]13}

Unlink Product from Menus​

Restaurant Menu / Products
POST/restaurant/products/:productId/menus/remove

Unlinks a product from multiple menus.

Path parameters

ParameterTypeDescription
productIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

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

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "count": 25  }6}