Split Order
Function
Merchants can manage to ship more flexibly via split order API.
店家可以透過 split order API 進行拆單。
URL
POST <<api_domain>>/v1/orders/:id/split
Request Parameters
Parameter | Type | Description | Example |
|---|---|---|---|
order_items *Required |
| The order items of the order which would like to split into new order. | |
updated_at |
| Current order's updated_at. (Should use UTC timezone) [Note] 若 updated_at 與訂單當前的 updated_at 不同將會收到 parent_order_updated 的錯誤。 (此為必填欄位,避免同張訂單同時被拆分。建議先打 Get Order 取得 | |
send_child_email |
| To notify the customer that the child order already created by email (default: true). | |
send_parent_email |
| To notify the customer that the parent order already split by email (default: false). | |
Request Example
curl -X POST \
<<api_domain>>/v1/orders/5b2b66599a76f0196a000a54/split \
-H 'Accept: application/json' \
-H 'Authorization: access_token' \
-H 'Content-Type: application/json' \
-d '{
"order_items": [{ "id": "62a9c50634e470204d99fa0a", "quantity": 1 }],
"updated_at": "2022-08-05 07:59:09",
"send_child_email": false,
"send_parent_email": true
}'Response Field
Response Example
Updated 13 days ago