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

获取商品卡片配置

最近更新时间2024.03.14 16:57:10

首次发布时间2023.09.22 10:49:48

获取直播间商品卡片菜单的配置信息。

注意事项

请求频率:单用户请求频率限制为 10 次/秒

请求说明

  • 请求方式:GET
  • 请求地址:https://livesaas.volcengineapi.com/?Action=GetActivityProducts&Version=2023-08-01

请求参数

Query

参数类型是否必选示例值描述
ActionStringGetActivityProducts接口名称。当前 API 的名称为 GetActivityProducts
VersionString2023-08-01接口版本。当前 API 的版本为 2023-08-01
ActivityIdLong1776085489138直播间 ID。您可以通过调用 ListActivityAPI 接口查询 ID。

返回参数

参数类型示例值描述
ProductConfigsArray of ProductConfigs-商品卡片菜单的配置信息列表。
VerticalIconUrlStringhttps//p.byted.org/6ed59yyum2-z75.png竖屏直播中商品卡片菜单图标的 URL。

ProductConfigs

参数类型示例值描述
IdLong780商品卡片菜单 ID。

EnableFloating

Boolean

true

是否开启浮层展示。支持以下取值:

  • true:是
  • false:否

EnableUA

Boolean

true

是否开启直达链接功能。支持以下取值:

  • true:是
  • false:否
UAInfoObject of UAInfo-直达链接的配置信息列表。
UAAddressString-已废弃

EnableMiniApp

Boolean

true

是否开启微信小程序跳转功能。支持以下取值:

  • true:是
  • false:否
MiniAppIdStringdsdwsd跳转的微信小程序的原始 ID。

ProductsPosition

Integer

0

商品卡片在 PC 端观看页的展示位置。支持以下取值:

  • 0:右上角
  • 1:左上角
  • 2:左下角
  • 3:右下角
DefaultRedirectImageStringhttps://example/MenuBar商品卡片默认跳转图的 URL。默认为系统配置的跳转图,支持上传 JPG、GIF、PNG 和 BMP 格式的图片。

DisplayEnable

String

1

是否在观看页显示商品卡片菜单。支持以下取值:

  • 1:是
  • 2:否

IsEnable

Boolean

true

是否启用商品卡片菜单。支持以下取值:

  • true:是
  • false:否
MenuNameString商品卡片商品卡片菜单的名称。
ProductObject of Product-卡片的配置信息列表。

UAInfo

参数类型示例值描述
UAInfosArray of UAInfos-直达链接的配置信息列表。

Product

参数类型示例值描述
ProductsArray of Products-卡片的配置信息列表。

UAInfos

参数类型示例值描述
UANameString微信环境名称,与 UAAddress 一一对应。
UAAddressStringMicroMessenger环境 UA,与 UAName 一一对应。

Products

参数类型示例值描述
IdLong105472卡片 ID。
TitleString卡片标题卡片标题。
HighlightString卡片高亮文案卡片的高亮文案。
IntroduceImageStringhttps://example.com卡片介绍图的 URL。支持上传 jpg、gif、png、bmp 格式的图片。
RedirectImageStringhttps://example.com卡片跳转图的 URL。支持上传 jpg、gif、png、bmp 格式的图片。
RedirectUrlStringhttps://example.com卡片的跳转链接。
IndexInteger1卡片的序号。取值范围:[1,500]。

EnableStatus

Integer

1

是否上架卡片。支持以下取值:

  • 0:否
  • 1:是
StrikethroughString划线文字卡片上的灰色划线文字。
RemarkString备注信息卡片的备注信息。
MiniAppDirectUrlStringhttps://example.com微信小程序的跳转链接。
DirectUrlsArray of String["https://example.com","https://example2.com" ]卡片的直达链接列表。
ExplainTimeLong0最近一次修改商品讲解状态的时间。Unix 时间戳,单位为秒。取值为 0 表示未修改过商品讲解状态。

ExplainStatus

Integer

0

商品讲解状态。支持以下取值:

  • 0:未讲解
  • 1:讲解中
  • 2:讲解结束

说明

仅在开启直播时移功能时,才会显示该参数。更多有关商品讲解和直播时移的配置信息,详见商品卡片直播时移

FloatingStatus

Integer

1

是否浮窗展示商品卡片。支持以下取值:

  • 1:开启浮窗
  • 其他值:关闭浮窗
PageAdvertisementTypeInteger0已废弃。

示例

请求示例

GET https://livesaas.volcengineapi.com/?Action=GetActivityProducts&Version=2023-08-01&ActivityId=1776085489138

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202306041104200100100232280022D31",
    "Action": "GetActivityProducts",
    "Version": "2023-08-01",
    "Service": "livesaas",
    "Region": "cn-north-1",
    "SystemTime": 1692933161
  },
  "Result": {
    "ProductConfigs": [
      {
        "EnableFloating": true,
        "EnableMiniApp": true,
        "MiniAppId": dsdwsd,
        "UAInfo": {
          "UAInfos": [
            {
              "UAName": "微信",
              "UAAddress": "MicroMessenger"
            }
          ]
        },
        "IsEnable": true,
        "UAAddress": "",
        "DefaultRedirectImage": "https://example/MenuBar",
        "MenuName": "商品卡片",
        "ProductsPosition": 0,
        "Product": {
          "Products": [
            {
              "DirectUrls": [
                "https://example.com",
                "https://example2.com"
              ],
              "ExplainTime": 0,
              "RedirectImage": "https://example.com",
              "Highlight": "卡片高亮文案",
              "Id": 105472,
              "ExplainStatus": 0,
              "FloatingStatus": 1,
              "PageAdvertisementType": 0,
              "RedirectUrl": "https://example.com",
              "Strikethrough": "划线文字",
              "Remark": "备注信息",
              "Index": 1,
              "IntroduceImage": "https://example.com",
              "Title": "卡片标题",
              "EnableStatus": 1,
              "MiniAppDirectUrl": "https://example.com"
            }
          ]
        },
        "EnableUA": true,
        "Id": 780,
        "DisplayEnable": "1"
      }
    ],
    "VerticalIconUrl": "https//p.byted.org/6ed59yyum2-z75.png"
  }
}