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

MGetGoodsRelatedArticles - 获取批量商品关联内容列表

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

首次发布时间2024.03.01 10:48:28

该接口提供获取批量商品关联内容列表的功能。如果开启了内容权限,那么将根据场景所属用户组所关联的权限标识对内容进行过滤,保留关联权限标识内容。

注意事项

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

请求说明

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

调试

请求参数

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

Query

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

MGetGoodsRelatedArticles

要执行的操作,取值:MGetGoodsRelatedArticles

Version
String

2021-01-01

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

Body

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

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

GoodsIds
Array of String

商品ID列表。

GenerateTypes
Array of String

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

GroupCategory
String

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

PageSize
Integer

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

Cursor
String

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

返回参数

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

参数
类型
示例值
描述
Data
DataDetail

响应数据。

请求示例

{
    "GoodsIds": ["test"],
    "BaseGoodsRelateParam": {
        "UniqUserId": "user-xxx",
        "Category": "038efe4d",
        "GoodsSourceId": "7064452978027005471"
    },
    "PageSize": 1,
    "Cursor": ""
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20240115151956C2F6469DDB62ED595***",
        "Action": "MGetGoodsRelatedArticles",
        "Version": "2021-01-01",
        "Service": "volc_content_api",
        "Region": "cn-north-1"
    },
    "Data": {
        "Articles": [
            {
                "GroupId": 1767391011707047,
                "Title": "***",
                "Author": {
                    "AuthorName": "admin",
                    "AuthorAvatarUrl": "***",
                    "AuthorId": "1758989202404397",
                    "Description": "",
                    "HomePage": "",
                    "FollowerCount": 0,
                    "AuthorBizId": ""
                },
                "GroupType": "article",
                "GenerateType": "test",
                "PublishTime": 1685515381,
                "Abstract": "***",
                "OpenId": "",
                "Tags": [
                    "情感偏正向",
                    "电子" 
                ],
                "Extra": "",
                "Link": "https://content-center.ciccwm.com/content-center/content-manage/detail/***",
                "DiggCount": 0,
                "CommentCount": 0,
                "CommentUrl": "",
                "GoodsIds": [
                    "test",
                    "nyJKS"
                ],
                "GoodsList": [
                    {
                        "GoodsId": "test",
                        "GoodsName": "test",
                        "Keywords": "测试",
                        "Description": "",
                        "GoodsSourceId": "7064452978027005471",
                        "GoodsWeight": 1
                    },
                    {
                        "GoodsId": "nyJKS",
                        "GoodsName": "晶科能源",
                        "Keywords": "nyJKS",
                        "Description": "",
                        "GoodsSourceId": "7064489754993231396",
                        "GoodsWeight": 0.45
                    }
                ],
                "Content": "",
                "ReadCount": 0
            }
        ],
        "Total": 19,
        "Cursor": "1685515381000_1767391011707047"
    },
    "BaseResp": {
        "StatusMessage": "success",
        "StatusCode": 1000
    }
}

错误码

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

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

请联系火山引擎技术人员

200
1001
参数错误

返回具体的参数错误描述