查询商品品类
查询商品类目,创建商品前可获取类目信息。
使用限制
无
接口说明
无
基本信息
HTTP URL | https://open.douyin.com/goodlife/v1/goods/category/get/ | |||
HTTP Method | GET | |||
申请权限 | 商品查询 | |||
权限要求 |
|
请求头
参数 | 描述 | 必须 |
Content-Type | application/json | 是 |
access-token | 是 |
请求参数
请求 Query 参数
参数名称 | 参数类型 | 是否必传 | 参数描述 |
category_id | string | FALSE | 行业类目ID,返回当前id下的直系子类目信息;传0或者不传,均返回所有一级行业类目 |
account_id | string | FALSE | 服务商的入驻商户ID/代运营的商户ID,不传时默认为服务商身份, 传入商户ID,可查询商家可发布商品类目 |
query_category_type | int | FALSE | 类目查询方式 0 - 返回单层结构子类目信息 1 - 返回树形结构子类目信息 |
请求 Body 参数
无 body
请求 cURL 示例
curl --location --request GET 'https://open.douyin.com/goodlife/v1/goods/category/get/?access_token=clt.xxxxx&category_id=0&account_id=123456789'
响应 Body 参数
参数名称 | 参数类型 | 是否必传 | 参数描述 |
data | struct | FALSE | 响应数据 |
- category_infos | list<categoryinfo> | FALSE | 单层级商品类目列表 |
-- category_id | int64 | TRUE | 类目ID |
-- name | string | TRUE | 类目名称 |
-- parent_id | int64 | TRUE | 父类目ID |
-- level | int32 | TRUE | 类目层级 |
-- is_leaf | bool | TRUE | 是否 是叶子结点 |
-- enable | bool | FALSE | 类目是否开放 |
- category_tree_infos | list<categorytreeinfo> | FALSE | 商品类目树列表 |
-- category_id | int64 | TRUE | 类目ID |
-- name | string | TRUE | 类目名称 |
-- parent_id | int64 | TRUE | 父类目ID |
-- level | int32 | TRUE | 类目层级 |
-- is_leaf | bool | TRUE | 是否是叶子结点 |
-- enable | bool | FALSE | 类目是否开放 |
-- sub_tree_infos | list<categorytreeinfo> | FALSE | 子类目树列表 |
- error_code | int | TRUE | 错误码 |
- description | string | TRUE | 错误描述 |
BaseResp | struct | TRUE | 公共参数 |
- StatusMessage | string | TRUE | 网关状态信息 |
- StatusCode | int | TRUE | 网关状态码 |
extra | struct | TRUE | 响应额外信息 |
- error_code | int | TRUE | 错误码 0(正常返回) 3000001(业务错误) 5000001(系统错误) |
- description | string | TRUE | 错误描述 |
- sub_error_code | int | TRUE | 子错误码 |
- sub_description | string | TRUE | 子错误描述 |
- now | int | TRUE | 时间戳 |
- logid | string | TRUE | 请求日志ID |