Skip to main content

Products

12 API calls in this section.

Create Product

Restaurant Menu / Products
POST/restaurant/locations/:locationId/products
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/products" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "category_ids": [3    "{{categoryId1}}",4    "{{categoryId2}}"5  ],6  "name": {7    "en": "Cheeseburger"8  },9  "description": {},10  "price": 9.99,11  "has_variant": false,12  "sku": null,13  "ingredients": [14    "beef",15    "cheese"16  ],17  "is_active": true,18  "tags": [19    "popular"20  ],21  "images": [],22  "menu_ids": [23    "{{menuId1}}",24    "{{menuId2}}"25  ]26}

Path parameters

locationIdRequired
path string

Request body fields

category_idsExample
array<string>

Example field from the request body.

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.

priceExample
number

Example field from the request body.

has_variantExample
boolean

Example field from the request body.

skuExample
null

Example field from the request body.

ingredientsExample
array<string>

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

tagsExample
array<string>

Example field from the request body.

imagesExample
array

Example field from the request body.

menu_idsExample
array<string>

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Update Product

Restaurant Menu / Products
PUT/restaurant/products/:id
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/products/:id" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "category_ids": [3    "{{categoryId1}}",4    "{{categoryId3}}"5  ],6  "name": {7    "en": "Cheeseburger Deluxe"8  },9  "description": {},10  "price": 10.99,11  "has_variant": false,12  "sku": null,13  "ingredients": [14    "beef",15    "cheese"16  ],17  "is_active": true,18  "tags": [19    "popular"20  ],21  "images": [],22  "menu_ids": [23    "{{menuId1}}",24    "{{menuId3}}"25  ]26}

Path parameters

idRequired
path string

Request body fields

category_idsExample
array<string>

Example field from the request body.

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.

priceExample
number

Example field from the request body.

has_variantExample
boolean

Example field from the request body.

skuExample
null

Example field from the request body.

ingredientsExample
array<string>

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

tagsExample
array<string>

Example field from the request body.

imagesExample
array

Example field from the request body.

menu_idsExample
array<string>

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Delete Product

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

Path parameters

idRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

List Products by Location

Restaurant Menu / Products
GET/restaurant/locations/:locationId/products?category_ids={{categoryId1}},{{categoryId2}}&menu_ids={{menuId1}}&modifier_group_ids={{modifierGroupId}}&is_active=true&search={{search}}&lang=en&sort=created_at&order=desc&page=1&limit=10
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/products?category_ids={{categoryId1}},{{categoryId2}}&menu_ids={{menuId1}}&modifier_group_ids={{modifierGroupId}}&is_active=true&search={{search}}&lang=en&sort=created_at&order=desc&page=1&limit=10" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Query parameters

category_idsOptional
query string

{{categoryId1}},{{categoryId2}}

menu_idsOptional
query string

{{menuId1}}

modifier_group_idsOptional
query string

{{modifierGroupId}}

is_activeOptional
query string

true

searchOptional
query string

{{search}}

langOptional
query string

en

sortOptional
query string

created_at

orderOptional
query string

desc

pageOptional
query string

1

limitOptional
query string

10

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Get Product

Restaurant Menu / Products
GET/restaurant/products/:id?location_id={{location_id}}
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/products/:id?location_id={{location_id}}" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

idRequired
path string

Query parameters

location_idOptional
query string

{{location_id}}

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Create Variant

Restaurant Menu / Products
POST/restaurant/products/:productId/variants
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/products/:productId/variants" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "name": {3    "en": "Regular"4  },5  "description": {},6  "price": 8.99,7  "sku": null,8  "ingredients": [9    "beef",10    "cheese"11  ],12  "is_active": true,13  "is_primary": true,14  "images": []15}

Path parameters

productIdRequired
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.

priceExample
number

Example field from the request body.

skuExample
null

Example field from the request body.

ingredientsExample
array<string>

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

is_primaryExample
boolean

Example field from the request body.

imagesExample
array

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Update Variant

Restaurant Menu / Products
PUT/restaurant/products/:productId/variants/:variantId
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/products/:productId/variants/:variantId" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "name": {3    "en": "Large"4  },5  "description": {},6  "price": 10.99,7  "sku": null,8  "ingredients": [9    "beef",10    "cheese"11  ],12  "is_active": true,13  "is_primary": false,14  "images": []15}

Path parameters

productIdRequired
path string
variantIdRequired
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.

priceExample
number

Example field from the request body.

skuExample
null

Example field from the request body.

ingredientsExample
array<string>

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

is_primaryExample
boolean

Example field from the request body.

imagesExample
array

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Delete Variant

Restaurant Menu / Products
DELETE/restaurant/products/:productId/variants/:variantId
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request DELETE "$ONDI_BASE_URL/restaurant/products/:productId/variants/:variantId" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

productIdRequired
path string
variantIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Create Variants (Bulk)

Restaurant Menu / Products
POST/restaurant/products/:productId/variants/bulk
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/products/:productId/variants/bulk" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '[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]'
Request body
json
1[2  {3    "name": {4      "en": "Regular"5    },6    "description": {},7    "price": 8.99,8    "sku": null,9    "ingredients": [10      "beef",11      "cheese"12    ],13    "is_active": true,14    "is_primary": true,15    "images": []16  },17  {18    "name": {19      "en": "Large"20    },21    "description": {},22    "price": 10.99,23    "sku": null,24    "ingredients": [25      "beef",26      "cheese"27    ],28    "is_active": true,29    "is_primary": false,30    "images": []31  }32]

Path parameters

productIdRequired
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.

priceExample
number

Example field from the request body.

skuExample
null

Example field from the request body.

ingredientsExample
array<string>

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

is_primaryExample
boolean

Example field from the request body.

imagesExample
array

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

List Variants

Restaurant Menu / Products
GET/restaurant/products/:productId/variants?is_active=true&sort=created_at&order=desc&page=1&limit=25
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/products/:productId/variants?is_active=true&sort=created_at&order=desc&page=1&limit=25" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

productIdRequired
path string

Query parameters

is_activeOptional
query string

true

sortOptional
query string

created_at

orderOptional
query string

desc

pageOptional
query string

1

limitOptional
query string

25

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Link Product to Menus

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

Links a product to multiple menus (idempotent).

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/products/:productId/menus" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "menu_ids": [6    "{{menuId1}}",7    "{{menuId2}}"8  ]9}'
Request body
json
1{2  "menu_ids": [3    "{{menuId1}}",4    "{{menuId2}}"5  ]6}

Path parameters

productIdRequired
path string

Request body fields

menu_idsExample
array<string>

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    {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.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/products/:productId/menus/remove" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "menu_ids": [6    "{{menuId1}}",7    "{{menuId2}}"8  ]9}'
Request body
json
1{2  "menu_ids": [3    "{{menuId1}}",4    "{{menuId2}}"5  ]6}

Path parameters

productIdRequired
path string

Request body fields

menu_idsExample
array<string>

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    "count": 25  }6}