Skip to main content

Orders (Admin/Public)

12 API calls in this section.

Create Order from Cart (Dine-in)​

Restaurant Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders

Submit a dine-in cart as an order associated with a table and dining session.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
cart_idstring—
order_typestring—
payment_method_idstring—
table_idstring—
session_idstring—
tip_amountnumber—
notesnull—
Staging
Request
curl
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 Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders

Submit a cart as a takeout order using the selected payment method.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
cart_idstring—
order_typestring—
payment_method_idstring—
tip_amountnumber—
notesnull—
delivery_dataobject—
delivery_data.contact_infoobject—
delivery_data.contact_info.namestring—
delivery_data.contact_info.phonestring—
Staging
Request
curl
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)​

Restaurant Menu / Orders (Admin/Public)
POST/public/restaurant/:slug/cart/calculate-fee

Calculate the restaurant cart’s delivery fee for a destination address before checkout.

Path parameters

ParameterTypeDescription
slugRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
addressobject—
address.latnumber—
address.lngnumber—
Staging
Request
curl
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 Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders

Submit a delivery cart using wallet payment and the supplied delivery details.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
cart_idstring—
order_typestring—
payment_method_idstring—
tip_amountnumber—
notesnull—
delivery_dataobject—
delivery_data.addressobject—
delivery_data.address.full_addressstring—
delivery_data.address.latnumber—
delivery_data.address.lngnumber—
delivery_data.contact_infoobject—
delivery_data.contact_info.namestring—
Show 1 more body fields

Additional body parameters

ParameterTypeDescription
delivery_data.contact_info.phonestring—
Staging
Request
curl
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 Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders

Submit a delivery cart using an online payment method and a payment return reference.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
cart_idstring—
order_typestring—
payment_method_idstring—
payment_back_refstring—
tip_amountnumber—
notesnull—
delivery_dataobject—
delivery_data.addressobject—
delivery_data.address.full_addressstring—
delivery_data.address.latnumber—
delivery_data.address.lngnumber—
delivery_data.contact_infoobject—
Show 2 more body fields

Additional body parameters

ParameterTypeDescription
delivery_data.contact_info.namestring—
delivery_data.contact_info.phonestring—
Staging
Request
curl
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 Menu / Orders (Admin/Public)
GET/restaurant/orders

Browse a restaurant location’s orders by status group and date range.

Query parameters

ParameterTypeDescription
location_idstring

Example: {{location_id}}

status_groupstring

active|completed. completed => served, delivered, closed

Example: completed

from_datestring

Date-only (YYYY-MM-DD). Inclusive day range. Filters by restaurant_orders.created_at

to_datestring

Date-only (YYYY-MM-DD). Inclusive day range. Filters by restaurant_orders.created_at

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/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 Menu / Orders (Admin/Public)
GET/restaurant/orders/:orderId

Read one restaurant order for order-detail or operational views.

Path parameters

ParameterTypeDescription
orderIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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 Menu / Orders (Admin/Public)
POST/restaurant/orders/:orderId/status

Change a restaurant order’s status and optionally record a note about the change.

Path parameters

ParameterTypeDescription
orderIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
statusstring—
notestring—
Staging
Request
curl
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 Menu / Orders (Admin/Public)
POST/restaurant/orders/:orderId/print

Request the order print acknowledgement. The current handler returns the order ID and printed flag; it does not dispatch a printer job.

Path parameters

ParameterTypeDescription
orderIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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​

Restaurant Menu / Orders (Admin/Public)
POST/public/restaurant/:slug/cart/attach

Associate an existing restaurant cart with the signed-in customer after login.

Path parameters

ParameterTypeDescription
slugRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
cart_idstring—
Staging
Request
curl
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 Menu / Orders (Admin/Public)
GET/restaurant/:slug/payment-methods

Read the payment methods configured for the restaurant identified by its slug.

Path parameters

ParameterTypeDescription
slugRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{admin_token}}

Staging
Request
curl
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 Menu / Orders (Admin/Public)
PUT/restaurant/:slug/payment-methods

Create or update a restaurant payment method and its active state.

Path parameters

ParameterTypeDescription
slugRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{admin_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
method_typestring—
is_activeboolean—
Staging
Request
curl
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.