Orders (Admin/Public)
12 API calls in this section.
Create Order from Cart (Dine-in)
/restaurant/locations/:locationId/orders1curl --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}'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
locationIdRequiredRequest body fields
cart_idExampleExample field from the request body.
order_typeExampleExample field from the request body.
payment_method_idExampleExample field from the request body.
table_idExampleExample field from the request body.
session_idExampleExample field from the request body.
tip_amountExampleExample field from the request body.
notesExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Create Order from Cart (Take-out)
/restaurant/locations/:locationId/orders1curl --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}'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
locationIdRequiredRequest body fields
cart_idExampleExample field from the request body.
order_typeExampleExample field from the request body.
payment_method_idExampleExample field from the request body.
tip_amountExampleExample field from the request body.
notesExampleExample field from the request body.
delivery_dataExampleExample field from the request body.
delivery_data.contact_infoExampleExample field from the request body.
delivery_data.contact_info.nameExampleExample field from the request body.
delivery_data.contact_info.phoneExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Calculate Delivery Fee (Public)
/public/restaurant/:slug/cart/calculate-fee1curl --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}'1{2 "address": {3 "lat": 25.2048,4 "lng": 55.27085 }6}Path parameters
slugRequiredRequest body fields
addressExampleExample field from the request body.
address.latExampleExample field from the request body.
address.lngExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Create Order from Cart (Delivery - Wallet)
/restaurant/locations/:locationId/orders1curl --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}'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
locationIdRequiredRequest body fields
cart_idExampleExample field from the request body.
order_typeExampleExample field from the request body.
payment_method_idExampleExample field from the request body.
tip_amountExampleExample field from the request body.
notesExampleExample field from the request body.
delivery_dataExampleExample field from the request body.
delivery_data.addressExampleExample field from the request body.
delivery_data.address.full_addressExampleExample field from the request body.
delivery_data.address.latExampleExample field from the request body.
delivery_data.address.lngExampleExample field from the request body.
delivery_data.contact_infoExampleExample field from the request body.
delivery_data.contact_info.nameExampleExample field from the request body.
delivery_data.contact_info.phoneExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
Create Order from Cart (Delivery - Online Gateway)
/restaurant/locations/:locationId/orders1curl --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}'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
locationIdRequiredRequest body fields
cart_idExampleExample field from the request body.
order_typeExampleExample field from the request body.
payment_method_idExampleExample field from the request body.
payment_back_refExampleExample field from the request body.
tip_amountExampleExample field from the request body.
notesExampleExample field from the request body.
delivery_dataExampleExample field from the request body.
delivery_data.addressExampleExample field from the request body.
delivery_data.address.full_addressExampleExample field from the request body.
delivery_data.address.latExampleExample field from the request body.
delivery_data.address.lngExampleExample field from the request body.
delivery_data.contact_infoExampleExample field from the request body.
delivery_data.contact_info.nameExampleExample field from the request body.
delivery_data.contact_info.phoneExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Orders (Admin)
/restaurant/orders?location_id={{location_id}}&status_group=completed&from_date=&to_date=&page=1&limit=101curl --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{{location_id}}
status_groupOptionalcompleted
active|completed. completed => served, delivered, closed
from_dateOptionalDate-only (YYYY-MM-DD). Inclusive day range. Filters by restaurant_orders.created_at
to_dateOptionalDate-only (YYYY-MM-DD). Inclusive day range. Filters by restaurant_orders.created_at
pageOptional1
limitOptional10
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Get Order
/restaurant/orders/:orderId1curl --request GET "$ONDI_BASE_URL/restaurant/orders/:orderId" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
orderIdRequiredHeaders
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Update Order Status (Admin)
/restaurant/orders/:orderId/status1curl --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}'1{2 "status": "preparing",3 "note": "Start cooking"4}Path parameters
orderIdRequiredRequest body fields
statusExampleExample field from the request body.
noteExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Print Order (Admin)
/restaurant/orders/:orderId/print1curl --request POST "$ONDI_BASE_URL/restaurant/orders/:orderId/print" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
orderIdRequiredHeaders
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Attach Cart (Public) - requires login
/public/restaurant/:slug/cart/attach1curl --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}'1{2 "cart_id": "{{cart_id}}"3}Path parameters
slugRequiredRequest body fields
cart_idExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.
List Payment Methods (Tenant Admin, slug-based)
/restaurant/:slug/payment-methods1curl --request GET "$ONDI_BASE_URL/restaurant/:slug/payment-methods" \2 --header "Authorization: Bearer {{admin_token}}"Path parameters
slugRequiredHeaders
AuthorizationOptionalBearer {{admin_token}}
Responses
No response example is available for this endpoint yet.
Upsert Payment Method (Tenant/Slug)
/restaurant/:slug/payment-methods1curl --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}'1{2 "method_type": "online",3 "is_active": true4}Path parameters
slugRequiredRequest body fields
method_typeExampleExample field from the request body.
is_activeExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{admin_token}}
Content-TypeOptionalapplication/json
Responses
No response example is available for this endpoint yet.