更新訂單狀態

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

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
Accept 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 提供的商店 ID integer |

HTTPS 回應

訊息格式:JSON

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

錯誤 HTTP 回應

HTTP 回應代碼回應正文範例/描述
406 - Not AcceptableHTML Entity。HTTP "Accept" 標題無效。
415 - Unsupported media typeHTML Entity。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