Fecify-商品-google categorys

接口信息

  • 接口地址: {your-site-url}/api/skill/product/get-google-product-categorys
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: GET
  • Content-Type: application/json
  • 说明: 获取 Google Product Category 分类列表,用于 Google Feed 中的 google_product_category 字段。Google 官方文档链接:https://support.google.com/merchants/answer/6324436?hl=en&ref_topic=6324338#

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数

无参数。

请求示例

cURL

curl --location --request GET '{your-site-url}/api/skill/product/get-google-product-categorys' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw ''

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": {
        "categories": [
            {
                "id": "1",
                "name": "动物/宠物用品",
                "en_name": "Animals & Pet Supplies",
                "pid": "0",
                "level": 1
            },
            {
                "id": "2",
                "name": "宠物用品",
                "en_name": "Pet Supplies",
                "pid": "1",
                "level": 2
            },
            {
                "id": "3",
                "name": "鸟类用品",
                "en_name": "Bird Supplies",
                "pid": "2",
                "level": 3
            },
            {
                "id": "4",
                "name": "猫用品",
                "en_name": "Cat Supplies",
                "pid": "2",
                "level": 3
            }
        ]
    },
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data.categories Array Google Product Category 分类列表
data.categories[].id String google category 中的 ID
data.categories[].name String 分类中文名称
data.categories[].en_name String 分类英文名称
data.categories[].pid String 上级 ID。0 代表没有上级,即一级分类;如果值为 1,则代表 id 为 1 的分类是他的上级 category
data.categories[].level Number 级别,1 代表一级分类,逐级递增

该分类数据总体类似于菜单树结构:通过 pid 关联父级,level 表示所在层级,可以根据 pid 构建出完整的分类树。


错误响应

{
    "code": 100701001,
    "message": "error message"
}

code 不为 200 表示调用失败,具体错误码以实际返回为准。

注意事项

  1. 该接口用于获取 Google Product Category 分类树,返回的分类通过 pid 形成父子层级关系,level 表示层级深度。
  2. 分类列表可用于 商品-创建商品-更新(全量更新) 中的 google_product_category 字段。
  3. Google Product Category 的完整分类说明请参考 Google 官方文档:https://support.google.com/merchants/answer/6324436?hl=en&ref_topic=6324338#
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-08-06 15:52:29

results matching ""

    No results matching ""