Order Create
The Order endpoint creates the order from the cart content
Path Parameters
- Type: stringcart
_id required
Headers
- Type: stringApplicationrequired
The
keyattribute of the application instance that sent the request - Type: stringApi
- Version requiredVersion of the API that client app expects
- Type: stringDevice
- U U I D requiredThe identifier of device and/or client app that sent the request
Body
application/json
- Properties: 6Type: objectcustomer
_info - Type: objectpayment
_info Properties: 5Required whenever the cart still has an amount left to pay. Pass the hash you received from the Payment Initialization call, so we can match the order to the payment you already started, together with whatever the payment method you initialized with produced.
- Type: array of objectsplit
_payment _info Properties: 5Pay with several methods at once, in the order the legs were initialized. At most four legs, and the amounts must add up to the amount due. Requires
is_split_payment_enabledon the brand.
Responses
- application/json
- 400
- Bad Request
- Cart not verified for checkout
- Cart payment initialization missing
- Cart contains unavailable products
- Venue ID=:venue_id, :venue_name is closed
- 404
Cart with provided ID could not be found.
Request Example for post/cart/{cart_id}/order
curl 'https://api-public-demo.menu.app/api/cart/{cart_id}/order' \
--request POST \
--header 'Application: ' \
--header 'Api-Version: ' \
--header 'Device-UUID: ' \
--header 'Content-Type: application/json' \
--data '{
"customer_info": {
"first_name": "",
"last_name": "",
"email": "",
"phone_number": "",
"demographics": [
{}
],
"optin_status_sms_internal": 1
},
"payment_info": {
"payment_init_hash": "f6c81792c297a54e65c5f4a03204e7f3",
"one_time_token": "30910032626134340597000708770932",
"gift_card_number": "7888888811114321",
"gift_card_code": "111",
"additional_info": {}
},
"split_payment_info": [
{
"payment_init_hash": "",
"one_time_token": "",
"gift_card_number": "",
"gift_card_code": "",
"additional_info": {}
}
]
}'
{
"status": "string",
"code": 1,
"data": {
"order": {
"id": 1,
"code": "string",
"uuid": "string",
"is_group": true,
"is_reorder": true,
"participants": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"display_name": "string",
"role": "string"
}
],
"type_id": 1,
"reference_type": "string",
"init_hash": "string",
"external_reference": null,
"external_code": null,
"external_channel_id": null,
"application_id": 1,
"application_info": {
"id": 1,
"key": "string",
"name": "string",
"uuid": "string",
"type_id": 1,
"brand_id": 1,
"created_at": "string",
"updated_at": "string",
"is_dpa_signed": 1,
"reference_type": "string"
},
"venue_id": 1,
"venue_info": {
"id": 1,
"name": "string",
"address": "string",
"city": "string",
"zip": "string",
"latitude": 1,
"longitude": 1,
"phone": "string",
"delivery_travel_type": "string",
"use_pos_order_number": true,
"timezone": {
"name": "string",
"offset": "string"
},
"tax_number": "string",
"pickup_time": 1,
"image": null,
"country": {
"id": 1,
"name": "string",
"code": "string",
"calling_code": "string",
"currency_settings": {
"currency_space": true,
"decimal_separator": "string",
"thousands_separator": "string",
"symbol_position": "string"
}
},
"currency": {
"id": 1,
"code": "string",
"code_numeric": "string",
"symbol": "string",
"rounding_unit": 1,
"rounding_unit_tip": 1
},
"dispatch_legacy": true
},
"singular_point_id": 1,
"singular_point_info": {
"id": 1,
"input": {
"id": 1,
"name": "string",
"singular_point_id": 1
},
"input_id": 1,
"area_info": {
"id": 1,
"name": "string",
"pos_id": null,
"type_id": 1,
"reference_type": "string"
},
"parent_id": 1,
"created_at": null,
"input_type": "string",
"table_info": {
"id": 1,
"number": "string",
"pos_id": null
},
"parent_type": "string"
},
"pos_ticket_id": "string",
"pos_ticket_code": "string",
"customer_account_id": 1,
"customer_account_info": {
"id": 1,
"uuid": "string",
"email": "string",
"state": 1,
"locale": "string",
"type_id": 1,
"brand_id": 1,
"v2_token": null,
"confirmed": 1,
"last_name": "string",
"created_at": "string",
"first_name": "string",
"updated_at": "string",
"customer_id": null,
"demographics": [
{}
],
"phone_number": "string",
"is_dpa_signed": 1,
"discount_cards": [
{}
],
"reference_type": "string",
"optin_status_pn": 1,
"optin_status_sms": 1,
"optin_status_email": 1,
"created_by_application_id": 1,
"optin_status_sms_internal": 1
},
"order_type": 1,
"order_type_info": {
"id": 1,
"uuid": "string",
"state": 1,
"tip_max": null,
"type_id": 1,
"venue_id": 1,
"created_at": "string",
"updated_at": "string",
"tip_default": null,
"is_dpa_signed": 1,
"reference_type": "string",
"external_channel_only": 1
},
"order_type_properties": {
"type_id": 1,
"table_id": "string"
},
"order_additional_info": {
"pos_wait_until_paid": true
},
"is_scheduled": true,
"trigger_type": 1,
"status": "string",
"status_changed_by": "string",
"payment_status": "string",
"fraud_detection_status": null,
"fiscal_status": null,
"fiscalization_number": null,
"tablet_status": "string",
"delivery_status": null,
"is_test": true,
"calculation_method": "string",
"subtotal": 1,
"discount": 1,
"subsidy": 1,
"external_payment_amount": 1,
"discount_info": null,
"service_charge": 1,
"service_charge_rate": 1,
"service_charge_tax_rate": 1,
"delivery_fee_tax_rate": 1,
"delivery_fee": 1,
"delivery_fee_tax": 1,
"minimal_order_amount": 1,
"minimum_surcharge": 1,
"minimum_surcharge_tax": 1,
"tip": 1,
"tip_rate": 1,
"total": 1,
"tax": 1,
"tax_exemption": 1,
"tax_rates": [
{}
],
"tax_rates_exemption": [
{}
],
"refunded": 1,
"products": [
{
"pos_id": null,
"name": "string",
"translations": {
"name": null
},
"price": 1,
"quantity": 1,
"subtotal": 1,
"tax": 1,
"tax_rates": [
{}
],
"comment": "string",
"image": {
"thumbnail_small": "string",
"thumbnail_medium": "string",
"fullsize": "string"
},
"product_groups": [
{
"group_type": 1,
"pos_id": null,
"name": "string",
"translations": {
"name": null
},
"subtotal": 1,
"tax": 1,
"tax_rates": [
{}
],
"image": {
"thumbnail_small": "string",
"thumbnail_medium": "string",
"fullsize": "string"
},
"products": [
{
"pos_id": null,
"name": "string",
"translations": {
"name": null
},
"price": 1,
"quantity": 1,
"subtotal": 1,
"tax": 1,
"tax_rates": [
{}
],
"comment": "string",
"image": {
"thumbnail_small": "string",
"thumbnail_medium": "string",
"fullsize": "string"
}
}
]
}
]
}
],
"payments": [
{
"id": 1,
"payment_method_id": 1,
"payment_processor_type_id": 1,
"payment_processor_id": null,
"total": 1,
"pos_receipt_id": "string",
"stored_payment_method_vault": null
}
],
"refunds": [
{}
],
"pickup_code": null,
"preparation_time": 1,
"additional_delivery_info": null,
"delivery_delay_time": null,
"is_customer_arrived": true,
"is_status_fired": true,
"cancellation_reason_id": null,
"delivery_job": {},
"regret_cancel_until": null,
"send_at": "string",
"pickup_at": null,
"ready_at": null,
"arriving_at": null,
"delivery_at": null,
"created_at": "string",
"updated_at": "string"
}
}
}