调用 UpdateSingleActivityProduct 接口,在指定直播间中新增、更新或删除指定商品卡片菜单下的单个商品卡片。
说明
启用商品卡片菜单后,配置信息才会在观看页生效。您可通过调用 ModifyActivityMenus 接口,启用商品卡片菜单。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息详见公共参数。
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | UpdateSingleActivityProduct | 接口名称。当前 API 的名称为 UpdateSingleActivityProduct。 |
| Version | String | 是 | 2023-08-01 | 接口版本。当前 API 的版本为 2023-08-01。 |
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
ActivityId | Long | 是 |
| 直播间 ID。您可通过调用 ListActivityAPI 接口获取 ID。 说明 使用子账号调用接口时,确保该直播间对子账号可见。有关如何配置子账号的可见范围,详见子账号管理。 |
| ProductConfigId | Long | 是 | 111723 | 商品卡片菜单 ID。您可调用 GetActivityProducts 接口,根据返回参数 Id获取 ID。 |
Action | Integer | 是 |
| 操作类型。取值如下:
|
ReorderIndex | Boolean | 否 |
| 新增或更新商品卡片时,如果商品卡片的序号(
|
Product | Object of Product | 是 |
| 商品卡片的配置信息。 说明
|
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
Id | Long | 否 |
| 商品卡片 ID。调用 GetActivityProducts 接口,根据返回参数 说明 仅在 |
Index | Integer | 否 |
| 商品卡片的序号。默认值为 |
| IntroduceImage | String | 否 | https://p.example.org/***.png | 商品图的 URL,需包含协议头。支持上传 JPG、GIF、PNG、BMP 格式的图片。 |
PromotionTagType | Integer | 否 |
| 活动标签类型。默认值为
|
PromotionTagUrl | String | 否 |
| 活动标签的 URL,需包含协议头。 说明 当 |
| Title | String | 是 | 玫瑰慕斯蛋糕(小) | 商品名称。长度为 1 到 100 个字符。 |
| Remark | String | 否 | 超级好吃的玫瑰慕斯蛋糕 | 商品介绍。长度为 1 到 15 个字符。 |
| Highlight | String | 否 | ¥15 | 商品的售卖价,即当前价格。长度为 1 到 20 个字符。 |
| Strikethrough | String | 否 | ¥30 | 商品的参考价,即原价。长度为 1 到 8 个字符。 |
| SellingPointTag | String | 否 | 买二赠一;满50减20 | 卖点标签。最多支持 3 个卖点,卖点间以分号(;)相隔。每个卖点建议不要超过 6 个字符。 |
| RedirectImage | String | 否 | https://p.example.org/***.png | 跳转图的 URL,需包含协议头。默认使用系统默认跳转图。支持上传 JPG、GIF、PNG、BMP 格式的图片。 |
DirectUrls | Array of String | 否 |
| 直达链接,需包含协议头。当观众在环境 UA 匹配成功的移动端平台上点击商品卡片时,即可跳转至该链接。 说明
|
MiniAppDirectUrl | String | 否 |
| 微信小程序链接,需包含协议头。当观众在移动端微信环境点击商品卡片时,即可跳转至该微信小程序。 说明 该参数仅在商品卡片菜单开启微信小程序跳转功能后生效。您可调用 UpdateActivityProduct 接口,将 |
| RedirectUrl | String | 否 | https://example.com | 跳转链接,即商品详情页的链接,需包含协议头。如果观众无法跳转至直达链接或微信小程序,则会跳转至该链接。 |
ReminderType | Integer | 否 |
| 在商品讲解期间的浮窗商品卡片和商品卡片菜单中,动效展示的提醒类型。默认值为
|
HotSale | String | 否 |
| 热卖提醒数量。长度为 1 到 5 个字符。 说明 当 |
Stock | String | 否 |
| 库存提醒数量。长度为 1 到 5 个字符。 说明 当 |
EnableStatus | Integer | 否 |
| 是否上架商品。默认值为
|
IsOrderMsgEnable | Integer | 否 |
| 是否开启下单消息。默认值为
|
OutOfStock | Integer | 否 |
| 是否售罄商品。商品售罄后,观看页的商品图和跳转图将展示“已抢光”的文案。取值如下:
注意 若商品价格为隐藏状态,则不支持售罄商品。即当 |
PriceHidden | Integer | 否 |
| 是否隐藏商品售卖价格。商品价格隐藏后,观看页的商品售卖价将以“待开价¥???”的文案展示。取值如下:
注意 若商品为售罄状态,则不支持隐藏商品的售卖价格。即当 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Product | Object of Product |
| 本次接口调用新增、更新或删除的商品卡片。 说明 删除的商品卡片仅返回 |
| ConfigProducts | Array of ConfigProducts | - | 商品卡片菜单下的商品卡片列表。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Id | Long | 105472 | 商品卡片 ID。 |
| Index | Integer | 0 | 商品卡片的序号。取值范围为 [0,499]。 |
| IntroduceImage | String | https://p.example.org/***.png | 商品图的 URL,包含协议头。 |
PromotionTagType | Integer |
| 活动标签类型。取值如下:
|
| PromotionTagUrl | String | https://p.example.org/***.png | 活动标签的 URL,包含协议头。 |
| Title | String | 玫瑰慕斯蛋糕(小) | 商品名称。 |
| Remark | String | 超级好吃的玫瑰慕斯蛋糕 | 商品介绍。 |
| Highlight | String | ¥15 | 商品的售卖价,即当前价格。 |
| Strikethrough | String | ¥30 | 商品的参考价,即原价。 |
| SellingPointTag | String | 买二赠一;满50减20 | 卖点标签。卖点间以分号(;)相隔。 |
| RedirectImage | String | https://p.example.org/***.png | 跳转图的 URL,包含协议头。 |
DirectUrls | Array of String |
| 直达链接,包含协议头。当观众在环境 UA 匹配成功的移动端平台上点击商品卡片时,即可跳转至该链接。 说明 该参数仅在商品卡片菜单开启直达链接功能后生效。您可调用 UpdateActivityProduct 接口,将 |
MiniAppDirectUrl | String |
| 微信小程序链接,包含协议头。当观众在移动端微信环境点击商品卡片时,即可跳转至该微信小程序。 说明 该参数仅在商品卡片菜单开启微信小程序跳转功能后生效。您可调用 UpdateActivityProduct 接口,将 |
| RedirectUrl | String | https://example.com | 跳转链接,即商品详情页的链接,包含协议头。如果观众无法跳转至直达链接或微信小程序,则会跳转至该链接。 |
ReminderType | Integer |
| 在商品讲解期间的浮窗商品卡片和商品卡片菜单中,动效展示的提醒类型。取值如下:
|
HotSale | String |
| 热卖提醒数量。 说明 该参数仅在 |
Stock | String |
| 库存提醒数量。 说明 该参数仅在 |
EnableStatus | Integer |
| 是否上架商品。取值如下:
|
IsOrderMsgEnable | Integer |
| 是否开启下单消息。取值如下:
|
ExplainStatus | Integer |
| 商品讲解状态。取值如下:
说明 仅在开启直播时移功能时,该参数生效。更多有关直播时移的信息,详见直播时移。 |
| ExplainTime | Long | 0 | 最近一次修改商品讲解状态的时间。Unix 时间戳,单位为秒。取值为 0 表示未修改过商品讲解状态。 |
FloatingStatus | Integer |
| 是否浮窗展示商品卡片。取值如下:
说明 仅在未开启直播时移功能时,该参数生效。 |
| FloatingTime | Long | 1742873573 | 最近一次浮窗展示商品卡片的时间。Unix 时间戳,单位为秒。取值为 0 表示商品卡片从未浮窗展示过。 |
OutOfStock | Integer |
| 商品是否售罄。商品售罄后,观看页的商品图和跳转图将展示“已抢光”的文案。取值如下:
|
PriceHidden | Integer |
| 商品售卖价格是否为隐藏状态。商品价格隐藏后,观看页的商品售卖价将以“待开价¥???”的文案展示。取值如下:
|
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Id | Long | 105472 | 商品卡片 ID。 |
| Index | Integer | 0 | 商品卡片的序号。取值范围为 [0,499]。 |
| IntroduceImage | String | https://p.example.org/***.png | 商品图的 URL,包含协议头。 |
PromotionTagType | Integer |
| 活动标签类型。取值如下:
|
| PromotionTagUrl | String | https://p.example.org/***.png | 活动标签的 URL,包含协议头。 |
| Title | String | 玫瑰慕斯蛋糕(小) | 商品名称。 |
| Remark | String | 超级好吃的玫瑰慕斯蛋糕 | 商品介绍。 |
| Highlight | String | ¥15 | 商品的售卖价,即当前价格。 |
| Strikethrough | String | ¥30 | 商品的参考价,即原价。 |
| SellingPointTag | String | 买二赠一;满50减20 | 卖点标签。卖点间以分号(;)相隔。 |
| RedirectImage | String | https://p.example.org/***.png | 跳转图的 URL,包含协议头。 |
DirectUrls | Array of String |
| 直达链接,包含协议头。当观众在环境 UA 匹配成功的移动端平台上点击商品卡片时,即可跳转至该链接。 说明 该参数仅在商品卡片菜单开启直达链接功能后生效。您可调用 UpdateActivityProduct 接口,将 |
MiniAppDirectUrl | String |
| 微信小程序链接,包含协议头。当观众在移动端微信环境点击商品卡片时,即可跳转至该微信小程序。 说明 该参数仅在商品卡片菜单开启微信小程序跳转功能后生效。您可调用 UpdateActivityProduct 接口,将 |
| RedirectUrl | String | https://example.com | 跳转链接,即商品详情页的链接,包含协议头。如果观众无法跳转至直达链接或微信小程序,则会跳转至该链接。 |
ReminderType | Integer |
| 在商品讲解期间的浮窗商品卡片和商品卡片菜单中,动效展示的提醒类型。取值如下:
|
HotSale | String |
| 热卖提醒数量。 说明 该参数仅在 |
Stock | String |
| 库存提醒数量。 说明 该参数仅在 |
EnableStatus | Integer |
| 是否上架商品。取值如下:
|
IsOrderMsgEnable | Integer |
| 是否开启下单消息。取值如下:
|
ExplainStatus | Integer |
| 商品讲解状态。取值如下:
说明 仅在开启直播时移功能时,该参数生效。更多有关直播时移的信息,详见直播时移。 |
| ExplainTime | Long | 0 | 最近一次修改商品讲解状态的时间。Unix 时间戳,单位为秒。取值为 0 表示未修改过商品讲解状态。 |
FloatingStatus | Integer |
| 是否浮窗展示商品卡片。取值如下:
说明 仅在未开启直播时移功能时,该参数生效。 |
| FloatingTime | Long | 1742873573 | 最近一次浮窗展示商品卡片的时间。Unix 时间戳,单位为秒。取值为 0 表示商品卡片从未浮窗展示过。 |
OutOfStock | Integer |
| 商品是否售罄。商品售罄后,观看页的商品图和跳转图将展示“已抢光”的文案。取值如下:
|
PriceHidden | Integer |
| 商品售卖价格是否为隐藏状态。商品价格隐藏后,观看页的商品售卖价将以“待开价¥???”的文案展示。取值如下:
|
POST https://livesaas.volcengineapi.com/?Action=UpdateSingleActivityProduct&Version=2023-08-01 { "ActivityId": 177985****487296, "ProductConfigId": 111723, "Action": 1, "Product": { "Id": 105472, "Title": "玫瑰慕斯蛋糕(小)", "Remark": "超级好吃的玫瑰慕斯蛋糕", "Strikethrough": "¥30", "MiniAppDirectUrl": "https://example.com", "DirectUrls": [ "https://example.com", "https://example2.com" ], "EnableStatus": 1, "Index": 0, "RedirectUrl": "https://example.com", "RedirectImage": "https://p.example.org/***.png", "IntroduceImage": "https://p.example.org/***.png", "Highlight": "¥15", "SellingPointTag": "买二赠一;满50减20", "ReminderType": 1, "PromotionTagUrl": "https://p.example.org/***.png", "PromotionTagType": 1, "IsOrderMsgEnable": 1, "HotSale": "1000", "Stock": "50", "PriceHidden": 0, "OutOfStock": 0 }, "ReorderIndex": false }
{ "ResponseMetadata": { "RequestId": "20230604110420****100232280022D31", "Action": "UpdateSingleActivityProduct", "Version": "2023-08-01", "Service": "livesaas", "Region": "cn-north-1", "SystemTime": 1697446406 }, "Result": { "Product": { "Id": 105472, "Title": "玫瑰慕斯蛋糕(小)", "Remark": "超级好吃的玫瑰慕斯蛋糕", "Strikethrough": "¥30", "MiniAppDirectUrl": "https://example.com", "DirectUrls": [ "https://example.com", "https://example2.com" ], "EnableStatus": 1, "Index": 0, "RedirectUrl": "https://example.com", "RedirectImage": "https://p.example.org/***.png", "IntroduceImage": "https://p.example.org/***.png", "Highlight": "¥15", "SellingPointTag": "买二赠一;满50减20", "ReminderType": 1, "PromotionTagUrl": "https://p.example.org/***.png", "PromotionTagType": 1, "IsOrderMsgEnable": 1, "HotSale": "1000", "Stock": "50", "ExplainStatus": 0, "ExplainTime": 0, "FloatingStatus": 1, "FloatingTime": 1742873573, "OutOfStock": 0, "PriceHidden": 0 }, "ConfigProducts": [ { "Id": 105472, "Title": "玫瑰慕斯蛋糕(小)", "Remark": "超级好吃的玫瑰慕斯蛋糕", "Strikethrough": "¥30", "MiniAppDirectUrl": "https://example.com", "DirectUrls": [ "https://example.com", "https://example2.com" ], "EnableStatus": 1, "Index": 0, "RedirectUrl": "https://example.com", "RedirectImage": "https://p.example.org/***.png", "IntroduceImage": "https://p.example.org/***.png", "Highlight": "¥15", "SellingPointTag": "买二赠一;满50减20", "ReminderType": 1, "PromotionTagUrl": "https://p.example.org/***.png", "PromotionTagType": 1, "IsOrderMsgEnable": 1, "HotSale": "1000", "Stock": "50", "ExplainStatus": 0, "ExplainTime": 0, "FloatingStatus": 1, "FloatingTime": 1742873573, "OutOfStock": 0, "PriceHidden": 0 } ] } }