取消訂單
通過指定訂單編號取消訂單。
相關URL
Newegg.com: https://api.newegg.com/marketplace/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}&version={version}
Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}&version={version}
Newegg.ca: https://api.newegg.com/marketplace/can/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}&version={version}
註:請確保您的請求URL全都是小寫(除Seller ID)並且不能包含任何空格或者分行符號。
參數
| 名稱 | 是否必填? | 描述 |
| sellerid | 是 | 您在新蛋商城的商家編號 |
| ordernumber | 是 | 訂單編號 |
| version | 否 | 可用版本號:304 |
相關請求資訊
| HTTP方式 | 是否需要認證 | 請求格式 | 回覆格式 | 頻率限制 |
| PUT | 需要 | XML,Json | XML,Json | 1000 請求/小時 |
請求文件主體
| 屬性 | 是否必填 | 格式 | 描述 |
| Action | 是 | Integer | 1:取消訂單 註:如果新蛋配送的訂單正在由新蛋倉庫處理, 該訂單不能被取消。請使用獲取取消新蛋配送SBN訂單請求結果來檢查狀態 |
| Value | 是 | Integer | 取消訂單理由編碼: 24:OutOfStock(無庫存) 72:Customer Requested to Cancel(客戶要求取消訂單) 73:PriceError(價格錯誤) 74:Unable to Fulfill Order(無法履行訂單) |
Schema: CancelRequest.xsd
示例:XML, Request
PUT https://api.newegg.com/marketplace/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept:application/xml
<UpdateOrderStatus>
<Action>1</Action>
<Value>24</Value>
</UpdateOrderStatus>
示例:Json, Request
PUT https://api.newegg.com/marketplace/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json
{
"Action": "1",
"Value": "24"
}
回覆文件主體
| 屬性 | 格式 | 描述 |
| IsSuccess | String | 用於確定訂單更新操作是否成功,
返回結果為 True或者False |
| OrderNumber | Integer | 訂單編號 |
| SellerID | String | 您的新蛋賣家編號 |
| OrderStatus | String | 訂單狀態,有效值: Void:作廢訂單操作成功 Processing:取消訂單請求已收到正在進行操作。此狀態僅適用於取消新蛋配送SBN訂單的請求。 可以使用獲取取消新蛋配送SBN訂單請求結果來查看最終的操作結果。 |
Schema: CancelOrderResponse.xsd
示例:XML, Response
<?xml version="1.0" encoding="utf-8"?>
<UpdateOrderStatusInfo>
<IsSuccess>true</IsSuccess>
<Result>
<OrderNumber>159243598</OrderNumber>
<SellerID>A006</SellerID>
<OrderStatus>Void</OrderStatus>
</Result>
</UpdateOrderStatusInfo>
示例:Json, Response
{
"IsSuccess": "true",
"Result": {
"OrderNumber": "159243598",
"SellerID": "A006",
"OrderStatus": "Void"
}
}
請求失敗錯誤資訊
常規HTTP錯誤回應,請參考回覆失敗錯誤代碼清單。
| 錯誤代碼 | 描述 |
| SO001 | Seller ID cannot be null or empty
Seller ID(商家編號)不能為空。 |
| SO002 | Order Number should be an integer (ranging from 1 to 2147483647)
訂單編號應為整數(區間為 1 到 2147483647)。 |
| SO003 | No data found or this order does not belong to this seller
找不到資料或此訂單不屬於這該商家。 |
| SO004 | This is a replacement SO with a RMA number. It cannot be voided
此訂單是帶有 RMA 編號的換貨訂單,不能被作廢。 |
| SO005 | Cannot remove item because this is a Shipped by Newegg order. order is Shipped by Newegg
不能移除由新蛋 SBN 服務運送的訂單中的商品。此訂單由新蛋 SBN 服務運送。 |
| SO006 | Only unshipped orders can be voided. The order status is currently {0}
只有未發貨的訂單才能被刪除。當前訂單狀態為{0}。 |
| SO007 | Cannot get the order status info
不能獲取訂單狀態資訊。 |
| SO008 | This order has already been voided
此訂單已被作廢。 |
| SO009 | Order number cannot be null or empty
訂單編號不能為空。 |
| SO010 | Invalid order. No item exists
無效訂單。此訂單無商品。 |
| SO011 | Only unshipped orders can be shipped. The order status is currently {0}
只有未發貨的訂單才能被運送。訂單狀態當前為{0}。 |
| SO012 | Only shipped by seller orders can be supported currently
當前只支援商家配送的訂單。 |
| SO014 | The action should be [ Canceled = 1 | Shipped = 2]
操作應該是 [ 已取消 = 1 | 已發貨 = 2]。 |
| SO015 | The Argument ‘{0}’ cannot be null
參數‘{0}不能為空。 |
| SO016 | This order has not been downloaded onto seller portal yet. Please re-submit your request after two hours.
此訂單目前不能在 seller portal 上下載。請在兩小時後重新提交請求。 |
| SO017 | Reason code should be [24 — OutOfStock,72 — Customer Requested to Cancel,73 — PriceError,74 — Unable to Fulfill the Order]
原因代碼應為 [24 – 缺貨,72 – 顧客請求取消訂單,73 – 價格錯誤,74 – 無法完成訂單]。 |
| SO020 | There is a package or packages without shipping information in this shipment.
訂單在此貨運單中有一個或多個包裹缺失運輸資訊。 |
| SO025 | Some items in the shipment have already been shipped.
此貨運單中的部分商品已被運出。 |
| SO027 | This order has already been shipped.
此訂單已發貨。 |
| SO030 | There is a format error in shipment segment of this XML request.
此 XML 請求的運送資訊部分有格式錯誤。 |
| SO036 | The order’s shipping method is null. Please contact System Admin.
訂單的運送方式為空,請聯繫系統管理員。 |
| SO037 | The action should be [1 – Cancelled, 2 – Shipped]
操作應為[1 – 已取消, 2 – 已發貨]。 |
| SO040 | The Order number or Seller ID provided is not the same as in the URL.
提供的訂單編號或商家編號與 URL 中的不匹配。 |
| SO056 | Your request cannot be processed. Order:[order #] is a Newegg Premier order and can only be shipped using Newegg Shipping Label Service.
你的請求無法處理。訂單編號[order #]是一個 Newegg Premier 訂單,只能使用 Newegg Shipping Label Service 服務運送。 |
示例:XML, Response
<?xml version="1.0" encoding="utf-8"?>
<Errors>
<Error>
<Code>SO002</Code>
<Message>Order Number should be an integer (ranging from 1 to 2147483647)</Message>
</Error>
</Errors>
示例:Json, Response
[
{
"Code": "SO002",
"Message": "Order Number should be an integer (ranging from 1 to 2147483647)"
}
]
更新日期:10/15/2018