出貨確認

店配作業 #

出貨確認 #

進行店配訂單的出貨確認

Endpoint URL: https://tw.scm.yahooapis.com/scmapi/api/StoreDelivery/ConfirmOrders
HTTP Method: POST

Request Body #

ConfirmOrders #

顯示訂單相關資訊的內容。ConfirmOrders 的結構分別說明如下:

  • OrderCode:訂單編號
  • PackageNo:第幾個包裝

資料型態: Array

OrderCode #

訂單編號。
資料型態: String
必填: 是

PackageNo #

第幾個包裝。
資料型態: Integer
必填: 是
說明:
同買家不同訂單編號欲包裝再一起可以使用相同的PackageNo,即會產生同樣的出貨單號,但必須是相同的收件門市。
若設定不同的PackageNo,則會產生不同的出貨單號。

Request/Response Sample #

POST /scmapi/api/StoreDelivery/ConfirmOrders

[
  {
    "OrderCode": "RM2602230001265",
    "PackageNo": 1
  },
  {
    "OrderCode": "RM2602230000423",
    "PackageNo": 2
  }
]
{
    "ResponseCode": "00000",
    "ResponseMessage": "成功",
    "SuccessfulCount": 1,
    "FailedCount": 0,
    "SuccessfulOrders": [
        {
            "PackageNo": 1,
            "ShipmentNo": "40001249",
            "BarCode": "202110823A5340001249",
            "ShipDate": "2026-04-02T00:00:00+08:00",
            "OrderCodes": [
                "RM2603040001179"
            ],
            "ChildShopcode": "A53"
        }
    ],
    "FailedOrders": []
}
{
    "ResponseCode": "00000",
    "ResponseMessage": "成功",
    "SuccessfulCount": 2,
    "FailedCount": 0,
    "SuccessfulOrders": [
        {
            "PackageNo": 1,
            "ShipmentNo": "",
            "ShipDate": "2026-04-02T00:00:00+08:00",
            "OrderCodes": [
                "RM2602230001265"
            ],
            "ChildShopcode": "001",
            "PaymentNo": "D8800146",
            "ValidationNo": "8267",
            "PinCode": "D88001468267"
        },
        {
            "PackageNo": 2,
            "ShipmentNo": "",
            "ShipDate": "2026-04-02T00:00:00+08:00",
            "OrderCodes": [
                "RM2602230000423"
            ],
            "ChildShopcode": "001",
            "PaymentNo": "D8800147",
            "ValidationNo": "8506",
            "PinCode": "D88001478506"
        }
    ],
    "FailedOrders": []
}
{
    "ResponseCode": "00001",
    "ResponseMessage": "訂單有錯誤",
    "SuccessfulCount": 0,
    "FailedCount": 1,
    "SuccessfulOrders": [],
    "FailedOrders": [
        {
            "PackageNo": 1,
            "FailedCode": 2131,
            "FailedMessage": "訂單的收件門市資訊不一致",
            "OrderCodes": [
                "RM2407220000203",
                "RM2407170000464"
            ]
        }
    ]
}

Response Elements #

若操作成功,API 會回傳 HTTP 200 response。並以 JSON 格式回傳完整的出貨狀態包含失敗的顯示訊息。

ResponseCode #

回覆出貨狀態代碼。
資料型態: String
說明:

  • 00000:出貨成功
  • 00001:出貨部份失敗,細節請見FailedOrders
  • 99999:出貨失敗,細節請見FailedOrders

ResponseMessage #

回覆出貨狀態成功與否訊息。
資料型態: String
說明:對應ResponseCode

  • 成功
  • 訂單有錯誤
  • 失敗

SuccessfulCount #

成功筆數。
資料型態: Integer

FailedCount #

失敗筆數。
資料型態: Integer

SuccessfulOrders(物流交寄) #

顯示各訂單的出貨成功的相關資訊

  • PackageNo:第幾個包裝
  • ShipmentNo:出貨單號
  • BarCode:託運單號一維條碼標籤
  • ShipDate:出貨日期
  • OrderCodes:訂單編號
  • ChildShopcode:超商子代碼

資料型態: Array

PackageNo #

第幾個包裝。
資料型態: Integer

ShipmentNo #

出貨單號。
資料型態: String

BarCode #

託運單號一維條碼標籤。
資料型態: String

ShipDate #

出貨日期。
資料型態: dateTime
說明: 時間格式為

  • yyyy-mm-ddThh:mm:ss
  • ex. 2024-01-20T00:00:00
OrderCodes #

訂單編號。
資料型態: String Array

ChildShopcode #

超商子代碼。
資料型態: String

SuccessfulOrders(門市交寄) #

顯示各訂單的出貨成功的相關資訊

  • PackageNo:第幾個包裝
  • ShipmentNo:出貨單號
  • ShipDate:出貨日期
  • OrderCodes:訂單編號
  • ChildShopcode:超商子代碼
  • PaymentNo:寄貨編號
  • ValidationNo:驗證碼
  • PinCode:交貨便代碼

資料型態: Array

PackageNo #

第幾個包裝。
資料型態: Integer

ShipmentNo #

出貨單號。
資料型態: String

ShipDate #

出貨日期。
資料型態: dateTime
說明: 時間格式為

  • yyyy-mm-ddThh:mm:ss
  • ex. 2024-01-20T00:00:00
OrderCodes #

訂單編號。
資料型態: String Array

ChildShopcode #

超商子代碼。
資料型態: String

PaymentNo #

寄貨編號。
資料型態: String

ValidationNo #

驗證碼。
資料型態: String

PinCode #

交貨便代碼。
資料型態: String

FailedOrders #

顯示各訂單的出貨失敗的相關資訊

  • PackageNo:第幾個包裝
  • FailedCode:錯誤代碼
  • FailedMessage:錯誤訊息
  • OrderCodes:訂單編號

資料型態: Array

PackageNo #

第幾個包裝。
資料型態: Integer

FailedCode #

錯誤代碼。
資料型態: Integer
說明:請見FailedCode對應表

FailedMessage #

錯誤訊息。
資料型態: String
說明:請見FailedCode對應表

OrderCodes #

訂單編號。
資料型態: String Array

FailedCode對應表 #
FailedCode FailedMessage
2121 部分訂單不屬於此交易序號
2122 訂單總金額需大於0
2123 請勿傳入物流服務費
2124 部分訂單已出貨,請再確認
2125 部分訂單已取消,請再確認
2126 無法取得店家超商母/子代碼
2127 無法取得店家資料
2128 部分訂單無法出貨
2129 門市關轉OR店號轉換,請隔日再試行出貨
2130 部分訂單不存在
2131 訂單的收件門市資訊不一致
2132 部分訂單的主配件非SCM
2133 訂單總金額超過限制
2134 部分訂單含有未結案異動單
2135 訂單收件人資訊不一致
2912 其他錯誤