GEO-商品专辑-保存

接口信息

  • 接口地址: {your-site-url}/api/skill/geo/collection-save
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • Content-Type: application/json
  • 说明: 创建或更新商品专辑 GEO 数据。

认证

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

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

请求参数

字段 类型 必填 说明
id int 否 主键 ID。传入则按 ID 保存;不传则按 collection_id 查找,存在则更新、不存在则创建
collection_id int 是 商品专辑 ID。一个专辑只允许存在一份 GEO 数据
language_code string 否 GEO 语言代码,缺省为 en
summary string 否 AI 生成的专辑简洁摘要
semantic_content string 否 AI 生成的专辑完整语义化内容
collection_type string 否 专辑核心商品类型,如 Running Shoes、Camping Tents
category_path array[string] 否 专辑语义分类路径(JSON),建议 2-5 级
key_features array[string] 否 专辑整体核心特征(JSON)
benefits array[string] 否 专辑对用户的整体价值(JSON)
applications array[string] 否 专辑主要应用领域(JSON)
use_cases array[string] 否 专辑主要使用场景(JSON)
target_users array[string] 否 专辑目标用户或采购对象(JSON)
product_types array[string] 否 专辑包含的主要商品类型(JSON)
product_relationships array[object] 否 专辑内部商品关系语义规则(JSON)
selection_guide array[object] 否 专辑商品选择指南(JSON)
comparison_dimensions array[string] 否 专辑内商品主要比较维度(JSON)
filter_attributes array[string] 否 适用于该专辑的主要 AI 筛选维度(JSON)
search_terms array[string] 否 AI 检索语义数据(JSON)
faq array[object] 否 专辑 FAQ(JSON)
commercial_info object 否 专辑商业和采购相关语义信息(JSON)
geo_score number 否 GEO 数据完整度评分(0-100)
source_content_hash string 否 生成 GEO 时专辑源数据的内容 hash(最大长度 64)

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/geo/collection-save' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "collection_id": 528,
  "summary": "A collection of outdoor camping tents designed for different outdoor activities.",
  "collection_type": "Camping Tents",
  "category_path": ["Outdoor Equipment", "Camping Gear", "Shelters", "Camping Tents"],
  "key_features": ["Various tent sizes and capacities"],
  "geo_score": 88.5,
  "source_content_hash": "6a8f3d9c2b1e4f7a9d8c5b6e3f2a1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a"
}'

返回结果

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

成功响应

{
    "code": 200,
    "data": {
        "id": 1,
        "shop_id": 359,
        "collection_id": 528,
        "language_code": "en",
        "summary": "A collection of outdoor camping tents designed for different outdoor activities.",
        "collection_type": "Camping Tents",
        "category_path": ["Outdoor Equipment", "Camping Gear", "Shelters", "Camping Tents"],
        "key_features": ["Various tent sizes and capacities"],
        "geo_score": 88.5,
        "source_content_hash": "6a8f3d9c2b1e4f7a9d8c5b6e3f2a1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a",
        "created_at": "2026-08-20 10:15:00",
        "updated_at": "2026-08-20 22:03:02"
    },
    "message": "success"
}

返回字段说明

字段 类型 说明
code int 状态码,200 表示成功
message string 执行结果的文字描述
data object 保存后的商品专辑 GEO 数据(字段同请求参数,并包含 id、shop_id、created_at、updated_at)

注意事项

  1. 保存逻辑:如果传递了 id 且不为空,则通过 id 保存;如果 id 为空,则通过 collection_id 查询是否已存在数据,存在则更新、不存在则创建
  2. collection_id 为必填,其余字段选填
  3. 一个商品专辑只允许存在一份 GEO 数据

  4. collection_id 缺失时返回错误码 100304006(collection geo save fail)

Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-08-23 16:17:26

results matching ""

    No results matching ""