獲取子類目狀態 v1.1

基於“獲取子目錄狀態”API,增加了對網站類別編號和目標的搜索。

相關URL

Newegg.com: https://api.newegg.com/marketplace/sellermgmt/seller/subcategory/v1.1?sellerid={sellerid}
Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/sellermgmt/seller/subcategory/v1.1?sellerid={sellerid}
Newegg.ca: https://api.newegg.com/marketplace/can/sellermgmt/seller/subcategory/v1.1?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(開放的)
若為空,回覆將返回已開放和未開放子類目
WebSiteCategoryID Integer 商城網站類別編號
如果提供該值,回覆將僅包含指定網站類別編號的資訊
WebSiteCatalogName String 商城網站目錄名稱
此值可為關鍵字。如果提供該值,回覆將僅包含指定網站目錄名稱的資訊

Schema:  GetSubcatetoryRequestV1.1.xsd

示例:XML, Request

PUT https://api.newegg.com/marketplace/sellermgmt/seller/subcategory/v1.1?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml

<NeweggAPIRequest>
    <OperationType>GetSellerSubcategoryRequest</OperationType>
    <RequestBody>
        <GetItemSubcategory>
            <WebSiteCategoryIDList>
                <WebSiteCategoryID>402</WebSiteCategoryID>
                <WebSiteCategoryID>134</WebSiteCategoryID>
            </WebSiteCategoryIDList>
            <WebSiteCatalogName>CH</WebSiteCatalogName>
        </GetItemSubcategory>
    </RequestBody>
</NeweggAPIRequest>

示例:Json, Request

PUT https://api.newegg.com/marketplace/sellermgmt/seller/subcategory/v1.1?sellerid={sellerid}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json

{
    "OperationType": "GetSellerSubcategoryRequest",
    "RequestBody": {
        "GetItemSubcategory": {
            "GetItemSubcategory": {
            "WebSiteCategoryIDList": [
                402,
                134
            ],
            "WebSiteCatalogName": "CH"
        }
    }
}

 

回覆文件主體

屬性 格式 描述
IsSuccess String 用於獲取資料狀態的操作
True:成功
False:失敗
OperationType String 固定值:GetSellerSubcategoryResponse
SellerID String 您的商家編號
IndustryCode String 新蛋主類目編碼
IndustryName String 新蛋主類目名稱
SubcategoryID Integer 子類目編號
SubcategoryName String 子類目名稱
Enabled Integer 子類目對此商家是否是開放
有效值:
0 – Not Enabled(未開放的)
1 – Enabled(開放的)
WebSiteCategoryID Integer 新蛋網站目錄編號
WebSiteCatalogName String 新蛋網站目錄名稱

Schema: GetSubcatetoryResponseV1.1.xsd

示例: XML, Response

<?xml version="1.0" encoding="utf-8"?>
<NeweggAPIResponse>
    <IsSuccess>true</IsSuccess>
    <OperationType>GetSellerSubcategoryResponse</OperationType>
    <SellerID>A006</SellerID>
    <ResponseBody>
        <SubcategoryList>
            <Subcategory>
                <IndustryCode>CE</IndustryCode>
                <IndustryName>
                    <![CDATA[Consumer Electronics]]>
                </IndustryName>
                <SubcategoryID>134</SubcategoryID>
                <SubcategoryName>
                    <![CDATA[Standard Batteries & Chargers]]>
                </SubcategoryName>
                <Enabled>1</Enabled>
                <WebSiteCategoryID>134</WebSiteCategoryID>
                <WebSiteCatalogName>
                    <![CDATA[Standard Batteries & Chargers]]>
                </WebSiteCatalogName>
            </Subcategory>
            <Subcategory>
                <IndustryCode>CE</IndustryCode>
                <IndustryName>
                    <![CDATA[Consumer Electronics]]>
                </IndustryName>
                <SubcategoryID>402</SubcategoryID>
                <SubcategoryName>
                    <![CDATA[Camcorder Batteries & Chargers]]>
                </SubcategoryName>
                <Enabled>1</Enabled>
                <WebSiteCategoryID>402</WebSiteCategoryID>
                <WebSiteCatalogName>
                    <![CDATA[Camcorder Batteries & Chargers]]>
               </WebSiteCatalogName>
            </Subcategory>
        </SubcategoryList>
    </ResponseBody>
</NeweggAPIResponse>

示例: Json, Response

{
    "IsSuccess": "true",
    "OperationType": "GetSellerSubcategoryResponse",
    "SellerID": "A006",
    "ResponseBody": {
       "SubcategoryList": [
            {
                "IndustryCode": "CE",
                "IndustryName": "Consumer Electronics",
                "SubcategoryID": 134,
                "SubcategoryName": "Standard Batteries & Chargers",
                "Enabled": 1,
                "WebSiteCategoryID": 134,
                "WebSiteCatalogName": "Standard Batteries & Chargers"
            },
            {
               "IndustryCode": "CE",
                "IndustryName": "Consumer Electronics",
                "SubcategoryID": 402,
                "SubcategoryName": "Camcorder Batteries & Chargers",
                "Enabled": 1,
                "WebSiteCategoryID": 402,
                "WebSiteCatalogName": "Camcorder Batteries & Chargers"
            }
        ]
    }
}

請求失敗錯誤資訊

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

更新日期:09/29/2021