更新商品庫存
維護包括美國在內全球所有註冊倉庫商品的庫存資訊。
相關URL
Newegg.com: https://api.newegg.com/marketplace/contentmgmt/item/international/inventory?sellerid={sellerid}
註:請確保您的請求URL全都是小寫(除Seller ID)並且不能包含任何空格或者分行符號。
參數
| 名稱 | 是否必填? | 描述 |
| sellerid | 是 | 您在新蛋商城的商家編號 |
相關請求資訊
| HTTP方式 | 是否需要認證? | 請求格式 | 回覆格式 | 頻率限制 |
| POST | 需要 | XML,Json | XML,Json | 10,000 請求/小時 |
請求文件主體
| 屬性 | 是否必填? | 格式 | 描述 |
| Type | 是 | Integer | 有效值:
|
| Value | 是 | String | 指定查詢類型的字串 |
| Condition | 否 | Integer | 有效值:
註:當type是[2-UPC code]時,當前值有效;當type不是[2-UPC code]時,當前值會被忽略 |
| WarehouseLocation | 是 | String | 您倉庫所在國家的國際標準3位元國家編碼。 完整國家代碼清單,請通過以下連結下載:International Country Guide 註:含有錯誤值得提交將會報錯 |
| AvailableQuantity | 是 | integer | 賣家指定倉庫裡的商品數量 |
Schema: UpdateInventoryRequest.xsd
示例:XML, Request
POST https://api.newegg.com/marketplace/contentmgmt/item/international/inventory?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Accept: application/xml
Content-Type: application/xml
<ItemInventoryInfo>
<Type>1</Type>
<Value>A006BSP3</Value>
<InventoryList>
<Inventory>
<WarehouseLocation>USA</WarehouseLocation>
<AvailableQuantity>107</AvailableQuantity>
</Inventory>
<Inventory>
<WarehouseLocation>AUS</WarehouseLocation>
<AvailableQuantity>0</AvailableQuantity>
</Inventory>
</InventoryList>
</ItemInventoryInfo>
示例:Json, Request
POST https://api.newegg.com/marketplace/contentmgmt/item/international/inventory?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Accept: application/json
Content-Type: application/json
{
"Type": "1",
"Value": "A006BSP3",
"InventoryList": {
"Inventory": [
{
"WarehouseLocation": "USA",
"AvailableQuantity": "107"
},
{
"WarehouseLocation": "AUS",
"AvailableQuantity": "0"
}
]
}
}
回覆文件主體
| 屬性 | 格式 | 描述 |
| SellerID | String | 您的商家編號 |
| ItemNumber | String | 新蛋分配的商家編號 |
| SellerPartNumber | String | Seller Part# 商家商品編號 |
| WarehouseLocation | String | 您倉庫所在國家的國際標準3位元國家編碼; 完整國家代碼清單,請通過以下連結下載:International Country Guide |
| AvailableQuantity | Integer | 該倉庫當前的有效庫存數量 |
Schema: UpdateInventoryResponse.xsd
示例: XML, Response
<?xml version="1.0" encoding="utf-8"?>
<UpdateInventoryResult>
<SellerID>A006</SellerID>
<ItemNumber>9SIA00607Y6476</ItemNumber>
<SellerPartNumber>A006BSP3</SellerPartNumber>
<InventoryList>
<Inventory>
<WarehouseLocation>USA</WarehouseLocation>
<AvailableQuantity>107</AvailableQuantity>
</Inventory>
<Inventory>
<WarehouseLocation>AUS</WarehouseLocation>
<AvailableQuantity>0</AvailableQuantity>
</Inventory>
</InventoryList>
</UpdateInventoryResult>
示例: Json, Response
{
"SellerID": "A006",
"ItemNumber": "9SIA00607Y6476",
"SellerPartNumber": "A006BSP3",
"InventoryList": {
"Inventory": [
{
"WarehouseLocation": "USA",
"AvailableQuantity": "107"
},
{
"WarehouseLocation": "AUS",
"AvailableQuantity": "0"
}
]
}
}
請求失敗錯誤資訊
常規HTTP錯誤回應,請參考回覆失敗錯誤代碼清單。
| 錯誤代碼 | 描述 |
| CT001 | Invalid ItemNumber 無效的商品編號 |
| CT002 | Invalid SellerPartNumber 無效的 Seller Part # |
| CT003 | Invalid UPCCode 無效的 UPC 編碼 |
| 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 的商品 |
| CT014 | SellerItemNumber or SellerPartNumber does not exist SellerItemNumber 或 SellerPartNumber 不存在 |
| CT015 | Item does not belong to this seller 該商品不屬於這個商家 |
| CT023 | Inventory value must be between 0 and 999999 庫存值必須在 0 至 999999 之間 |
| CT025 | This item is an approved promotion and its minimum inventory cannot be lower than {0} 這個商品正在促銷,它的最小庫存值不能低於{0}. |
| CT055 | This is a duplicated request for Seller Part #: [seller part #]. This item does not exist in Newegg so we are not able to process your request. We will resume the process of price and inventory update for this item 8 hours after [last failed timestamp]. 此請求為 Seller Part #: [seller part #]的重複請求。此商品不存在於 Newegg,因此我們無法處理您的請求。我們將會在[上一次失敗的時間]的 8 小時之後重新處理該商品的價格和庫存的更新請求。 |
| CT073 | The request for item: { SellerPart#} has been processed with error.Country: [country1,country2] Failed reason: The specified warehouse location has not been setup yet. Please set up your warehouse(s) then submit your request again. 商品{ SellerPart#}的請求已處理但有錯誤。錯誤原因:指定的倉庫所在地沒有被設置。請設置您的倉庫然後重新提交請求。 |
示例: XML, Response
<?xml version="1.0" encoding="utf-8"?>
<Errors>
<Error>
<Code>CE003</Code>
<Message> The 'Type' element is invalid - The value 'a' is invalid according to its
datatype 'Int' - The string 'a' is not a valid Int32 value.</Message>
</Error>
</Errors>
示例: Json, Response
{
"Code": "CT002",
"Message": "Invalid SellerPartNumber"
}
更新日期:10/15/2018