獲取主類目列表
獲取目前為止新蛋商城主類目列表。返回包含主類目編碼和名稱。
相關URL
Newegg.com: https://api.newegg.com/marketplace/sellermgmt/seller/industry?sellerid={sellerid}&industrycode={industrycode}
Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/sellermgmt/seller/industry?sellerid={sellerid}&industrycode={industrycode}
Newegg.ca: https://api.newegg.com/marketplace/can/sellermgmt/seller/industry?sellerid={sellerid}&industrycode={industrycode}
註:請確保您的請求URL全都是小寫(除Seller ID)並且不能包含任何空格或者分行符號。
參數
| 名稱 | 是否必填? | 描述 |
| sellerid | 是 | 您在新蛋商城的商家編號 |
| industrycode | 否 | 主類目編碼
如果您不指定該參數,系統將返回所有主類目。 |
相關請求資訊
| HTTP方式 | 是否需要認證? | 請求格式 | 回復格式 | 頻率限制 |
| GET | 需要 | XML,Json | XML,Json | 10,000請求/小時 |
示例:XML, Request
GET https://api.newegg.com/marketplace/sellermgmt/seller/industry?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml
示例:Json, Request
GET https://api.newegg.com/marketplace/sellermgmt/seller/industry?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json
回覆文件主體
| 屬性 | 格式 | 描述 |
| IsSuccess | String | 用於獲取資料狀態的操作 True:成功 False:失敗 |
| SellerID | String | 您的商家編號 |
| IndustryCode | String | 新蛋主類目編碼 |
| IndustryName | String | 新蛋主類目名稱 |
Schema: GetIndustryResponse.xsd
示例: XML, Response
<?xml version="1.0" encoding="utf-8"?>
<NeweggAPIResponse>
<IsSuccess>true</IsSuccess>
<OperationType>GetSellerIndustryResponse</OperationType>
<SellerID>A006</SellerID>
<ResponseBody>
<IndustryList>
<Industry>
<IndustryCode>AP</IndustryCode>
<IndustryName>Apparel</IndustryName>
</Industry>
<Industry>
<IndustryCode>AL</IndustryCode>
<IndustryName>Appliance</IndustryName>
</Industry>
</IndustryList>
</ResponseBody>
</NeweggAPIResponse>
示例: Json, Response
{
"IsSuccess": "true",
"OperationType": "GetSellerIndustryResponse",
"SellerID": "A006",
"ResponseBody": {
"IndustryList": [
{
"IndustryCode": "AP",
"IndustryName": "Apparel"
},
{
"IndustryCode": "AL",
"IndustryName": "Appliance"
}
]
}
}
請求失敗錯誤資訊
常規HTTP錯誤回應,請參考回覆失敗錯誤代碼清單。
| 錯誤代碼 | 描述 |
| DF008 | Invalid industry code [{0}].
無效的主類目編碼[{0}]. |
示例: XML, Response
<?xml version="1.0" encoding="utf-8"?>
<Errors>
<Error>
<Code>DF008</Code>
<Message>Invalid industry code ABC</Message>
</Error>
</Errors>
示例: Json, Response
[
{
"Code": "DF008",
"Message": "Invalid industry code ABC"
}
]
更新日期:10/15/2018