v2

latestOpenAPI 3.1.12026-08-06856719.6 KB

Create Order

Create Order with the given data. The order will be created with a draft status.

post/v1/orders

Headers

X-BUSINESS-API-KEYstring required
Example:b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d

Request body

amountnumber required

The total amount of the order

currencystring required

The currency of the order

remarkstring required

The remark of the order

location_idstring required

The location id of the order

customer_idstring required

The customer id of the order

customer_pickupboolean required

The customer pickup of the order

channelstring required

The channel of the order

business_user_idstring required

The business user id of the order

discount_reasonstring required

The discount reason of the order

discount_amountnumber required

The discount amount of the order

versionstring required

The version of the order

Example request

{
  "amount": 100,
  "currency": "sgd",
  "remark": "Order Remark HitPay",
  "location_id": "9ae46141-c930-4613-b5a0-241206b9c215",
  "customer_id": "9ae46141-c930-4613-b5a0-241206b9c215",
  "customer_pickup": true,
  "channel": "point_of_sale",
  "business_user_id": "34",
  "discount_reason": "Discount Reason",
  "discount_amount": 10,
  "version": "1.0"
}

Response

201

idstring
order_display_numberinteger
business_idstring
channelstring
versionstring
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:customer_id","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:business_customer_id","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:customer","oasType":"schema","type":"unknown"}
customer_pickupboolean
currencystring
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:order_discount_name","oasType":"schema","type":"unknown"}
statusstring
remarkstring
created_atstring
updated_atstring
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:closed_at","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:location_id","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:location","oasType":"schema","type":"unknown"}
business_user_idstring
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:slot_date","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:slot_time","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:messages","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:coupon","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/v1/orders:post:responses:201:content:application/json:schema:properties:payment_status","oasType":"schema","type":"unknown"}
fulfilment_statusstring
line_items_totalinteger
order_discount_amountinteger
line_item_discount_amountinteger
line_item_tax_amountinteger
additional_discount_amountinteger
total_discount_amountinteger
line_item_priceinteger
shipping_amountinteger
total_coupon_amountinteger
amountinteger
subtotalinteger