更新訂單狀態

了解更新訂單狀態端點的運作方式。

updateVendorOrderStatus 端點用於更新 Zonos 系統內訂單的訂單狀態。這將用於以程式設計方式更新訂單的運送狀態或申請取消。

現有訂單狀態值 

以下是訂單可能具有的現有訂單狀態列表。

注意 - Zonos 可能隨時新增更多狀態;您的系統應該適應更多狀態的存在。

生產環境中的狀態將保留在生產環境中。Zonos 永遠不會移除現有狀態。

狀態說明可由...設定
IGLOBAL_FRAUD_REVIEW訂單目前正在接受 iGlobal 欺詐審查。Zonos
IGLOBAL_ORDER_IN_PROCESS訂單有效且已準備好進行處理。Zonos
IGLOBAL_ORDER_ON_HOLD訂單目前處於暫時狀態保留。Zonos
IGLOBAL_ORDER_CANCELLED訂單已在 iGlobal 系統中被取消。Zonos
VENDOR_PREPARING_ORDER供應商已將訂單標記為準備中。供應商
VENDOR_SHIPMENT_READY供應商已將訂單標記為準備運送。供應商
VENDOR_LABELS_PRINTED_DATE供應商已列印運送標籤。供應商
VENDOR_CANCELLATION_REQUEST訂單已申請取消。供應商
VENDOR_END_OF_DAY_COMPLETE訂單已完成且已結束。供應商

vendorOrderStatus 在訂單處於以下任何訂單狀態時,無法由供應商更新:

IGLOBAL_LABELS_PROCESSINGIGLOBAL_ORDER_ON_HOLDIGLOBAL_FRAUD_REVIEWIGLOBAL_ORDER_CANCELLEDVENDOR_CANCELLATION_REQUESTVENDOR_END_OF_DAY_COMPLETE

HTTPS 要求

POST | https://api.iglobalstores.com/v1/updateVendorOrderStatus

欄位
HTTP 方法POST
端點 URLhttps://api.iglobalstores.com/v1/updateVendorOrderStatus
協議HTTPS
訊息格式JSON
接受 HTTP 標頭Accept: application/json
Content-Type HTTP 標頭Content-Type: application/json

請求本文中的 JSON 鍵/值對

訊息格式:JSON

1{
2 "store": "999",
3 "secret": "f5bde245-f55e-414d-b722-80b25161c12c",
4 "orderId": "999-9999",
5 "orderStatus": "VENDOR_END_OF_DAY_COMPLETE"
6}

請求 JSON 定義

欄位備註
orderId 必填Zonos 訂單 ID 可以使用或不使用您的商店 ID 和連字號進行傳遞(範例:123-45678 或 45678)。訂單完成和付款後,客戶將被重新導向至託管在您網域上的訂單完成/訂單謝謝您頁面。URL 將包含包含此值的查詢字符串參數 orderIDinteger / string
orderStatus 必填此欄位用於使用訂單的新狀態更新 Zonos 系統。以下訂單狀態可通過此 API 進行設定。- VENDOR_PREPARING_ORDER
  • VENDOR_SHIPMENT_READY
  • VENDOR_LABELS_PRINTED
  • VENDOR_END_OF_DAY_COMPLETE
  • VENDOR_CANCELLATION_REQUEST``string | | secret 必填 | Zonos 提供的 API 密鑰 GUID。string | | store 必填 | Zonos 提供的商店 IDinteger |

HTTPS 回應

訊息格式:JSON

1{
2 "success": "Updated Order: 99999 to new order status: VENDOR_PREPARING_ORDER"
3}

錯誤 HTTP 回應

HTTP 回應代碼回應本文範例/說明
406 - Not AcceptableHTML 實體。HTTP "Accept" 標頭無效。
415 - Unsupported media typeHTML 實體。HTTP "Content-Type" 標頭無效。
200"error":"could not parse input"
200"error":"Parameter orderId required for updateVendorOrderStatus"
200"error":"Parameter orderStatus required for updateVendorOrderStatus."
200"error":"orderId: 999-99999 is not a valid orderId"
200"error":"Could not retrieve order to updateVendorOrderStatus from orderId: 999-99999"
200"error":"OrderId: 999-99999 has already been cancelled and status cannot be updated."
200"error":"Cannot update order status to status: VENDOR_CANCELLATION_REQUEST"
200"error":"Cannot update order status to invalid status: NEW_ORDER_STATUS"
200"error":"OrderId: 999-99999 already has current status: VENDOR_SHIPMENT_READY"
200"error":"OrderId: 999-99999 cannot be moved to order status: VENDOR_CANCELLATION_REQUEST while in status: VENDOR_END_OF_DAY_COMPLETE"
200"error":"New Status: NEW_ORDER_STATUS is not a valid order status"
200"error":"Could not process updateVendorOrderStatus."
200"error":"Invalid security credentials"

回應 JSON 定義

訊息定義
success此參數將包含更新的摘要。string
error此參數只會在發生錯誤時出現在回應中,將包含原因的說明。string