三方作業 #
待出貨訂單查詢V2 #
- V2 相較於 V1,提供 更詳細的訂單資訊,新增內容請參考下方列表。
- Endpoint 與 V1 相同
- 僅需於 Request Headers 中新增以下設定,即可使用 V2:
api-version: 2
,即可取得對應的訂單資訊
。
- 訂單查詢相關API提供不同版本以滿足不同的資訊需求,目前最新為 V3 版本,具備所有點數折抵資訊。以下為各版本說明:
版本說明 #
版本 | Header 設定 | 差異說明 |
---|---|---|
V1 | 無需額外設定 | 提供基本訂單出貨資訊 |
V2 | "api-version": "2" |
增加賣場活動折抵、折價卷、購物金、超贈點、福利金等資訊 |
V3 | "api-version": "3" |
在 V2 的基礎上新增 OPENPOINT 點數折抵資訊 |
Headers 範例
{
"api-token": "Supplier_XXXX",
"api-supplierid": "XXXX",
"content-type": "application/json",
"accept": "application/json",
"api-version": "2"
}
Endpoint URL: https://tw.scm.yahooapis.com/scmapi/api/ThirdPartyDelivery/GetPreparingOrders
HTTP Method: POST
Request Body #
TransferDateStart #
轉單日 (起)。
資料型態: dateTime
必填: 是
說明: 時間格式為
- yyyy-mm-ddThh:mm:ss
- ex. 2024-01-20T00:00:00
TransferDateEnd #
轉單日 (迄)。
資料型態: dateTime
必填: 是
說明: 時間格式為
- yyyy-mm-ddThh:mm:ss
- ex. 2024-01-25T23:59:59
Request/Response Sample #
POST /scmapi/api/ThirdPartyDelivery/GetPreparingOrders
{
"TransferDateStart": "2024-09-05T12:40:00",
"TransferDateEnd": "2024-09-05T19:49:59"
}
{
"OrderCount": 4,
"Orders": [
{
"OrderInfo": {
"ExternOrderkey": 504504381,
"OrderCode": "RM2409050000021",
"TransporterId": 0,
"LocationOfficeId": null,
"LocationOfficeName": null,
"TransferDate": "2024-09-05T14:49:10",
"ExpectedShippingDate": "2024-09-06T23:59:00",
"LastShippingDate": "2024-09-06T23:59:00",
"Note": ""
},
"ReceiverInfo": {
"Name": "王大頭",
"Address": "(437)台中市大甲區喵喵路一段23號",
"Phone": "09-79123456",
"Mobile": "0979123456"
},
"BuyerInfo": {
"Name": "王大頭",
"Mobile": "0979123456"
},
"Products": [
{
"Id": 6831314,
"Name": "[3D驗證]測試賣場-宅店配要走3D",
"Attribute": "",
"ItemPageId": 3428174,
"SupplierNo": "",
"Type": "一般商品",
"Qty": 1,
"Cost": 1,
"Subtotal": 1,
"ProductPrice": 6,
"RetailPrice": 1200,
"CouponActivityCode": "",
"CouponAmount": 0,
"ActivityCode": "",
"ActivityAmount": 0,
"RedeemAmout": 0,
"RewardAmount": 0,
"WelfareAmount": 0
}
]
},
{
"OrderInfo": {
"ExternOrderkey": 504504424,
"OrderCode": "RM2409050000063",
"TransporterId": 0,
"LocationOfficeId": null,
"LocationOfficeName": null,
"TransferDate": "2024-09-05T14:49:11",
"ExpectedShippingDate": "2024-09-06T23:59:00",
"LastShippingDate": "2024-09-06T23:59:00",
"Note": ""
},
"ReceiverInfo": {
"Name": "王大頭",
"Address": "(437)台中市大甲區喵喵路一段23號",
"Phone": "09-79123456",
"Mobile": "0979123456"
},
"BuyerInfo": {
"Name": "王大頭",
"Mobile": "0979123456"
},
"Products": [
{
"Id": 6831314,
"Name": "[3D驗證]測試賣場-宅店配要走3D",
"Attribute": "",
"ItemPageId": 3428174,
"SupplierNo": "",
"Type": "一般商品",
"Qty": 1,
"Cost": 1,
"Subtotal": 1,
"ProductPrice": 6,
"RetailPrice": 1200,
"CouponActivityCode": "",
"CouponAmount": 0,
"ActivityCode": "",
"ActivityAmount": 0,
"RedeemAmout": 0,
"RewardAmount": 0,
"WelfareAmount": 0
}
]
},
{
"OrderInfo": {
"ExternOrderkey": 504504540,
"OrderCode": "RM2409050000187",
"TransporterId": 0,
"LocationOfficeId": null,
"LocationOfficeName": null,
"TransferDate": "2024-09-05T16:14:18",
"ExpectedShippingDate": "2024-09-06T23:59:00",
"LastShippingDate": "2024-09-06T23:59:00",
"Note": ""
},
"ReceiverInfo": {
"Name": "王大頭",
"Address": "(437)台中市大甲區喵喵路一段23號",
"Phone": "09-79123456",
"Mobile": "0979123456"
},
"BuyerInfo": {
"Name": "王大頭",
"Mobile": "0979123456"
},
"Products": [
{
"Id": 6831314,
"Name": "[3D驗證]測試賣場-宅店配要走3D",
"Attribute": "",
"ItemPageId": 3428174,
"SupplierNo": "",
"Type": "一般商品",
"Qty": 1,
"Cost": 1,
"Subtotal": 1,
"ProductPrice": 6,
"RetailPrice": 1200,
"CouponActivityCode": "",
"CouponAmount": 0,
"ActivityCode": "",
"ActivityAmount": 0,
"RedeemAmout": 0,
"RewardAmount": 0,
"WelfareAmount": 0
}
]
},
{
"OrderInfo": {
"ExternOrderkey": 504504546,
"OrderCode": "RM2409050000195",
"TransporterId": 0,
"LocationOfficeId": null,
"LocationOfficeName": null,
"TransferDate": "2024-09-05T16:14:18",
"ExpectedShippingDate": "2024-09-06T23:59:00",
"LastShippingDate": "2024-09-06T23:59:00",
"Note": ""
},
"ReceiverInfo": {
"Name": "王大頭",
"Address": "(437)台中市大甲區喵喵路一段23號",
"Phone": "09-79123456",
"Mobile": "0979123456"
},
"BuyerInfo": {
"Name": "王大頭",
"Mobile": "0979123456"
},
"Products": [
{
"Id": 6831314,
"Name": "[3D驗證]測試賣場-宅店配要走3D",
"Attribute": "",
"ItemPageId": 3428174,
"SupplierNo": "",
"Type": "一般商品",
"Qty": 1,
"Cost": 1,
"Subtotal": 1,
"ProductPrice": 6,
"RetailPrice": 1200,
"CouponActivityCode": "",
"CouponAmount": 0,
"ActivityCode": "",
"ActivityAmount": 0,
"RedeemAmout": 0,
"RewardAmount": 0,
"WelfareAmount": 0
}
]
}
]
}
Response Elements #
若操作成功,API 會回傳 HTTP 200 response。並以 JSON 格式回傳完整的待出貨清單。
OrderCount #
資料筆數。
資料型態: Integer
Orders #
顯示待出貨清單的內容。Orders 的結構分別說明如下:
- OrderInfo:訂單相關資訊
- ReceiverInfo:收件人相關資訊
- BuyerInfo:購買人相關資訊
- Products:商品相關資訊
資料型態: Object Array
OrderInfo #
顯示訂單相關資訊的內容。OrderInfo 的結構分別說明如下:
- ExternOrderkey:購物車序號
- OrderCode:訂單編號
- TransporterId:貨運商代碼
- LocationOfficeId:到貨區碼
- LocationOfficeName:到貨區碼名稱
- TransferDate:轉單日期
- ExpectedShippingDate:應出貨日
- LastShippingDate:最晚出貨日
- Note:訂單備註
資料型態: Object
ExternOrderkey #
購物車序號。
資料型態: Integer
OrderCode #
訂單編號。
資料型態: String
TransporterId #
貨運商代碼。
資料型態: Integer
說明: 未執行包裝/出貨確認前,此欄位會顯示0
LocationOfficeId #
到貨區碼。
資料型態: String
說明: 未執行包裝/出貨確認前,此欄位會顯示null
LocationOfficeName #
到貨區碼名稱。
資料型態: String
說明: 未執行包裝/出貨確認前,此欄位會顯示null
TransferDate #
轉單日期。
資料型態: dateTime
說明: 時間格式為
- yyyy-mm-ddThh:mm:ss
- ex. 2024-01-20T00:00:00
ExpectedShippingDate #
應出貨日。
資料型態: dateTime
說明: 時間格式為
- yyyy-mm-ddThh:mm:ss
- ex. 2024-01-20T00:00:00
LastShippingDate #
最晚出貨日。
資料型態: dateTime
說明: 時間格式為
- yyyy-mm-ddThh:mm:ss
- ex. 2024-01-20T00:00:00
Note #
訂單備註。
資料型態: String
ReceiverInfo #
顯示收件人相關資訊的內容。ReceiverInfo 的結構分別說明如下:
- Name:收件人姓名
- Address:收件人地址
- Phone:收件人電話
- Mobile:收件人手機
資料型態: Object
Name #
收件人姓名。
資料型態: String
Address #
收件人地址。
資料型態: String
Phone #
收件人電話。
資料型態: String
Mobile #
收件人手機。
資料型態: String
BuyerInfo #
顯示訂購人相關資訊的內容。BuyerInfo 的結構分別說明如下:
- Name:訂購人姓名
- Mobile:訂購人手機
資料型態: Object
Name #
收件人姓名。
資料型態: String
Mobile #
收件人手機。
資料型態: String
Products #
顯示商品相關資訊的內容。Products 的結構分別說明如下:
- Id:商品編號
- Name:商品名稱
- Attribute:商品屬性
- ItemPageId:賣場編號
- SupplierNo:供應商料號
- Type:商品類別
- Qty:商品數量
- Cost:商品成本
- Subtotal:商品成本小計
- ProductPrice:商品售價
- RetailPrice:商品建議售價
- CouponActivityCode:折價券活動代號
- CouponAmount:折價券活動折抵金額
- ActivityCode:促銷折價活動代號
- ActivityAmount:促銷折價活動折抵金額
- RedeemAmout:消費者YAHOO購物金折抵金額
- RewardAmount:消費者YAHOO超贈點折抵金額
- WelfareAmount:消費者YAHOO福利金折抵金額
資料型態: Object
Id #
商品編號。
資料型態: Integer
Name #
商品名稱。
資料型態: String
Attribute #
商品屬性。
資料型態: String
ItemPageId #
賣場編號。
資料型態: Integer
SupplierNo #
供應商料號。
資料型態: String
Type #
商品類別。
資料型態: String
Qty #
商品數量。
資料型態: Integer
Cost #
商品成本。
資料型態: Integer
Subtotal #
商品成本小計。
資料型態: Integer
ProductPrice #
商品售價。
資料型態: Integer
RetailPrice #
商品建議售價。
資料型態: Integer
CouponActivityCode #
折價券活動代號。
資料型態: String
CouponAmount #
折價券活動折抵金額。
資料型態: Integer
ActivityCode #
促銷折價活動代號。
資料型態: String
ActivityAmount #
促銷折價活動折抵金額。
資料型態: Integer
RedeemAmout #
消費者YAHOO購物金折抵金額。
資料型態: Integer
RewardAmount #
消費者YAHOO超贈點折抵金額。
資料型態: Integer
WelfareAmount #
消費者YAHOO福利金折抵金額 (現況已無該折抵金額活動)。
資料型態: Integer