訂單成立後,您會需要進行訂單履約,若您的商品不是數位商品,會需要進行實體物流履約,會有以下幾種情境:
以下的範例為官方超商取貨的物流方式,當賣家下單後訂單狀態就會自動為 Pending 狀態,可以進行出貨。
| 參數名稱 | 範例傳入參數值 |
|---|---|
| Order_Status | pending |
| Page_Size | 2 |
| Page | 1 |
傳出參數:
{
"result": {
"model_list": [
{
"creation_time": 1593418664595,
"trade_order_id": "566339542585",
"buyer_id": "2000007642585",
"seller_full_name": "台灣淘寶測試店鋪",
"seller_id": "2000005665181",
"actual_fee": "60",
"buyer_full_name": "abby@test.com",
"shipping_fee_currency_code": "TWD",
"shipping_fee": "52",
"actual_shipping_fee": "52",
"payment_channel": "CAINIAO_HILIFE_COD",
"actual_shipping_fee_currency_code": "TWD",
"delivery_info": {
"area": "中正區",
"country_code": "CN",
"city": "台北市",
"detail_address": "台北市中正區泉州街31、33號、寧波西街104號一樓 萊爾富北市正泉店",
"receiver_name": "王**明",
"state": "台灣",
"receiver_phone": "09******23"
},
"modification_time": 1593418669796,
"actual_fee_currency_code": "TWD",
"trade_order_line_id_list": [
"\"566339642585\""
],
"status": "pending"
}
],
"success": true,
"total_count": 1,
"page_no": 1,
"page_size": 50
},
"code": "0",
"request_id": "0b8f2d6615934187734868198"
}
API 參考文件: https://open.taobao.tw/doc/api.htm#/api?cid=9&path=/order/items/get
承上主訂單資料後,您可以調用 GetOrder 或 GetOrderItems 取得
傳入參數:
| 參數名稱 | 範例傳入參數值 |
|---|---|
| trade_order_line_id_list | [“566339642585”] |
| Page_Size | 2 |
| Page | 1 |
傳出參數:
{
"result": {
"model_list": [
{
"creation_time": 1593418664595,
"product_main_image": "https://img-ovs.alicdn.com/p/67b81c8577a801af6dad369dc5fe05db.png",
"product_detail_url": "https://item.taobao.tw/products/i164008004-s3478125853.html?urlFlag=true&mp=1",
"trade_order_id": "566339542585",
"trade_order_line_id": "566339642585",
"package_id": "FO047311000940548",
"product_id": "164008004",
"unit_fee": "8",
"unit_fee_currency_code": "TWD",
"shipment_list": [
{
"order_no": 1
},
{
"order_no": 2
}
],
"quantity": 1,
"actual_fee": "60",
"sku_info": "[{\"valueId\":-44,\"valueText\":\"12毫米\",\"propertyName\":\"耳環尺寸\",\"propertyId\":226649950},{\"valueId\":66914,\"valueText\":\"橄欖\",\"propertyName\":\"色系\",\"propertyId\":226649326}]",
"sku_id": "3478125853",
"buyer_full_name": "abby@test.com ",
"product_title": "Lattice 粉白撞色珍珠耳環(現貨)",
"shipping_fee_currency_code": "TWD",
"shipping_fee": "52",
"actual_shipping_fee": "52",
"actual_shipping_fee_currency_code": "TWD",
"modification_time": 1593418670862,
"actual_fee_currency_code": "TWD",
"status": "pending",
"delivery_option": "官方宅配"
}
],
"success": true,
"total_count": 1,
"page_no": 1,
"page_size": 50
},
"code": "0",
"request_id": "0b8f2d6615934189191438348"
}
API 參考文件: https://open.taobao.tw/doc/api.htm#/api?cid=10&path=/goods/post
當您完成包裝並準備好要出貨後,需要經過宣告出貨的流程來取得超商物流代碼。以下範例為店到店的貨到付款宣告出貨的範本。
*您可以在GetOrders篩選出 “status”: “pending” 的訂單,並且以此作為待出貨訂單
*宣告 SendGoods 以後,訂單狀態會變更為 “ready_to_ship”
傳入參數:
傳入參數對應及參考請看API參考文件
| 參數名稱 | 範例傳入參數值 |
|---|---|
| trade_order_line_id_set | [“566339642585”] |
| trade_order_id | 566339542585 |
| buyer_id | 2000007642585 |
| shipment_method | local |
| send_type | SelfSendService |
傳出參數:
{
"success": true,
"module": {
"success": true,
"ware_house": {}
},
"error_code": {},
"code": "0",
"request_id": "0b1196a615934194208781367"
}
API 參考文件: https://open.taobao.tw/doc/api.htm#/api?cid=10&path=/document/print
使用官方出貨,您可以使用這支API取得物流單列印的文件網址,進行物流單列印並出貨。
傳入參數:
| 參數名稱 | 範例傳入參數值 | 說明 |
|---|---|---|
| document_type | wayBill | |
| trade_order_id_set | [“566339642585”] | 此處請傳入主訂單編號,傳入多個的時候請用逗號隔開 |
傳出參數:
}
"result": {
"success": true,
"module": {
"document_url": "http://delivery.taobao.tw/waybill/pc_print.htm?sellerId=xxxxx&packageList=FP04731100xxxxerFlag=gppId=1115100!solutionCode=TW_LOCAL_PUDO!jxsItemProp=NORMAL!",
"document_type": "wayBill"
},
"error_code": {}
},
"code": "0",
"request_id": "0b8f2d6615934244867088507"
}
訪問文件網址後,會看到各種標籤的列印連結,請點選【確認列印】
您可能會有自己的物流方式,台灣淘寶亦支援您使用自己的物流方式,這時您的前兩步與上方相同,不同的是在SendGoods 您需要傳入不同的參數。
API 參考文件: https://open.taobao.tw/doc/api.htm#/api?cid=10&path=/goods/post
當您完成包裝並準備好要出貨後,透過宣告出貨傳入您自己的物流方式以及物流單號以完成出貨程序。
傳入參數:
傳入參數對應及參考請看API參考文件
| 參數名稱 | 範例傳入參數值 |
|---|---|
| trade_order_line_id_set | [“566339642585”] |
| trade_order_id | 566339542585 |
| buyer_id | 2000007642585 |
| shipment_method | local |
| shipment_provider | heimao |
| tracking_number | 100267905761 |
| send_type | localSellerSelfDeliverService |
傳出參數:
{
"success": true,
"module": {
"success": true,
"ware_house": {}
},
"error_code": {},
"code": "0",
"request_id": "0b1196a615934194208781367"
}