Orders (Admin/Public)
12 API calls in this section.
Create Order from Cart (Dine-in)
/restaurant/locations/:locationId/ordersSubmit a dine-in cart as an order associated with a table and dining session.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
cart_id | string | — |
order_type | string | — |
payment_method_id | string | — |
table_id | string | — |
session_id | string | — |
tip_amount | number | — |
notes | null | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/orders" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "cart_id": "{{cart_id}}",6 "order_type": "dine_in",7 "payment_method_id": "{{pay_at_counter_payment_method_id}}",8 "table_id": "{{table_id}}",9 "session_id": "{{session_id}}",10 "tip_amount": 0,11 "notes": null12}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.
Create Order from Cart (Take-out)
/restaurant/locations/:locationId/ordersSubmit a cart as a takeout order using the selected payment method.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
cart_id | string | — |
order_type | string | — |
payment_method_id | string | — |
tip_amount | number | — |
notes | null | — |
delivery_data | object | — |
delivery_data.contact_info | object | — |
delivery_data.contact_info.name | string | — |
delivery_data.contact_info.phone | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/orders" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "cart_id": "{{cart_id}}",6 "order_type": "take_out",7 "payment_method_id": "{{pay_at_counter_payment_method_id}}",8 "tip_amount": 0,9 "notes": null,10 "delivery_data": {11 "contact_info": {12 "name": "Walk-in Customer",13 "phone": "+971500000000"14 }15 }16}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.
Calculate Delivery Fee (Public)
/public/restaurant/:slug/cart/calculate-feeCalculate the restaurant cart’s delivery fee for a destination address before checkout.
Path parameters
| Parameter | Type | Description |
|---|---|---|
slugRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
address | object | — |
address.lat | number | — |
address.lng | number | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/public/restaurant/${SLUG}/cart/calculate-fee" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "address": {6 "lat": 25.2048,7 "lng": 55.27088 }9}'Response examples
No saved response example. Use Try it to inspect a staging response.
Create Order from Cart (Delivery - Wallet)
/restaurant/locations/:locationId/ordersSubmit a delivery cart using wallet payment and the supplied delivery details.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
cart_id | string | — |
order_type | string | — |
payment_method_id | string | — |
tip_amount | number | — |
notes | null | — |
delivery_data | object | — |
delivery_data.address | object | — |
delivery_data.address.full_address | string | — |
delivery_data.address.lat | number | — |
delivery_data.address.lng | number | — |
delivery_data.contact_info | object | — |
delivery_data.contact_info.name | string | — |
Show 1 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
delivery_data.contact_info.phone | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/orders" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "cart_id": "{{cart_id}}",6 "order_type": "delivery",7 "payment_method_id": "{{wallet_payment_method_id}}",8 "tip_amount": 0,9 "notes": null,10 "delivery_data": {11 "address": {12 "full_address": "123 Main St, City",13 "lat": 25.2048,14 "lng": 55.270815 },16 "contact_info": {17 "name": "Delivery Customer",18 "phone": "+971500000000"19 }20 }21}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.
Create Order from Cart (Delivery - Online Gateway)
/restaurant/locations/:locationId/ordersSubmit a delivery cart using an online payment method and a payment return reference.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
cart_id | string | — |
order_type | string | — |
payment_method_id | string | — |
payment_back_ref | string | — |
tip_amount | number | — |
notes | null | — |
delivery_data | object | — |
delivery_data.address | object | — |
delivery_data.address.full_address | string | — |
delivery_data.address.lat | number | — |
delivery_data.address.lng | number | — |
delivery_data.contact_info | object | — |
Show 2 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
delivery_data.contact_info.name | string | — |
delivery_data.contact_info.phone | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/orders" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "cart_id": "{{cart_id}}",6 "order_type": "delivery",7 "payment_method_id": "{{online_payment_method_id}}",8 "payment_back_ref": "https://yourapp.com/payments/return",9 "tip_amount": 0,10 "notes": null,11 "delivery_data": {12 "address": {13 "full_address": "123 Main St, City",14 "lat": 25.2048,15 "lng": 55.270816 },17 "contact_info": {18 "name": "Delivery Customer",19 "phone": "+971500000000"20 }21 }22}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.
List Orders (Admin)
/restaurant/ordersBrowse a restaurant location’s orders by status group and date range.
Query parameters
| Parameter | Type | Description |
|---|---|---|
location_id | string | Example: |
status_group | string | active|completed. completed => served, delivered, closed Example: |
from_date | string | Date-only (YYYY-MM-DD). Inclusive day range. Filters by |
to_date | string | Date-only (YYYY-MM-DD). Inclusive day range. Filters by |
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/orders?location_id=${LOCATION_ID}&status_group=completed&from_date=&to_date=&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 Order
/restaurant/orders/:orderIdRead one restaurant order for order-detail or operational views.
Path parameters
| Parameter | Type | Description |
|---|---|---|
orderIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/orders/${ORDERID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Update Order Status (Admin)
/restaurant/orders/:orderId/statusChange a restaurant order’s status and optionally record a note about the change.
Path parameters
| Parameter | Type | Description |
|---|---|---|
orderIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
status | string | — |
note | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/orders/${ORDERID}/status" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "status": "preparing",6 "note": "Start cooking"7}'Response examples
No saved response example. Use Try it to inspect a staging response.
Print Order (Admin)
/restaurant/orders/:orderId/printRequest the order print acknowledgement. The current handler returns the order ID and printed flag; it does not dispatch a printer job.
Path parameters
| Parameter | Type | Description |
|---|---|---|
orderIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/orders/${ORDERID}/print" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Attach Cart (Public) - requires login
/public/restaurant/:slug/cart/attachAssociate an existing restaurant cart with the signed-in customer after login.
Path parameters
| Parameter | Type | Description |
|---|---|---|
slugRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
cart_id | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/public/restaurant/${SLUG}/cart/attach" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "cart_id": "{{cart_id}}"6}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.
List Payment Methods (Tenant Admin, slug-based)
/restaurant/:slug/payment-methodsRead the payment methods configured for the restaurant identified by its slug.
Path parameters
| Parameter | Type | Description |
|---|---|---|
slugRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/${SLUG}/payment-methods" \2 --header "Authorization: Bearer ${ADMIN_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Upsert Payment Method (Tenant/Slug)
/restaurant/:slug/payment-methodsCreate or update a restaurant payment method and its active state.
Path parameters
| Parameter | Type | Description |
|---|---|---|
slugRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
method_type | string | — |
is_active | boolean | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/${SLUG}/payment-methods" \2 --header "Authorization: Bearer ${ADMIN_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "method_type": "online",6 "is_active": true7}'Response examples
No saved response example. Use Try it to inspect a staging response.