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
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/orders" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "cart_id": "{{cart_id}}",7  "order_type": "dine_in",8  "payment_method_id": "{{pay_at_counter_payment_method_id}}",9  "table_id": "{{table_id}}",10  "session_id": "{{session_id}}",11  "tip_amount": 0,12  "notes": null13}'
Request body
json
1{2  "cart_id": "{{cart_id}}",3  "order_type": "dine_in",4  "payment_method_id": "{{pay_at_counter_payment_method_id}}",5  "table_id": "{{table_id}}",6  "session_id": "{{session_id}}",7  "tip_amount": 0,8  "notes": null9}

Path parameters

locationIdRequired
path string

Request body fields

cart_idExample
string

Example field from the request body.

order_typeExample
string

Example field from the request body.

payment_method_idExample
string

Example field from the request body.

table_idExample
string

Example field from the request body.

session_idExample
string

Example field from the request body.

tip_amountExample
number

Example field from the request body.

notesExample
null

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Create Order from Cart (Take-out)

Restaurant Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders
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/orders" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "cart_id": "{{cart_id}}",7  "order_type": "take_out",8  "payment_method_id": "{{pay_at_counter_payment_method_id}}",9  "tip_amount": 0,10  "notes": null,11  "delivery_data": {12    "contact_info": {13      "name": "Walk-in Customer",14      "phone": "+971500000000"15    }16  }17}'
Request body
json
1{2  "cart_id": "{{cart_id}}",3  "order_type": "take_out",4  "payment_method_id": "{{pay_at_counter_payment_method_id}}",5  "tip_amount": 0,6  "notes": null,7  "delivery_data": {8    "contact_info": {9      "name": "Walk-in Customer",10      "phone": "+971500000000"11    }12  }13}

Path parameters

locationIdRequired
path string

Request body fields

cart_idExample
string

Example field from the request body.

order_typeExample
string

Example field from the request body.

payment_method_idExample
string

Example field from the request body.

tip_amountExample
number

Example field from the request body.

notesExample
null

Example field from the request body.

delivery_dataExample
object

Example field from the request body.

delivery_data.contact_infoExample
object

Example field from the request body.

delivery_data.contact_info.nameExample
string

Example field from the request body.

delivery_data.contact_info.phoneExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Calculate Delivery Fee (Public)

Restaurant Menu / Orders (Admin/Public)
POST/public/restaurant/:slug/cart/calculate-fee
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/public/restaurant/:slug/cart/calculate-fee" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "address": {7    "lat": 25.2048,8    "lng": 55.27089  }10}'
Request body
json
1{2  "address": {3    "lat": 25.2048,4    "lng": 55.27085  }6}

Path parameters

slugRequired
path string

Request body fields

addressExample
object

Example field from the request body.

address.latExample
number

Example field from the request body.

address.lngExample
number

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Create Order from Cart (Delivery - Wallet)

Restaurant Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders
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/orders" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "cart_id": "{{cart_id}}",7  "order_type": "delivery",8  "payment_method_id": "{{wallet_payment_method_id}}",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}'
Request body
json
1{2  "cart_id": "{{cart_id}}",3  "order_type": "delivery",4  "payment_method_id": "{{wallet_payment_method_id}}",5  "tip_amount": 0,6  "notes": null,7  "delivery_data": {8    "address": {9      "full_address": "123 Main St, City",10      "lat": 25.2048,11      "lng": 55.270812    },13    "contact_info": {14      "name": "Delivery Customer",15      "phone": "+971500000000"16    }17  }18}

Path parameters

locationIdRequired
path string

Request body fields

cart_idExample
string

Example field from the request body.

order_typeExample
string

Example field from the request body.

payment_method_idExample
string

Example field from the request body.

tip_amountExample
number

Example field from the request body.

notesExample
null

Example field from the request body.

delivery_dataExample
object

Example field from the request body.

delivery_data.addressExample
object

Example field from the request body.

delivery_data.address.full_addressExample
string

Example field from the request body.

delivery_data.address.latExample
number

Example field from the request body.

delivery_data.address.lngExample
number

Example field from the request body.

delivery_data.contact_infoExample
object

Example field from the request body.

delivery_data.contact_info.nameExample
string

Example field from the request body.

delivery_data.contact_info.phoneExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

Create Order from Cart (Delivery - Online Gateway)

Restaurant Menu / Orders (Admin/Public)
POST/restaurant/locations/:locationId/orders
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/orders" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "cart_id": "{{cart_id}}",7  "order_type": "delivery",8  "payment_method_id": "{{online_payment_method_id}}",9  "payment_back_ref": "https://yourapp.com/payments/return",10  "tip_amount": 0,11  "notes": null,12  "delivery_data": {13    "address": {14      "full_address": "123 Main St, City",15      "lat": 25.2048,16      "lng": 55.270817    },18    "contact_info": {19      "name": "Delivery Customer",20      "phone": "+971500000000"21    }22  }23}'
Request body
json
1{2  "cart_id": "{{cart_id}}",3  "order_type": "delivery",4  "payment_method_id": "{{online_payment_method_id}}",5  "payment_back_ref": "https://yourapp.com/payments/return",6  "tip_amount": 0,7  "notes": null,8  "delivery_data": {9    "address": {10      "full_address": "123 Main St, City",11      "lat": 25.2048,12      "lng": 55.270813    },14    "contact_info": {15      "name": "Delivery Customer",16      "phone": "+971500000000"17    }18  }19}

Path parameters

locationIdRequired
path string

Request body fields

cart_idExample
string

Example field from the request body.

order_typeExample
string

Example field from the request body.

payment_method_idExample
string

Example field from the request body.

payment_back_refExample
string

Example field from the request body.

tip_amountExample
number

Example field from the request body.

notesExample
null

Example field from the request body.

delivery_dataExample
object

Example field from the request body.

delivery_data.addressExample
object

Example field from the request body.

delivery_data.address.full_addressExample
string

Example field from the request body.

delivery_data.address.latExample
number

Example field from the request body.

delivery_data.address.lngExample
number

Example field from the request body.

delivery_data.contact_infoExample
object

Example field from the request body.

delivery_data.contact_info.nameExample
string

Example field from the request body.

delivery_data.contact_info.phoneExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

List Orders (Admin)

Restaurant Menu / Orders (Admin/Public)
GET/restaurant/orders?location_id={{location_id}}&status_group=completed&from_date=&to_date=&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/orders?location_id={{location_id}}&status_group=completed&from_date=&to_date=&page=1&limit=10" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

location_idOptional
query string

{{location_id}}

status_groupOptional
query string

completed

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

from_dateOptional
query string

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

to_dateOptional
query string

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

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 Order

Restaurant Menu / Orders (Admin/Public)
GET/restaurant/orders/:orderId
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/orders/:orderId" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

orderIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Update Order Status (Admin)

Restaurant Menu / Orders (Admin/Public)
POST/restaurant/orders/:orderId/status
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/orders/:orderId/status" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "status": "preparing",6  "note": "Start cooking"7}'
Request body
json
1{2  "status": "preparing",3  "note": "Start cooking"4}

Path parameters

orderIdRequired
path string

Request body fields

statusExample
string

Example field from the request body.

noteExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Print Order (Admin)

Restaurant Menu / Orders (Admin/Public)
POST/restaurant/orders/:orderId/print
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/orders/:orderId/print" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

orderIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Attach Cart (Public) - requires login

Restaurant Menu / Orders (Admin/Public)
POST/public/restaurant/:slug/cart/attach
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/public/restaurant/:slug/cart/attach" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "cart_id": "{{cart_id}}"7}'
Request body
json
1{2  "cart_id": "{{cart_id}}"3}

Path parameters

slugRequired
path string

Request body fields

cart_idExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.

List Payment Methods (Tenant Admin, slug-based)

Restaurant Menu / Orders (Admin/Public)
GET/restaurant/:slug/payment-methods
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/:slug/payment-methods" \2  --header "Authorization: Bearer {{admin_token}}"

Path parameters

slugRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{admin_token}}

Responses

No response example is available for this endpoint yet.

Upsert Payment Method (Tenant/Slug)

Restaurant Menu / Orders (Admin/Public)
PUT/restaurant/:slug/payment-methods
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/:slug/payment-methods" \2  --header "Authorization: Bearer {{admin_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "method_type": "online",7  "is_active": true8}'
Request body
json
1{2  "method_type": "online",3  "is_active": true4}

Path parameters

slugRequired
path string

Request body fields

method_typeExample
string

Example field from the request body.

is_activeExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{admin_token}}

Content-TypeOptional
header string

application/json

Responses

No response example is available for this endpoint yet.