获取子类目状态
获取指定商家账户下的子类目状态。子类目对该商家是否开放。
相关URL
Newegg.com: https://api.newegg.com/marketplace/sellermgmt/seller/subcategory?sellerid={sellerid} Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/sellermgmt/seller/subcategory?sellerid={sellerid} Newegg.ca: https://api.newegg.com/marketplace/can/sellermgmt/seller/subcategory?sellerid={sellerid}
注:请确保您的请求URL全都是小写(除Seller ID)并且不能包含任何空格或者换行符。
参数
名称 | 是否必填? | 描述 |
sellerid | 是 | 您在新蛋商城的商家编号 |
相关请求信息
HTTP方式 | 是否需要认证? | 请求格式 | 回复格式 | 频率限制 |
PUT | 需要 | XML,Json | XML,Json | 100 请求/小时 |
请求文件主体
属性 | 是否必填? | 格式 | 描述 |
OperationType | 是 | String | 固定值:GetSellerSubcategoryRequest |
SubcategoryID | 否 | Integer | 子类目编号 若填写了该字段,那么回复中只包含指定子类目编号的信息。 |
IndustryCode | 否 | String | 主类目代码 |
Enabled | 否 | Integer | 由子类当前状态作为条件来过滤当前的请求。有效值: 0 – Not Enabled(未开放的) 1 – Enabled(开放的) 若为空,回复将返回已开放和未开放子类目 |
Schema: GetSubcatetoryRequest.xsd
示例:XML,Request
PUT https://api.newegg.com/marketplace/sellermgmt/seller/subcategory?sellerid={sellerid} Authorization: 720ddc067f4d115bd544aff46bc75634 SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D Content-Type: application/xml Accept: application/xml <NeweggAPIRequest> <OperationType>GetSellerSubcategoryRequest</OperationType> <RequestBody> <GetItemSubcategory> <SubcategoryIDList> <SubcategoryID>397</SubcategoryID> </SubcategoryIDList> <IndustryCodeList> <IndustryCode>CH</IndustryCode> </IndustryCodeList> <Enabled>1</Enabled> </GetItemSubcategory> </RequestBody> </NeweggAPIRequest>
示例:Json,Response
PUT https://api.newegg.com/marketplace/sellermgmt/seller/subcategory?sellerid={sellerid} Authorization: 720ddc067f4d115bd544aff46bc75634 SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D Content-Type: application/json Accept: application/json { "OperationType": "GetSellerSubcategoryRequest", "RequestBody": { "GetItemSubcategory": { "SubcategoryIDList": { "SubcategoryID": "397" }, "IndustryCodeList": { "IndustryCode": "CH" }, "Enabled": "1" } } }
回复文件主体
属性 | 格式 | 描述 |
IsSuccess | String | 用于获取数据状态的操作: True:成功 False:失败 |
OperationType | String | 固定值:GetSellerSubcategoryResponse |
SellerID | String | 您的商家编号 |
IndustryCode | String | 新蛋主类目编码 |
IndustryName | String | 新蛋主类目名称 |
SubcategoryID | Integer | 子类目编号 |
SubcategoryName | String | 子类目名称 |
Enabled | Integer | 子类目对此商家是否是开放 有效值: 0 – Not Enabled(未开放的) 1 – Enabled(开放的) |
Schema: GetSubcatetoryResponse.xsd
示例:XML,Request
<?xml version="1.0" encoding="utf-8"?> <NeweggAPIResponse> <IsSuccess>true</IsSuccess> <OperationType>GetSellerSubcategoryResponse</OperationType> <SellerID>A006</SellerID> <ResponseBody> <SubcategoryList> <Subcategory> <IndustryCode>AP</IndustryCode> <IndustryName>Apparel</IndustryName> <SubcategoryID>1508</SubcategoryID> <SubcategoryName> <![CDATA[Belts & Suspenders]]> </SubcategoryName> <Enabled>1</Enabled> </Subcategory> <Subcategory> <IndustryCode>AP</IndustryCode> <IndustryName>Apparel</IndustryName> <SubcategoryID>153</SubcategoryID> <SubcategoryName> <![CDATA[Buckles]]> </SubcategoryName> <Enabled>0</Enabled> </Subcategory> </SubcategoryList> </ResponseBody> </NeweggAPIResponse>
示例:Json,Response
{ "IsSuccess": "true", "OperationType": "GetSellerSubcategoryResponse", "SellerID": "A006", "ResponseBody": { "SubcategoryList": [ { "IndustryCode": "AP", "IndustryName": "Apparel", "SubcategoryID": "1508", "SubcategoryName": "Belts & Suspenders", "Enabled": "1" }, { "IndustryCode": "AP", "IndustryName": "Apparel", "SubcategoryID": "153", "SubcategoryName": "Buckles", "Enabled": "0" } ] } }
请求失败错误信息
常规HTTP错误回复,请参考回复失败错误代码列表。
错误代码 | 描述 |
DF008 | Invalid industry code [{0}].
无效的主类目编码[{0}]. |
示例:XML,Request
<?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