Categories
5 API calls in this section.
Create Category
/restaurant/locations/:locationId/categoriesAdd a product category to a restaurant location, optionally beneath a parent category.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
parent_id | null | — |
name | object | — |
name.en | string | — |
description | object | — |
is_active | boolean | — |
sort_order | number | — |
category_image | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/categories" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "parent_id": null,6 "name": {7 "en": "Burgers"8 },9 "description": {},10 "is_active": true,11 "sort_order": 0,12 "category_image": "https://example.com/cat.jpg"13}'Response examples
No saved response example. Use Try it to inspect a staging response.
Update Category
/restaurant/categories/:idChange a restaurant category’s name, parent, display order, image or active state.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
parent_id | null | — |
name | object | — |
name.en | string | — |
description | object | — |
is_active | boolean | — |
sort_order | number | — |
category_image | string | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/categories/${ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "parent_id": null,6 "name": {7 "en": "Burgers & Sandwiches"8 },9 "description": {},10 "is_active": true,11 "sort_order": 10,12 "category_image": "https://example.com/cat-new.jpg"13}'Response examples
No saved response example. Use Try it to inspect a staging response.
List Categories (with filters)
/restaurant/locations/:locationId/categoriesBrowse a location’s product categories using parent, availability and search filters.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
root_category | string | Set 'true' to fetch only root categories (ignores Example: |
parent_id | string | Use 'null' (string) to filter root categories (ignored if Example: |
is_active | string | Example: |
search | string | Example: |
includeAvailableCounts | string | Include count of currently available products per category (uses availability view) Example: |
page | string | Example: |
limit | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/categories?root_category=true&parent_id=${PARENT_ID}&is_active=${IS_ACTIVE}&search=${SEARCH}&includeAvailableCounts=true&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 Category (with count)
/restaurant/categories/:idRead a restaurant category with its product count.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Dynamic path value from the request URL. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
active_only | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/categories/${ID}?active_only=true" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Delete Category
/restaurant/categories/:idRemove a category from the restaurant’s catalog organization.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/restaurant/categories/${ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.