# Get category details

Call the interface several times to get the first, second, and third level categories. If the third level category under a second level category is empty, This means that all the third level categories under this secondary category need to apply to shop.weixin.qq.com

# Interface call request specification

Http request method: POST
https://api.weixin.qq.com/product/category/get?access_token=xxxxxxxxx

# Request Parameter Sample

{
    "f_cat_id": 0
}

# Return Package Example

{
    "errcode": 0,
    "errmsg": "ok",
    "cat_list": 
    [
        {
            "cat_id": 1,
            "f_cat_id": 0,
            "name": "Dress"
        },
        {
            "cat_id": 2,
            "f_cat_id": 0,
            "name": "Shoes and hats."
        }
    ]
}

# Request Parameter Dxplaination

parameter type Is it necessary to fill out Introductions
f_cat_id number yes Parent category ID, you can fill in 0 to get the root category

# Return parameter specification

parameter type Introductions
Errcode number Error code
errmsg string Error message
cat_list[].cat_id number Category ID
cat_list[].f_cat_id number Class parent ID
cat_list[].name string Category Name

# Return code

Return code Type of error
-1 System exception
-2 Token is too long
9401020 Wrong parameter
9401021 Call the api without permission