目前訂單狀態值
以下是訂單可能具有的目前狀態清單。
注意 - 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 |
| 端點 URL | https://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 將包含包含此值的查詢字串參數 orderID。integer / string |
orderStatus 必要 | 此欄位用於以訂單的新狀態更新 Zonos 系統。以下訂單狀態可透過此 API 設定。- VENDOR_PREPARING_ORDER |
VENDOR_SHIPMENT_READYVENDOR_LABELS_PRINTEDVENDOR_END_OF_DAY_COMPLETEVENDOR_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 Acceptable | HTML Entity。HTTP "Accept" 標題無效。 |
| 415 - Unsupported media type | HTML 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 |
更新訂單狀態
瞭解更新訂單狀態端點的運作方式。updateVendorOrderStatus端點用於更新 Zonos 系統內訂單的狀態。這將用於以程式設計方式更新訂單的運送狀態或申請取消。