Skip to main content

Orders

1 API call in this section.

Create Order from Cart

Public APIs / Public / Orders
POST/public/restaurant/:slug/orders
Most OnDi APIs require an authenticated session or service token. Public endpoints are marked by their path and module context.
Request
curl
1curl --request POST "$ONDI_BASE_URL/public/restaurant/:slug/orders" \2  --header "Authorization: Bearer $ONDI_ACCESS_TOKEN" \3  --header "Content-Type: application/json" \4  --data '{5  "cart_id": "{{cart_id}}",6  "order_type": "dine_in",7  "payment_method": "pay_at_counter",8  "table_id": null,9  "session_id": null,10  "tip_amount": 0,11  "notes": null,12  "user_id": "{{user_id}}"13}'
Request body
json
1{2  "cart_id": "{{cart_id}}",3  "order_type": "dine_in",4  "payment_method": "pay_at_counter",5  "table_id": null,6  "session_id": null,7  "tip_amount": 0,8  "notes": null,9  "user_id": "{{user_id}}"10}

Path parameters

slugRequired
path string

Request body fields

cart_idExample
string

Example field from the request body.

order_typeExample
string

Example field from the request body.

payment_methodExample
string

Example field from the request body.

table_idExample
null

Example field from the request body.

session_idExample
null

Example field from the request body.

tip_amountExample
number

Example field from the request body.

notesExample
null

Example field from the request body.

user_idExample
string

Example field from the request body.

Responses

No response example is available for this endpoint yet.