取消订单

通过指定订单号取消订单。

相关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 订单,只能使用新蛋货运标签服务运送。

示例: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