Skip to main content

Categories

5 API calls in this section.

Create Category​

Restaurant Menu / Categories
POST/restaurant/locations/:locationId/categories

Add a product category to a restaurant location, optionally beneath a parent category.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
parent_idnull—
nameobject—
name.enstring—
descriptionobject—
is_activeboolean—
sort_ordernumber—
category_imagestring—
Staging
Request
curl
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 Menu / Categories
PUT/restaurant/categories/:id

Change a restaurant category’s name, parent, display order, image or active state.

Path parameters

ParameterTypeDescription
idRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
parent_idnull—
nameobject—
name.enstring—
descriptionobject—
is_activeboolean—
sort_ordernumber—
category_imagestring—
Staging
Request
curl
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 Menu / Categories
GET/restaurant/locations/:locationId/categories

Browse a location’s product categories using parent, availability and search filters.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
root_categorystring

Set 'true' to fetch only root categories (ignores parent_id if true).

Example: true

parent_idstring

Use 'null' (string) to filter root categories (ignored if root_category=true)

Example: {{parent_id}}

is_activestring

Example: {{is_active}}

searchstring

Example: {{search}}

includeAvailableCountsstring

Include count of currently available products per category (uses availability view)

Example: true

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}/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 Menu / Categories
GET/restaurant/categories/:id

Read a restaurant category with its product count.

Path parameters

ParameterTypeDescription
idRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
active_onlystring

Example: true

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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 Menu / Categories
DELETE/restaurant/categories/:id

Remove a category from the restaurant’s catalog organization.

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

Response examples

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