追踪商品库存
追踪商品默认发货仓库的有效库存信息。
相关URL
该操作只适用于Neweggbusiness.com和Newegg.ca平台。
Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/contentmgmt/item/inventory?sellerid={sellerid}&version={version}
Newegg.ca: https://api.newegg.com/marketplace/can/contentmgmt/item/inventory?sellerid={sellerid}&version={version}
注:请确保您的请求URL全都是小写(除Seller ID)并且不能包含任何空格或者换行符。
参数
| 名称 | 是否必填? | 描述 |
| sellerid | 是 | 您在新蛋商城的商家编号 |
| version | 是 | 可用版本号:304 |
相关请求信息
| HTTP方式 | 是否需要认证? | 请求格式 | 回复格式 | 频率限制 |
| POST | 需要 | XML,Json | XML,Json | 10,000 请求/小时 |
请求文件主体
| 属性 | 是否必须? | 格式 | 描述 |
| Condition | 否 | Integer | 有效值:
注:
|
| Type | 是 | Integer | 有效值:
|
| Value | 是 | String | 根据指定类型的字符串 |
Schema: GetItemInventoryRequest.xsd
示例:XML,Request
POST https://api.newegg.com/marketplace/b2b/contentmgmt/item/inventory?sellerid={SellerID}&version=304
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml
<ContentQueryCriteria>
<Type>1</Type>
<Value>A006testitem201201021459</Value>
</ContentQueryCriteria>
示例:Json,Request
POST https://api.newegg.com/marketplace/b2b/contentmgmt/item/inventory?sellerid={SellerID}&version=304
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json
{
"Type": "1",
"Value": "A006testitem201201021459"
}
回复文件主体
| 属性 | 格式 | 描述 |
| SellerID | String | 您的商家编码 |
| ItemNumber | String | Newegg Item#新蛋商品编号 |
| SellerPartNumber | String | Seller Part#商家商品编号 |
| FulfillmentOption | String | 有效值:
|
| Active | Integer |
|
| AvailableQuantity | Integer | 可用库存总数 |
| WarehouseCode | String | 现目前可用于新蛋配送的新蛋仓库: 适用于Neweggbusiness.com的有效值:
适用于Newegg.ca的有效值:
注:只有当产品为新蛋配送时才会返回该信息 |
| Quantity | Integer | 该新蛋仓库当前的有效库存数量
注:只有当商品目前存放在新蛋仓库时才会返回该信息。 |
Schema: GetItemInventoryResponse.xsd
示例:XML,Response
<?xml version="1.0" encoding="utf-8"?>
<InventoryResult>
<SellerID>A006</SellerID>
<ItemNumber>9SIA0060884598</ItemNumber>
<SellerPartNumber>A006testitem201201021459</SellerPartNumber>
<FulfillmentOption>1</FulfillmentOption >
<Active>0</Active>
<AvailableQuantity>50</AvailableQuantity>
<WarehouseAllocation>
<Warehouse>
<WarehouseCode>35</WarehouseCode>
<Quantity>3</Quantity>
</Warehouse>
<Warehouse>
<WarehouseCode>36</WarehouseCode>
<Quantity>37</Quantity>
</Warehouse>
<Warehouse>
<WarehouseCode>SBS</WarehouseCode>
<Quantity>10</Quantity>
</Warehouse>
</WarehouseAllocation>
</InventoryResult>
示例:Json,Response
{
"Active": "0",
"ItemNumber": "9SIA0060884598",
"SellerID": "A006",
"SellerPartNumber": "A006testitem201201021459",
"FulfillmentOption": "1",
"AvailableQuantity": 71,
"WarehouseAllocation": {
"Warehouse": [
{
"WarehouseCode": "35",
"Quantity": "3"
},
{
"WarehouseCode": "36",
"Quantity": "37"
}
]
}
}
请求失败错误信息
常规HTTP错误回复,请参考回复失败错误代码列表。
| 错误代码 | 描述 |
| CT001 | Invalid ItemNumber
无效的商品编号 |
| CT002 | Invalid SellerPartNumber
无效的Seller Part# |
| CT003 | Invalid UPCCode
无效的UPC Code |
| CT005 | Invalid Action Type. We only support: 0 – NE Item#, 1 — Seller Parts#, 2 — UPC Code
无效的Action类型。我们只支持:0-NE Item#,1- Seller Parts#,2-UPC Code |
| CT010 | Cannot find item with specified item condition.
找不到指定condition的商品 |
| CT026 | No data found
找不到数据 |
示例:XML,Response
<?xml version="1.0" encoding="utf-8"?>
<Errors>
<Error>
<Code>CT002</Code>
<Message>Invalid SellerPartNumber</Message>
</Error>
</Errors>
示例:Json,Response
[
{
"Code": "CT002",
"Message": "Invalid SellerPartNumber"
}
]
更新日期:10/15/2018