You need to enable JavaScript to run this app.
导航

GetGoodsRelatedArticles - 获取单个商品关联内容列表

最近更新时间2024.03.12 15:04:15

首次发布时间2022.03.09 11:33:01

通过商品ID,获取指定商品关联的图文、视频等内容列表。如果开启了内容权限,那么将根据场景所属用户组所关联的权限标识对内容进行过滤,保留关联权限标识内容。

注意事项

  • 前提条件:已完成商品配置,详见:商品配置

请求说明

  • 请求方式:POST
  • 请求地址:https://cms.volcengineapi.com?Action=GetGoodsRelatedArticles&Version=2021-01-01
  • 请求头:ServiceName: volc_content_api

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

参数
类型
是否必填
示例值
描述
Action
String

GetGoodsRelatedArticles

要执行的操作,取值:GetGoodsRelatedArticles

Version
String

2021-01-01

API的版本,取值:2021-01-01

Body

参数
类型
是否必填
示例值
描述
BaseGoodsRelateParam
BaseGoodsRelateParam

商品关联内容所需基本参数。

GoodsId
String

商品ID。

GenerateTypes
Array of String

查询特定来源的内容,取值路径:控制台 - 内容引入 - 内容源管理 - Api源标识。

GroupCategory
String

内容分组,取值路径:控制台 - 商品管理 - 自建商品 - 关联内容 - 分组配置 - 分组标识。

PageSize
Integer

页面大小,默认为10,最大为20。

Cursor
String

内容锚点:刷新首页时传空,翻页时传上一次请求返回的Cursor值。

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
Data
DataDetail

响应数据。

请求示例

{
    "GoodsId": "goods_test_1",
    "BaseGoodsRelateParam": {
        "UniqUserId": "user-xxx",
        "Category": "038efxxx",
        "GoodsSourceId": "1722272335075342"
    },
    "PageSize": 2,
    "Cursor": ""
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202201211700000000000000006B***",
    "Action": "GetGoodsRelatedArticles",
    "Version": "2021-01-01",
    "Service": "volc_content_api",
    "Region": "cn-north-1"
  },
  "Data": {
    "Total": 2,
    "Articles": [
      {
        "GroupId": 1704000000000034,
        "Title": "ChinaSys十周年感想",
        "Author": {
          "AuthorName": "某某作者",
          "AuthorId": "test_author_1",
          "AuthorTags": ["科技博主"],
          "HomePage": "",
          "FollowerCount": 11,
          "AuthorAvatarUrl": "https://xxxxxxx.pstatp.com/ies/bytedance_official/_next/static/images/0-39.png"
        },
        "GroupType": "article",
        "GenerateType": "zhihu",
        "PublishTime": 1625627451,
        "DisplayTag": { "tags": "A" },
        "Abstract": "ChinaSys是由国内一批计算机系统方向的学者于2011年创办,今年已经十周年了。",
        "OpenId": "",
        "Tags": [
          "中国",
          "谷歌",
          "中科院",
          "知乎",
          "情感偏正向",
          "论文",
          "开源项目"
        ],
        "CoverImages": [
          {
            "Url": "https://xxxxxxx/v2-b7a37d7390487c6eddd819fd1292e58f_b.jpg",
            "Height": 540,
            "Weight": 720
          }
        ],
        "GroupVideos": [
          {
            "Url": "https://xxxxxxx/71cd8e2f2d5c63e3c1268b635f2/?0prZzMzOjczM0ApZGY7ZTlkaDw2N2RoOzRmNWdicmdxLjFhNl9fLS1jLS9zczYxNF9gLV5hM2M2MF4xL2A6Yw==&vl=&vr=",
            "VideoSize": 6839735418,
            "CoverImage": {
              "Url": "https://xxxxx/large/pgc-image/15324336487100eb5df8e43"
            },
            "VideoWatchCount": 1233,
            "VideoDuration": 178.483
          }
        ],
        "Link": "http://xxxxxxx/p/374658103?utm_campaign=rss\u0026utm_medium=rss\u0026utm_source=rss\u0026utm_content=title",
        "GoodsIds": ["goods_test_1", "goods_test_2"]
      },
      {
        "GroupId": 1700000000000703,
        "Title": "让神经科学回归弗洛伊德,意识不过一种感觉?",
        "Author": {
          "AuthorName": "某某作者",
          "AuthorId": "test_author_1",
          "AuthorTags": ["科技博主"],
          "HomePage": "",
          "FollowerCount": 11,
          "AuthorAvatarUrl": "https://xxxxxx/ies/bytedance_official/_next/static/images/0-390b5def140dc370854c98b8e82ad394.png"
        },
        "GroupType": "article",
        "GenerateType": "zhihu",
        "PublishTime": 1625626225,
        "DisplayTag": { "tags": "A" },
        "Abstract": "还是个孩子的时候,他就痴迷于宏大的存在主义问题:我们死后会发生什么?",
        "OpenId": "",
        "Tags": [
          "神经科学[生物学机制]",
          "情感偏正向",
          "西蒙·弗洛伊德",
          "神经心理学",
          "大脑皮层",
          "精神分析[治疗神经症的一种方法]"
        ],
        "CoverImages": [
          {
            "Url": "https://xxxxxxx/v2-805182d32ee077f4be4e8a763b2dcbe8_b.jpg",
            "Height": 1280,
            "Width": 720
          }
        ],
        "Link": "http://xxxxxx/p/384574582?utm_campaign=rss\u0026utm_medium=rss\u0026utm_source=rss\u0026utm_content=title",
        "GoodsIds": ["goods_test_1", "goods_test_3"]
      }
    ],
    "Cursor": "1625626225"
  },
  "BaseResp": {
    "StatusMessage": "success",
    "StatusCode": 1000
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
200
1002
服务未知错误

请联系火山引擎技术人员

200
1001
参数错误

返回具体的参数错误描述