Orders
1 API call in this section.
Create Order from Cart
Public APIs / Public / Orders
POST
/public/restaurant/:slug/ordersOptional user_id allows creating an order for another user; defaults to the authenticated user.
Path parameters
| Parameter | Type | Description |
|---|---|---|
slugRequired | string | Dynamic path value from the request URL. |
Body parameters
| Parameter | Type | Description |
|---|---|---|
cart_id | string | — |
order_type | string | — |
payment_method | string | — |
table_id | null | — |
session_id | null | — |
tip_amount | number | — |
notes | null | — |
user_id | string | — |
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/public/restaurant/${SLUG}/orders" \2 --header "Content-Type: application/json" \3 --data-raw '{4 "cart_id": "{{cart_id}}",5 "order_type": "dine_in",6 "payment_method": "pay_at_counter",7 "table_id": null,8 "session_id": null,9 "tip_amount": 0,10 "notes": null,11 "user_id": "{{user_id}}"12}'Replace {{placeholders}} with your own values before sending.
Response examples
No saved response example. Use Try it to inspect a staging response.