追蹤商品庫存
追蹤商品在全球所有已登記的倉庫,包括美國倉的有效庫存資訊。
相關URL
Newegg.com: https://api.newegg.com/marketplace/contentmgmt/item/international/inventory?sellerid={sellerid}
註:請確保您的請求URL全都是小寫(除Seller ID)並且不能包含任何空格或者分行符號。
參數
| 名稱 | 是否必填? | 描述 | 
| sellerid | 是 | 您在新蛋商城的商家編號 | 
相關請求資訊
| HTTP方式 | 是否需要認證? | 請求格式 | 回覆格式 | 頻率限制 | 
| PUT | 需要 | XML,Json | XML,Json | 10,000請求/小時 | 
請求文件主體
| 屬性 | 是否必填? | 格式 | 描述 | 
| Condition | 否 | Integer | 有效值: 
 註: 
 | 
| Type | 是 | Integer | 可用屬性: 
 | 
| Value | 是 | String | 根據指定類型的字串 | 
| WarehouseLocation | 否 | String | 您倉庫所在國家的國際標準3位元國家編碼。 完整國家代碼清單,請通過以下連結下載:International Country Guide 如果不填,則默認為所有 | 
Schema: GetInventoryRequest.xsd
示例:XML, Request
PUT https://api.newegg.com/marketplace/contentmgmt/item/international/inventory?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml
<ContentQueryCriteria>
    <Type>1</Type>
    <Value>A006testitem201201021459</Value>
    <WarehouseList>
        <WarehouseLocation>USA</WarehouseLocation>
        <WarehouseLocation>AUS</WarehouseLocation>
    </WarehouseList>
</ContentQueryCriteria>
示例:Json, Request
PUT https://api.newegg.com/marketplace/contentmgmt/item/international/inventory?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json
{
    "Type": "1",
    "Value": "A006testitem201201021459",
    "WarehouseList": {
        "WarehouseLocation": [
            "USA",
            "AUS"
        ]
    }
}
回覆文件主體
| 屬性 | 格式 | 描述 | 
| SellerID | String | 您的商家編號 | 
| ItemNumber | String | 新蛋分配的商品編號 | 
| SellerPartNumber | String | Seller part# 商家商品編號 | 
| WarehouseLocation | String | 您倉庫所在國家的國際標準3位元國家編碼; 完整國家代碼清單,請通過以下連結下載:International Country Guide | 
| FulfillmentOption | String | 有效值: 
 | 
| AvailableQuantity | Integer | 該倉庫當前的有效庫存數量 | 
| WarehouseCode | String | 表明庫存在新蛋哪個倉庫中。 有效值: 
 註:只有當商品目前存放在新蛋倉庫時才會返回該資訊。 | 
| Quantity | Integer | 該新蛋倉庫當前的有效庫存數量 註:只有當商品目前存放在新蛋倉庫時才會返回該資訊。 | 
Schema: GetInventoryResponse.xsd
示例: XML, Response
<?xml version="1.0" encoding="utf-8"?>
<InventoryResult>
    <SellerID>A006</SellerID>
    <ItemNumber>9SIA0060884598</ItemNumber>
    <SellerPartNumber>A006testitem201201021459</SellerPartNumber>
    <InventoryAllocation>
        <Inventory>
            <WarehouseLocation>USA</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>107</AvailableQuantity>
        </Inventory>
        <Inventory>
            <WarehouseLocation>USA</WarehouseLocation>
            <FulfillmentOption>1</FulfillmentOption>
            <AvailableQuantity>40</AvailableQuantity>
            <WarehouseAllocation>
                <Warehouse>
                    <WarehouseCode>07</WarehouseCode>
                    <Quantity>3</Quantity>
                </Warehouse>
                <Warehouse>
                    <WarehouseCode>12</WarehouseCode>
                    <Quantity>37</Quantity>
                </Warehouse>
            </WarehouseAllocation>
        </Inventory>
        <Inventory>
            <WarehouseLocation>AUS</WarehouseLocation>
            <FulfillmentOption>0</FulfillmentOption>
            <AvailableQuantity>0</AvailableQuantity>
        </Inventory>
    </InventoryAllocation>
</InventoryResult>
示例: Json, Response
{
    "SellerID": "A006",
    "ItemNumber": "9SIA0060884598",
    "SellerPartNumber": "A006testitem201201021459",
    "InventoryAllocation": {
        "Inventory": [
            {
                "WarehouseLocation": "USA",
                "FulfillmentOption": "0",
                "AvailableQuantity": "107"
            },
            {
                "WarehouseLocation": "USA",
                "FulfillmentOption": "1",
                "AvailableQuantity": "40",
                "WarehouseAllocation": {
                    "Warehouse": [
                        {
                            "WarehouseCode": "07",
                            "Quantity": "3"
                        },
                        {
                            "WarehouseCode": "12",
                            "Quantity": "37"
                        }
                    ]
                }
            },
            {
                "WarehouseLocation": "AUS",
                "FulfillmentOption": "0",
                "AvailableQuantity": "0"
            }
        ]
    }
}
請求失敗錯誤資訊
常規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
