获取分类列表

GET /openapi/2021-08/collections

权限:read_collections

Query参数

参数名

说明

必填

类型

限制

示例

page

页码

[string]

1

page_size

每页数量

[string]

25

sort

排序

[string]

product_count / name

-name

filter[category_type]

分类类型

[string]

auto_category / manual_category

auto_category

filter[exclude_id]

排除分类ID

[integer|string]

1,2,3

filter[name]

模糊匹配分类名称

[string]

category

filter[precise_slug]

模糊匹配 slug

[string]

示例响应内容

{
    "data": [
        {
            "term_taxonomy_id": 1924,
            "taxonomy": "product_cat",
            "description": "<p>product category</p>",
            "parent": 0,
            "count": 0,
            "id": 1924,
            "thumbnail": null,
            "thumbnail_url": "",
            "product_count": 0,
            "order": null,
            "seo_title": "product category",
            "seo_description": "product category description.",
            "name": "product category",
            "slug": "product-category",
            "public_url": "https://example.hotishop.com/collections/product-category",
            "base_url": "https://example.hotishop.com/collections",
            "source": null,
            "total_count": null,
            "path": "/collections/product-category",
            "sort_type": "manual",
            "category_type": "manual_category",
            "additional": "",
            "conditions": [],
            "term": {
                "term_id": 1925,
                "name": "product category",
                "slug": "product-category",
                "term_group": 0
            }
        }
    ],
    "links": {
        "first": "https://example.hotishop.com/openapi/2021-08/collections?page=1",
        "last": "https://example.hotishop.com/openapi/2021-08/collections?page=40",
        "prev": null,
        "next": "https://example.hotishop.com/openapi/2021-08/collections?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 40,
        "path": "https://example.hotishop.com/openapi/2021-08/collections",
        "per_page": "1",
        "to": 1,
        "total": 40
    }
}

Last updated