Update Order
Function
To update reference user id of the third party
儲存第三方訂單ID
To update order's tracking information (Only reserved for customized delivery options )
更新訂單追蹤資訊(只開放給自訂/非第三方串接物流之送貨方式使用)
URL
PATCH <<api_domain>>/v1/orders/:id
Request Parameters
Parameter | Type | Description | Example |
---|---|---|---|
id *Required | String | Order's ID 訂單ID | 5b2b66599a76f0196a000a54 |
tags | Array | Order's Tags 訂單標籤 | ["TAG-001", "TAG-002"] |
tracking_number | String | Delivery Tracking Number 物流追蹤號碼 | "tracking_number":"66827510120656" |
tracking_url | String | Delivery Tracking url 物流追蹤url | "tracking_url":"http://www.dhl.com/tracking" |
delivery_provider_name | Hash | Delivery Provider Name 物流提供者名稱 | ruby "delivery_provider_name": { "zh-hant": "DHL", "en": "DHL" } |
ref_order_id | String | For third party custom order id 可供儲存第三方訂單ID | "ref_order_id":"ORD001" |
delivery_data | Order DeliveryData | Delivery Data 運送資訊 Able to update the fields below 可修改以下欄位 - location_code - location_name - store_address - recipient_name - recipient_phone | "delivery_data":{ "location_code":"F004507", "location_name":"全家木興店1", "store_address":"台北市文山區木柵路二段52號1", "recipient_name":"Sheryl", "recipient_phone":"0987654321" } |
delivery_address | Order DeliveryAddress | Delivery Address Information 運送地址資訊 Able to update the fields below 可修改以下欄位 - country - country_code - address_1 - address_2 - city - state - postcode | "delivery_address":{ "address_1": "1/F, Some Building", "address_2": "No. 123 Some Street, Somewhere", "city": "City", "state": "Perak", "postcode":"36500", "country": "Malaysia", "country_code":"MY" } |
custom_data | Array | Custom data 自定義資料 | { "value": "field value", "field_id": "field_id" } |
Request Example
curl -X PATCH \
<<api_domain>>/v1/orders/5b2b66599a76f0196a000a54 \
-H 'Accept: application/json' \
-H 'Authorization: access_token' \
-H 'Content-Type: application/json' \
-d '{
"tracking_number": "66827510120656",
"tracking_url": "http://www.dhl.com/tracking",
"delivery_provider_name": {
"zh-hant": "DHL",
"en": "DHL"
},
"tags": [
"tags-00",
"tags-01"
],
"delivery_data": {
"location_code": "F004507",
"location_name": "全家木興店1",
"store_address": "台北市文山區木柵路二段52號1",
"recipient_name": "Sheryl",
"recipient_phone": "0987654321"
},
"delivery_address": {
"address_1": "1/F, Some Building",
"address_2": "No. 123 Some Street, Somewhere",
"city": "City",
"state": "Perak",
"postcode":"36500",
"country": "Malaysia",
"country_code":"MY"
}
}'
Response Field
Response Example
Updated almost 3 years ago