v1
latestOpenAPI 3.0.02026-07-26318168886.7 KBOrders
Create Order
To create an order with open API<br>透過open API創建一筆新訂單
post/orders
Query parameters
include_fields[]string[]
Provide additional attributes in the response<br>結果添加哪些參數
fields[]string[]
Only return the provided fields in the responses<br>結果只包含輸入的參數<br> This parameter will override include_fields[]<br>此參數會覆蓋include_fields[]。
[ "fields[]=id" ]
Request body
Example request
{
"order": {
"delivery_option_id": "58d3379401cda31bfb000000",
"payment_method_id": "58d25b9d01cda3475300002d",
"subtotal": 3699,
"total": 3199,
"items": [
{
"item_type": "Product",
"item_id": "5adedc00e388094414000033",
"variation_id": "66b09f05879c87001594d9b8",
"item_price": 999,
"quantity": 1,
"total": 999
}
],
"customer_id": "5e0047dfc4101900263b1450",
"customer_email": "flash@shopline.com",
"customer_phone": "0910123456",
"customer_phone_country_code": "852",
"customer_name": "Flash",
"customer_birthday": "1980-01-01",
"customer_gender": "male",
"expired_at": "2018-01-01 00:00:00",
"confirmed_at": "2018-01-01 00:00:00",
"auth_token_expired_at": "2018-01-01 00:00:00",
"order_remarks": "For order memo",
"created_from": "admin_openapi",
"delivery_address": {
"country_code": "TW",
"country": "台灣",
"city": "台北市",
"district": "台北",
"address_1": "光復北路11巷44號14樓",
"address_2": "松山區",
"recipient_name": "SHOPLINE"
},
"user_credit": 30,
"member_point": 120,
"opt_in_auto_reward": true
},
"is_registering_as_member": true,
"is_inventory_fulfillment": true
}Response
OK