运送订单

运送订单功能允许您更新订单中一个或全部商品的运送信息。当一个订单被完全运送,即订单中所有商品都已运送,那么这个订单就处理完成了。

请参考以下案例了解可接受的运送订单请求:
订单XYZ有5个商品A,一个商品B

  • 场景1单个包裹:包裹1,包含5个商品A和一个商品B,且使用一个运单号
  • 场景2单个包裹:包裹1,包含5个商品A且使用一个运单号
    • 这将被视为部分发货订单
    • 商品B应该在订单自动失效前通过包裹2发货,如果未发货,新蛋将从订单中删除商品B,并仅为订单中的商品A开具发票
  • 场景3多个包裹:包裹1包含5个商品A, 使用一个运单号;包裹2包含1个商品B,使用一个运单号
  • 场景4多个包裹:包裹1包含2个商品A, 使用一个运单号;包裹2包含3个商品A,使用一个运单号;包裹3包含1个商品B,使用一个运单号
  • 新蛋不接受这样提交部分运送的请求:仅有一个包裹只包含2个商品A,使用一个运单号
    • 新蛋系统会报错并提示商品A 的订购总数量与发货数量不匹配

相关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 2:运送订单
SellerID String 您在新蛋商城的商家编号
SONumber Integer 销售订单编号
TrackingNumber String 已发货包裹的运单号
ShipCarrier String 卖家在发货时使用的物流公司

Newegg.com,NeweggBusiness.com 以及Newegg.ca都可接受的有效值,请参考新蛋已对接物流商列表

ShipService String 物流服务类型,例如空运、陆运等。请直接向您使用的物流公司查询。
SellerPartNumber String 商品的Seller Part#(商家分配的商品编号)
NeweggItemNumber String 商品的Newegg Item#(新蛋商城分配的商品编号)
ShippedQty String 商品发货的数量。该值必须大于0。

Schema: ShipmentRequest.xsd

示例:XML,Request

注:<VALUE>必须附上<![CDATA[]]>,细节部分请看下面示例

PUT https://api.newegg.com/marketplace/can/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml

<UpdateOrderStatus>
    <Action>2</Action>
    <Value>
        <![CDATA[
<Shipment><Header><SellerID>A006</SellerID><SONumber>159243598</SONumber></Header><PackageList><Package><TrackingNumber>lztestA0060001</TrackingNumber><ShipCarrier>Other Carrier</ShipCarrier><ShipService>Other Service</ShipService><ItemList><Item><SellerPartNumber>A006ZX-35833</SellerPartNumber><ShippedQty>1</ShippedQty></Item></ItemList></Package></PackageList></Shipment>
]]>
    </Value>
</UpdateOrderStatus>

示例:Json,Request

PUT https://api.newegg.com/marketplace/can/ordermgmt/orderstatus/orders/{ordernumber}?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/Json
Accept: application/Json

{
    "Action": "2",
    "Value": {
        "Shipment": {
            "Header": {
                "SellerID": "A006",
                "SONumber": "159243598"
            },
            "PackageList": {
                "Package": [
                    {
                        "TrackingNumber": "alistestonly1",
                        "ShipCarrier": "Purolator",
                        "ShipService": "3-5",
                        "ItemList": {
                            "Item": {
                                "SellerPartNumber": "A3WG11002378965412586",
                                "ShippedQty": "1"
                            }
                        }
                    },
                    {
                        "TrackingNumber": "alistestonly2",
                        "ShipCarrier": "Purolator",
                        "ShipService": "3-5",
                        "ItemList": {
                            "Item": [
                                {
                                    "SellerPartNumber": "A3WG11002378965412583",
                                    "ShippedQty": "1"
                                },
                                {
                                    "SellerPartNumber": "A3WG11002378965412584",
                                    "ShippedQty": "1"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    }
}

回复文件主体

属性 格式 描述
IsSuccess String 用来确认订单更新操作是否成功 ,

始终返回 true

TotalPackageCount Integer 包裹数量
SuccessCount Integer 处理成功包裹数
FailCount Integer 处理失败包裹数
OrderNumber Integer 要进行操作的订单编号
SellerID String 您的商家编号
OrderStatus String 新订单状态:

  • Shipped(已全部发货)
  • PartiallyShipped(部分发货)
TrackingNumber String 已发货包裹的运单号
ShipDate String 发货时间(太平洋标准时间)
ProcessStatus String True或者 False:
True=包裹已被成功处理
False=包裹处理失败
SellerPartNumber String 商品的商家编号
NeweggItemNumber String 商品的新蛋编号
ShippedQty Integer 发货的商品数量

Schema: ShipmentResponse.xsd

示例:XML,Response

<?xml version="1.0" encoding="utf-8"?>
<UpdateOrderStatusInfo>
    <IsSuccess>true</IsSuccess>
    <PackageProcessingSummary>
        <TotalPackageCount>1</TotalPackageCount>
        <SuccessCount>1</SuccessCount>
        <FailCount>0</FailCount>
    </PackageProcessingSummary>
    <Result>
        <OrderNumber>159243598</OrderNumber>
        <SellerID>A006</SellerID>
        <OrderStatus>Shipped</OrderStatus>
        <Shipment>
            <PackageList>
                <Package>
                    <TrackingNumber>lztestA0060001</TrackingNumber>
                    <ShipDate>2012-02-10T15:30:01</ShipDate>
                    <ProcessStatus>true</ProcessStatus>
                    <ProcessResult>Success</ProcessResult>
                    <ItemList>
                        <ItemDes>
                            <NeweggItemNumber>9SIA0060845543</NeweggItemNumber>
                            <SellerPartNumber>A006ZX-35833</SellerPartNumber>
                            <ShippedQty>1</ShippedQty>
                        </ItemDes>
                    </ItemList>
                </Package>
            </PackageList>
        </Shipment>
    </Result>
</UpdateOrderStatusInfo>

示例:Json,Response

{
    "IsSuccess": true,
    "PackageProcessingSummary": {
        "FailCount": 0,
        "SuccessCount": 1,
        "TotalPackageCount": 1
    },
    "Result": {
        "OrderNumber": "159243598",
        "OrderStatus": "Shipped",
        "SellerID": "A006",
        "Shipment": {
            "PackageList": [
                {
                    "ItemList": [
                        {
                            "NeweggItemNumber": "9SIA0060845543",
                            "SellerPartNumber": "A006ZX-35833",
                            "ShippedQty": 1
                        }
                    ],
                    "ProcessResult": "Success",
                    "ProcessStatus": true,
                    "ShipDate": "2012-02-10T15:30:01",
                    "TrackingNumber": "lztestA0060001"
                }
            ]
        }
    }
}

请求失败错误信息

常规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