批量追踪商品库存

批量追踪商品在全球所有已登记的仓库,包括美国仓的有效库存信息。

相关URL

Newegg.com: https://api.newegg.com/marketplace/contentmgmt/item/international/inventorylist?sellerid={SellerID}

注:请确保您的请求URL全都是小写(除Seller ID)并且不能包含任何空格或者换行符。

参数

名称 是否必填? 描述
sellerid 您在新蛋商城的商家编号

相关请求信息

HTTP方式 是否需要认证? 请求格式 回复格式 频率限制
PUT 需要 XML,Json XML,Json 10,000 请求/小时

请求文件主体

属性 是否必填? 格式 描述
Type Integer 有效值:
0: NE Item#(新蛋商品编号)
1: Seller Part#(商家商品编号)
2: UPC Code(UPC编号)
如果不填,默认值为Seller Part#
Value String Array 多个指定值的字符串,最大长度为100
WarehouseList String Array 您仓库所在国家的国际标准3位国家编码。
完整国家代码列表,请通过以下链接下载:International Country Guide
如果不填,则默认为所有

Schema: GetInventoryListRequest.xsd

示例:XML,Request

POST https://api.newegg.com/marketplace/contentmgmt/item/international/inventorylist?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml

<ContentQueryCriteria>
  <Type>1</Type>
  <Values>
    <Key>A006-TestItem-001</Key>
    <Key>A006-TestItem-002</Key>
    <Key>A006-TestItem-003</Key>
  </Values>
  <WarehouseList>
    <WarehouseLocation>USA</WarehouseLocation>
    <WarehouseLocation>AUS</WarehouseLocation>
  </WarehouseList>
</ContentQueryCriteria>

示例:Json,Request

POST https://api.newegg.com/marketplace/contentmgmt/item/international/inventorylist?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json

{
  "Type": "1",
  "Values": ["A006-TestItem-001","A006-TestItem-002","A006-TestItem-003"],
  "WarehouseList": ["USA","AUS"]
}

回复文件主体

属性 格式 描述
SellerID String 您的商家编号
TotalCount Integer 库存数量盘点
SellerPartNumber String Seller part#,卖家自定义的商品唯一标识符
ItemNumber String 以9SI开头的新蛋商品编号
WarehouseLocation String 您仓库所在国家的国际标准3位国家编码。

完整国家代码列表,请通过以下链接下载:International Country Guide

FulfillmentOption String 有效值:
0: ShipBySeller(商家配送)
1: ShipByNewegg(新蛋配送)
Condition Integer 有效值:
1. New(全新的)
2. Refurbished(翻新的)
3. Used – Like New(二手-类似新品)
4. Used – Very Good(二手-非常好)
5. Used – Good(二手-好)
6. Used – Acceptable(二手-尚可)
AvailableQuantity Integer 该仓库当前的有效库存数量
WarehouseCode String 表明库存在新蛋哪个仓库中。
有效值:
06: Tennessee Bulk Warehouse(田纳西大型仓库)
07: California Small Warehouse(加利福尼亚小型仓库)
08: California Bulk Item Warehouse(加利福尼亚大型仓库)
10: New Jersey Bulk Warehouse(新泽西大型仓库)
12: Tennessee Small Warehouse(田纳西大型仓库)
14: New Jersey Small Warehouse(新泽西小型仓库)
注:只有当商品目前存放在新蛋仓库时才会返回该信息。
Quantity Integer 该新蛋仓库当前的有效库存数量
注:只有当商品目前存放在新蛋仓库时才会返回该信息。
默认值:0

Schema: GetInventoryListResponse.xsd

示例:XML,Response

<NeweggAPIResponse
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
  xmlns:xsd=http://www.w3.org/2001/XMLSchema>
  <IsSuccess>true</IsSuccess>
  <OperationType>GetInventoryList</OperationType>
  <SellerID>A006</SellerID>
  <ResponseDate>2022-04-20T23:46:41.7786361-07:00</ResponseDate>
  <ResponseBody>
    <ItemList>
      <InventoryResult>
        <ItemNumber>9SIA00603V5190</ItemNumber>
        <SellerPartNumber>A006-TestItem-001</SellerPartNumber>
        <Condition>1</Condition>
        <InventoryAllocation>
          <Inventory>
            <WarehouseLocation>USA</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>10</AvailableQuantity>
          </Inventory>
          <Inventory>
            <WarehouseLocation>AUS</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>0</AvailableQuantity>
          </Inventory>
        </InventoryAllocation>
      </InventoryResult>
      <InventoryResult>
        <ItemNumber>9SIA00603V5191</ItemNumber>
        <SellerPartNumber>A006-TestItem-002</SellerPartNumber>
        <Condition>1</Condition>
        <InventoryAllocation>
          <Inventory>
            <WarehouseLocation>USA</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>5</AvailableQuantity>
          </Inventory>
          <Inventory>
            <WarehouseLocation>AUS</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>10</AvailableQuantity>
          </Inventory>
        </InventoryAllocation>
      </InventoryResult>
      <InventoryResult>
        <ItemNumber>9SIA00603V5192</ItemNumber>
        <SellerPartNumber>A006-TestItem-003</SellerPartNumber>
        <Condition>1</Condition>
        <InventoryAllocation>
          <Inventory>
            <WarehouseLocation>AUS</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>15</AvailableQuantity>
          </Inventory>
          <Inventory>
            <WarehouseLocation>KOR</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>20</AvailableQuantity>
          </Inventory>
        </InventoryAllocation>
      </InventoryResult>
    </ItemList>
    <TotalCount>3</TotalCount>
  </ResponseBody>
</NeweggAPIResponse>

示例:Json,Response

{
  "ResponseBody": {
    "ItemList": [
      {
        "ItemNumber": "9SIA00603V5190",
        "SellerPartNumber": "A006-TestItem-001",
        "Condition": 1,
        "InventoryAllocation": [
          {
            "WarehouseLocation": "USA",
            "FulfillmentOption": "0",
            "AvailableQuantity": 10
          },
          {
            "WarehouseLocation": "AUS",
            "FulfillmentOption": "0",
            "AvailableQuantity": 0
          }
        ]
      },
      {
        "ItemNumber": "9SIA00603V5191",
        "SellerPartNumber": "A006-TestItem-002",
        "Condition": 1,
        "InventoryAllocation": [
          {
            "WarehouseLocation": "USA",
            "FulfillmentOption": "0",
            "AvailableQuantity": 5
          },
          {
            "WarehouseLocation": "AUS",
            "FulfillmentOption": "0",
            "AvailableQuantity": 10
          }
        ]
      },
      {
        "ItemNumber": "9SIA00603V5192",
        "SellerPartNumber": "A006-TestItem-003",
        "Condition": 1,
        "InventoryAllocation": [
          {
            "WarehouseLocation": "USA",
            "FulfillmentOption": "0",
            "AvailableQuantity": 15
          },
          {
            "WarehouseLocation": "AUS",
            "FulfillmentOption": "0",
            "AvailableQuantity": 20
          }
        ]
      }
    ],
    "TotalCount": 3
  },
  "IsSuccess": true,
  "OperationType": "GetInventoryList",
  "SellerID": "A006",
  "ResponseDate": "2022-04-20T23:46:41.7786361-07:00"
}

请求失败错误信息

常规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"
    }
]

更新日期: 03/09/2022