更新时间:2024-11-22 GMT+08:00
分享

创建个人模板

功能介绍

用于用户创建个人模板。

请求中所有字符串不允许携带“<”、“>”、“&amp;”或多个空格。

模板内容需加“拒收请回复R”。

URI

POST /v1/aim/templates

请求参数

表1 请求Header参数

参数

是否必选

参数类型

描述

Content-Type

String

请求体参数类型,该字段必须设置为:application/json。

X-Auth-Token

String

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

表2 请求Body参数

参数

是否必选

参数类型

描述

card_id

String

布局类型。

  • MultipleImageAndText:多图文类

  • StandardImageAndText:图文类

  • PureText:长文本类

  • VideoImageAndText:视频图文类

  • Video:视频类

  • ECImageAndText:电商类

  • RedPacket:红包类

  • RedPacketPersonal:个性化红包类

  • ImageTextAndVideo:图文视频类

  • Notification1:一般通知类

  • Notification2:增强通知类

  • Carousel:横滑类1

  • CarouselTitle:横滑类2

  • CarouselSquareImage:图片轮播类(1:1)

  • CarouselImageSixteenToNine:图片轮播类(16:9)

  • CarouselVerticalImage:图片轮播类(48:65)

  • CardVoucher:单卡券

  • CardVouchers:多卡券(最多支持四张卡券)

  • Ecommerce:电商多商品类

  • Trip1:机票类

  • Trip2:火车票类

  • Trip3:汽车票类

  • PlaneTrip:增强机票类

  • SimplePoster:海报类

  • NativePureText:超文本普通类

  • NativeImageAndText:超文本增强类

  • ShortVideo:短剧视频类

  • ShortVideoImage:短剧图片类

  • EcommerceCouponVertical:电商领券类竖版

  • EcommerceCouponHorizontal:电商领券类横版

说明:

当送审厂商包含vivo时,各布局类型上传的图片最小像素要求如下:

  • card_id为StandardImageAndText,宽高比为16:9时,图片的最小像素为1088px*612px。

  • card_id为MultipleImageAndText,宽高比为16:9时,图片的最小像素为1088px*612px。

  • card_id为MultipleImageAndText,宽高比为1:1时,图片的最小像素为320px*320px。

  • card_id为Video,宽高比为16:9时,视频封面图片的最小像素为1088px*612px。

  • card_id为RedPacket,宽高比为1:1时,图片的最小像素为320px*320px。

  • card_id为CarouselImageSixteenToNine,宽高比为16:9时,图片的最小像素为1088px*612px。

  • card_id为CarouselSquareImage,宽高比为1:1时,图片的最小像素为1088px*1088px。

  • card_id为CarouselVerticalImage,宽高比为48:65时,图片的最小像素为960px*1300px。

  • card_id为Notification1,宽高比为3:1时,图片的最小像素为576px*192px。

  • card_id为Notification2,宽高比为3:1时,图片的最小像素为576px*192px。

  • card_id为ECImageAndText,宽高比为1:1时,图片的最小像素为1088px*1088px。

tpl_name

String

智能信息模板名称。

最小长度:1

最大长度:17

scene

String

模板使用场景类型。

最小长度:0

最大长度:10

use_id

Integer

模板用途。

  • 1:表示商用

  • 2:表示试商用

说明:
  • 模板用途为1,即“商用”时,所有字段中不允许有测试字样,否则影响送审。

  • 模板用途为2,即“试商用”时,请在模板名称(tpl_name)、模板主标题中增加测试字样。

sub_type

Integer

版式子类型。

说明:
  • 当card_id为RedPacket和RedPacketPersonal时,sub_type用于设置按钮样式,1表示静态按钮,2表示动态按钮。目前仅华为厂商支持动态按钮。

  • 当card_id为ECImageAndText时,sub_type用于设置左右按钮组合颜色,默认值为1,1表示左边按钮为橙色,右边按钮为红色;2表示左边按钮为绿色,右边按钮为黄色;3表示左边按钮为绿色,右边按钮为蓝色;4表示左边按钮为紫色,右边按钮为蓝色;5表示左边按钮为黑色,右边按钮为玫粉色。仅华为厂商支持sub_type取值为2、3、4、5。

  • 当card_id为CarouselVerticalImage时,sub_type用于设置按钮颜色,1表示蓝色(默认颜色)、2表示黑色、3表示紫色、4表示金色、5表示粉色、6表示玫粉。仅华为厂商支持sub_type取值为2、3、4、5、6。

  • 当card_id为CardVoucher时,sub_type用于设置按钮样式,1表示静态按钮,2表示动态按钮。目前仅华为厂商支持动态按钮。

  • 当card_id为ShortVideoImage时,sub_type用于设置是否显示播放图标,1表示不显示,2表示显示。

  • 当card_id为EcommerceCouponVertical和EcommerceCouponHorizontal时,sub_type用于设置卡券区是否隐藏。sub_type设置为1,卡券区(position_number为4~7)的visible设置为1,且卡券区(position_number为7)的button_type设置为static或dynamic时,显示卡券区;sub_type设置为2,卡券区(position_number为4~7)的visible设置为0,且卡券区(position_number为7)的button_type设置为空值或不带该字段时,卡券区被隐藏。

sms_example

String

要发送的原始文本消息示例。

最小长度:0

最大长度:70

sms_signs

Array of strings

短信签名。最多可以传三个签名,发送短信时,只要能匹配其中一个即可。填写的短信签名为企业绑定的签名,每个签名最多20个字,支持输入中文,英文,数字,符号,单个签名内容不包括中括号。

说明:

选择厂商包含VIVO时,此参数必填。

最小长度:1

最大长度:20

数组长度:0 - 3

sms_template

String

短信原文模板。参数示例:尊敬的客户,截至[文本0-20],您本月国内通用流量已使用[数字0-4]GB,使用到[数字0-4]GB,整体上网速度将不高于[数字0-2]Mbps。您可点击[字母0-20]获取[文本0-20]。

说明:
  • 正则类型仅支持文本、字母、数字三种,且长度最大为99,且中括号为英文中括号。静态短信文案加正则动态文案最大值的总字数不超过370个字符

  • 历史遗留字段,建议不再使用

pages

Array of PersonalTemplatePage objects

模板协议,最大支持10页协议。

params

Array of PersonalTemplateParam objects

模板参数集。

factorys

Array of PersonalTemplateFactory objects

需要提交的厂商列表。

表3 PersonalTemplatePage

参数

是否必选

参数类型

描述

page_order

Integer

分页显示,指示当前展示第几页,从1开始,最大支持10页。

contents

Array of PersonalTemplateFactoryContent objects

该page下的协议内容。

表4 PersonalTemplateFactoryContent

参数

是否必选

参数类型

描述

type

String

模板资源类型。

  • text:表示文本

  • image:表示图片

  • video:表示视频

  • button:表示按钮

  • followPub:表示华为服务号,暂不支持

说明:

图片轮播类模板最多可以放5张图片,即card_id为CarouselSquareImage、CarouselImageSixteenToNine、CarouselVerticalImage时,type为image的资源最多有5个。

最小长度:1

最大长度:18

content

String

资源类型为Text或Button时,为必填。文本长度限制请参考智能信息模板标准版式要求。

说明:

智能信息模板标准版式要求可登录KooMessage控制台,在创建智能信息模板中查看。

最小长度:0

最大长度:1000

content_child

String

子内容。非必填,文本长度限制请参考智能信息模板标准版式要求。

说明:

智能信息模板标准版式要求可登录KooMessage控制台,在创建智能信息模板中查看。

src_type

Integer

src类型。资源类型为Image或Video时,该项为必填项。

  • 1:指资源ID

  • 2:指资源地址

说明:

src_type为2,即资源地址时,src或cover内容必须是存储在客户侧服务器上的资源地址。

最小值:1

最大值:10

src

String

资源来源,资源类型为Image或Video时,为必填。

说明:
  • 如上src_type为1,即资源ID时,参数填入上传模板素材接口中返回的aim_resource_id,如:691996319597764608

  • 如上src_type为2,即资源地址时,参数填写资源完整的URL,最大长度不超过1000个字符

cover

String

视频封面。

说明:

资源类型为Video时,为必填,通过设置视频模板封面图接口设置视频封面。

  • 如上src_type为1,即资源ID时,参数填入上传模板素材接口中返回的aim_resource_id,如:691996319597764608

  • 如上src_type为2,即资源地址时,参数填写资源完整的URL,最大长度不超过1000个字符

最小长度:0

最大长度:1000

is_text_title

String

是否为文本标题。

  • true:是

  • false:不是

说明:

不填默认为false。

最小长度:0

最大长度:10

action_type

String

功能类型。

  • OPEN_URL:表示跳转H5

  • OPEN_QUICK:表示跳转快应用

  • OPEN_APP:表示跳转APP

  • DIAL_PHONE:表示拉起拨号盘

  • OPEN_SMS:表示新建短信息

  • OPEN_EMAIL:表示打开邮箱

  • OPEN_SCHEDULE:表示新建日程

  • OPEN_MAP:表示位置定位

  • OPEN_BROWSER:表示打开浏览器

  • OPEN_POPUP:表示弹窗

  • COPY_PARAMETER:表示复制

  • VIEW_PIC:表示打开大图

说明:
  • type为Image和Button时为必填项,必须绑定事件

  • type为其他类型时则不必填

  • OPPO厂商点击事件类型只支持打开浏览器、打开快应用、打开APP、跳转H5

  • VIVO厂商点击事件类型不支持打开邮箱、打开地图

  • MEIZU厂商点击事件类型不支持打开大图

  • 横滑类1、横滑类2版式的图片不支持绑定事件,默认与按钮事件一致

  • 三星厂商点击事件类型不支持新建日程、打开大图

position_number

Integer

卡片组件的位置序号。

说明:

资源在卡片上相对的位置序号,按照优先从左到右,再从上到下的编排原则,统一编号。

visible

Integer

组件是否可见。

  • 0:隐藏(某些组件可设置隐藏)

  • 1:可见

说明:

目前仅针对电商多商品(Ecommerce)、多卡券(CardVouchers)、增强机票类(PlaneTrip)这三种版式起效。

currency_display

Integer

是否显示货币符号。

  • 0:隐藏

  • 1:可见

说明:

当模板为电商类时是否显示¥符号,默认可见。

oppo_background

String

OPPO红包背景。

当模板为红包类,即card_id为RedPacket时用于指定OPPO厂商红包背景图,具体使用可参考创建红包类模板请求示例。OPPO红包背景图要求宽高比为3:4,建议尺寸为342px*456px。

说明:
  • 当src_type为1时,即资源ID时,参数填入上传模板素材接口中返回的aim_resource_id,如:691996319597764608

  • 当src_type为2时,即资源地址时,参数填写资源完整的URL,最大长度不超过1000个字符

最小长度:0

最大长度:1000

vivo_background

String

VIVO红包背景。

说明:
  • 当src_type为1时,即资源ID时,参数填入上传模板素材接口中返回的aim_resource_id,如:691996319597764608

  • 当src_type为2时,即资源地址时,参数填写资源完整的URL,最大长度不超过1000个字符

最小长度:0

最大长度:1000

ratio

String

表示短视频模板视频和封面的宽高比。即card_id为ShortVideo时,此项有值。

  • threeToFour:宽高比为3:4

  • oneToOne:宽高比为1:1

action

PersonalTemplateFactoryContentAction object

个人模板事件对象。

button_type

String

当模板为电商领券类(竖版和横版),即card_id为EcommerceCouponVertical和EcommerceCouponHorizontal时用于指定按钮类型,具体使用可参考创建电商领券类(竖版和横版)模板请求示例。

  • static:静态按钮

  • dynamic:动态按钮

表5 PersonalTemplateFactoryContentAction

参数

是否必选

参数类型

描述

target

String

此字段根据action_type对应不同的含义,具体对应如下。

  • action_type=OPEN_URL:表示H5访问地址。必须为HTTPS,支持含动态参数。字符长度为1-1000。示例:https://XXXXX/${param1}

  • action_type=OPEN_QUICK:表示快应用deeplink地址。支持含动态参数,字符长度为1-1000。示例:hap://app/xxx/${param1}

  • action_type=OPEN_APP:表示APP的deeplink地址。支持含动态参数,字符长度为1-1000。示例:weixin://

  • action_type=DIAL_PHONE:表示电话号码。不能超过20个字符。示例:18600000000

  • action_type=OPEN_SMS:表示电话号码。不能超过20个字符。示例:18600000000

  • action_type=OPEN_EMAIL:表示邮箱地址。不能超过100个字符。示例:1046520406@qq.com

  • action_type=OPEN_SCHEDULE:表示日程标题。不能超过100个字符。示例:日常需求评审

  • action_type=OPEN_MAP:表示位置名。不能超过100个字符。示例:龙泰利科技大厦

  • action_type=OPEN_BROWSER:表示网址。支持HTTPS或HTTP,支持含动态参数,不能超过1000个字符。示例:https://XXXXX/${param1}

  • action_type=OPEN_POPUP:表示弹窗标题。不能超过30个字符。参数示例:xxx商品

  • action_type=COPY_PARAMETER:表示复制的内容。支持含动态参数,不能超过20个字符。复制验证码示例:83721

  • action_type=VIEW_PIC:表示要打开的大图ID。配置在打开大图的资源地址与模板上的图片资源地址一致。如果模板资源类型是ID,则传ID,如果是资源地址,则使用资源地址。最大长度不能超过1000个字符。例如:当src_type为1时,传入ID:691996319597764608。当src_type为2时,使用资源地址:https://www.xxxx.cn/src/image/head.jpg

content

String

弹窗内容。

说明:

action_type=OPEN_POPUP为必填。不能超过100个字符。示例:是否喜欢该商品。

最小长度:0

最大长度:100

package_name

String

包名。

说明:

action_type=OPEN_APP为必填。不能超过50个字符。示例:com.xxxx.service.koomsg。

最小长度:0

最大长度:50

floor_url

String

兜底URL。支持快应用deeplink或H5的HTTPS网址,不能超过1000个字。

说明:
  • action_type=OPEN_APP为选填,其他类型不填

  • 兜底类型为0时,可不填

  • 当兜底类型为2并且提交厂商列表中包含OPPO厂商时为必填

最小长度:0

最大长度:1000

floor_type

Integer

兜底类型。如果传入的厂商不支持该兜底类型,接口会返回错误。如果不传入厂商,则不对兜底类型进行校。

  • 0:打开应用市场

  • 1:打开H5页面(通过收件箱内置浏览器打开)

  • 2:打开浏览器

  • 3:打开快应用

说明:

action_type=OPEN_APP为选填,其他类型不填;action_type=OPEN_APP时此参数不填则默认打开应用市场。打开链接为http格式时必须选择打开浏览器;打开链接为https格式且内容只是一个普通页面时,可以使用打开H5页面,当链接中有下载指引或打开小程序由于部分内置浏览器功能不全可能导致打开异常,建议使用打开浏览器,请按需选择兜底类型。

  • 华为:支持以上4种兜底

  • 魅族:支持以上4种兜底

  • 小米:不支持打开H5页面兜底

  • OPPO:不支持打开快应用兜底

  • VIVO:不支持打开快应用兜底

  • 三星:不支持打开应用市场和打开浏览器。当创建的模板仅包含三星厂商时,兜底URL不支持打开浏览器和打开应用市场;当创建的模板包含三星和其它厂商时,以其它厂商的限制为准,三星的兜底链接将不生效

最小值:0

最大值:3

subject

String

邮件标题。

说明:

action_type=OPEN_EMAIL为必填。不能超过100个字符。示例:618活动促销。

body

String

邮件正文/短信正文。

说明:

action_type=OPEN_SMS或OPEN_EMAIL为必填。不能超过100个字符。

短信正文示例1:今天回家吃饭吗;

邮件正文示例2:您有一张优惠券领取。

description

String

日程内容描述。

说明:

action_type=OPEN_SCHEDULE为必填。不能超过100个字符。示例:评审这个月版本需求。

最小长度:0

最大长度:100

begin_time

String

日程开始时间。格式为:yyyy-MM-dd HH:mm:ss。

说明:

当action_type=OPEN_SCHEDULE时为必填。

最小长度:0

最大长度:100

end_time

String

日程结束时间。格式为:yyyy-MM-dd HH:mm:ss。

说明:

当action_type=OPEN_SCHEDULE时为必填。

最小长度:0

最大长度:100

address

String

地址的详细说明。

说明:

action_type=OPEN_MAP为必填。不能超过100个字符。示例:高新中四道龙泰利科技大厦。

最小长度:0

最大长度:100

longitude

String

地图经度。

说明:

action_type=OPEN_MAP为必填。不能超过20个字符。示例:113.941618。

最小长度:0

最大长度:20

latitude

String

地图纬度。

说明:

action_type=OPEN_MAP为必填。不能超过20个字符。示例:22.548804。

最小长度:0

最大长度:20

text_button

String

按钮展示文本。

说明:

action_type=OPEN_POPUP为必填。不能超过12个字符。示例:确定。

最小长度:0

最大长度:12

mode

Integer

弹窗模态。

  • 0:模态(默认)

  • 1:非模态(暂不支持)

说明:

action_type=OPEN_POPUP为必填。

表6 PersonalTemplateParam

参数

是否必选

参数类型

描述

type

Integer

动态参数类型。1:表示文本类型。

最小值:0

最大值:100

name

String

动态参数名称。示例:${param1}。

最小长度:1

最大长度:20

example

String

参数示例,动态参数对应的示例,不能大于100个字符。

最小长度:1

最大长度:100

表7 PersonalTemplateFactory

参数

是否必选

参数类型

描述

factory_type

String

厂商类型。

  • HUAWEI:华为

  • XIAOMI:小米

  • OPPO:OPPO

  • VIVO:VIVO

  • MEIZU:魅族

  • SAMSUNG:三星

各厂商支持的布局类型,布局类型与card_id字段相对应。分别如下:

  • HUAWEI:多图文类(MultipleImageAndText)、图文类(StandardImageAndText)、长文本类(PureText)、横滑类1(Carousel)、横滑类2(CarouselTitle)、视频图文类(VideoImageAndText)、视频类(Video)、电商类(ECImageAndText)、红包类(RedPacket)、个性化红包类(RedPacketPersonal)、增强通知类(Notification2)、图片轮播类1:1(CarouselSquareImage)、图片轮播类16:9(CarouselImageSixteenToNine)、图片轮播类48:65(CarouselVerticalImage)、图文视频类(ImageTextAndVideo)、一般通知类(Notification1)、单卡券(CardVoucher)、多卡券(CardVouchers)、电商多商品类(Ecommerce)、电商领券类竖版(EcommerceCouponVertical)、电商领券类横版(EcommerceCouponHorizontal)、机票类(Trip1)、火车票类(Trip2)、汽车票类(Trip3)、增强机票类(PlaneTrip)、海报类(SimplePoster)、超文本普通类(NativePureText)、超文本增强类(NativeImageAndText)、短剧视频类(ShortVideo)、短剧图片类(ShortVideoImage)

  • XIAOMI:多图文类(MultipleImageAndText)、图文类(StandardImageAndText)、红包类(RedPacket)、增强通知类(Notification2)、一般通知类(Notification1)

  • OPPO:多图文类(MultipleImageAndText)、图文类(StandardImageAndText)、长文本类(PureText)、横滑类(Carousel)、视频类(Video)、电商类(ECImageAndText)、红包类(RedPacket)、图片轮播类1:1(CarouselSquareImage)、图片轮播类16:9(CarouselImageSixteenToNine)、图片轮播类48:65(CarouselVerticalImage)、单卡券(CardVoucher)

  • MEIZU:多图文类(MultipleImageAndText)、图文类(StandardImageAndText)、横滑类1(Carousel)、横滑类2(CarouselTitle)

  • VIVO:多图文类(MultipleImageAndText)、图文类(StandardImageAndText)、图片轮播类1:1(CarouselSquareImage)、图片轮播类16:9(CarouselImageSixteenToNine)、图片轮播类48:65(CarouselVerticalImage)、视频类(Video)、电商类(ECImageAndText)、红包类(RedPacket)、增强通知类(Notification2)、一般通知类(Notification1)、个性化红包类(RedPacketPersonal)、单卡券(CardVoucher)

  • 三星:多图文类(MultipleImageAndText)、图文类(StandardImageAndText)、长文本类(PureText)、横滑类1(Carousel)、横滑类2(CarouselTitle)、视频图文类(VideoImageAndText)、视频类(Video)、电商类(ECImageAndText)、红包类(RedPacket)、图片轮播类1:1(CarouselSquareImage)、图片轮播类16:9(CarouselImageSixteenToNine)、图片轮播类48:65(CarouselVerticalImage)、图文视频类(ImageTextAndVideo)、一般通知类(Notification1)、机票类(Trip1)、火车票类(Trip2)、汽车票类(Trip3)

最小长度:1

最大长度:16

state

Integer

支持状态。

  • 1:支持

  • 0:不支持

最小值:0

最大值:1

响应参数

状态码: 200

表8 响应Body参数

参数

参数类型

描述

status

String

请求状态,固定200。

message

String

状态描述。

data

CreatePersonalTemplateDataResponse object

创建模板响应。

表9 CreatePersonalTemplateDataResponse

参数

参数类型

描述

tpl_id

String

智能信息模板ID。

状态码: 400

表10 响应Body参数

参数

参数类型

描述

error_code

String

结果状态码。

error_msg

String

结果详情。

状态码: 500

表11 响应Body参数

参数

参数类型

描述

error_code

String

结果状态码。

error_msg

String

结果详情。

请求示例

  • 创建红包类模板(RedPacket)。模板为试商用,分别设置image、text和button模板组件,支持厂商为"HUAWEI, XIAOMI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "RedPacket",
      "tpl_name" : "测试:红包专用模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "704716117981000001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1,
          "oppo_background" : "709001482208300001"
        }, {
          "type" : "text",
          "content" : "京西商城",
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "全球狂欢节",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "春风十里,不如红包送你!拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "button",
          "content" : "领取红包",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建个性化红包类模板(RedPacketPersonal)(样式1:显示文本)。模板为试商用,分别设置image、text和button模板组件,支持厂商为"HUAWEI, VIVO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "RedPacketPersonal",
      "tpl_name" : "测试:新年红包模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "704994098020300001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "京西商城",
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "京西祝您虎年大吉!",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "新年快乐,大年大吉!拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "image",
          "src" : "709192070996200001",
          "src_type" : 1,
          "position_number" : 5
        }, {
          "type" : "button",
          "content" : "拆",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 6
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "VIVO"
      } ]
    }
  • 创建横滑类1模板(Carousel)。模板为试商用,共有3页,每页分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, OPPO, MEIZU"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "Carousel",
      "tpl_name" : "测试:商品推荐模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709294526124000001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试工业风车载收纳箱",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "户外车生活,趋势爆款,全民围观。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 4
        } ],
        "page_order" : 1
      }, {
        "contents" : [ {
          "type" : "image",
          "src" : "709294596722500001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试BOC 4K超清电竞显示器",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "阿伟,你怎么还在用灰白屏的显示器,换一个好不好!",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 4
        } ],
        "page_order" : 2
      }, {
        "contents" : [ {
          "type" : "image",
          "src" : "709206231474000001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试小猫咪",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "我没词了,看到这只小猫咪了没,它比你还震惊",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 4
        } ],
        "page_order" : 3
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      }, {
        "state" : 1,
        "factory_type" : "MEIZU"
      } ]
    }
  • 创建增强通知类模板(Notification2)。模板为试商用,分别设置title、text、button和image模板组件,支持动态参数设置,支持厂商为"HUAWEI, XIAOMI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "Notification2",
      "tpl_name" : "测试:交易提醒模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "text",
          "content" : "测试交易提醒",
          "visible" : 1,
          "is_text_title" : "true",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "您尾号为${param6}的账户支出。拒收请回复R",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "${param1}",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "元",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "交易时间",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "${param2}",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "交易类型",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "${param3}",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "交易金额",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "${param4}",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "剩余金额",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "${param5}",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 12
        }, {
          "type" : "button",
          "content" : "联系客服",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 13
        }, {
          "type" : "button",
          "content" : "查看详情",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 14
        }, {
          "type" : "image",
          "src" : "709626274649200001",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_URL",
          "position_number" : 15
        } ],
        "page_order" : 1
      } ],
      "params" : [ {
        "type" : 1,
        "name" : "${param1}",
        "example" : "26880.60"
      }, {
        "type" : 1,
        "name" : "${param2}",
        "example" : "2020年12月31日 18:00"
      }, {
        "type" : 1,
        "name" : "${param3}",
        "example" : "某信支付"
      }, {
        "name" : "${param4}",
        "example" : "8554.00",
        "type" : 1
      }, {
        "name" : "${param5}",
        "example" : "5418385.00",
        "type" : 1
      }, {
        "name" : "${param6}",
        "example" : "8888",
        "type" : 1
      } ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      } ]
    }
  • 创建图文类模板(StandardImageAndText)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, XIAOMI, OPPO, MEIZU"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "StandardImageAndText",
      "tpl_name" : "测试:文章推送模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709278003095400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试:摆脱“他练的比我好”魔咒",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "一线头部健身红人携手推荐的铁血联盟GoldenMusle分离乳清蛋白。少年想变大变强吗?来,干了这碗粉再来一组颈前。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "文章详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 4
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      }, {
        "state" : 1,
        "factory_type" : "MEIZU"
      } ]
    }
  • 创建多图文模板(MultipleImageAndText)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, XIAOMI, OPPO, MEIZU"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "MultipleImageAndText",
      "tpl_name" : "测试:文章推送模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709274211138400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试618企划第2弹 | 夏日热浪小分队!",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "709274708910000001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "新体验 | 爽滑质感,格外有‘型’。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "image",
          "src" : "709205988959300001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "两种穿法,随心选择",
          "is_text_title" : "false",
          "position_number" : 6
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      }, {
        "state" : 1,
        "factory_type" : "MEIZU"
      } ]
    }
  • 创建长文本类模板(PureText)-增强样式。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "PureText",
      "tpl_name" : "测试:通知类模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709280852332200001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试宝驴",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "测试宝驴2022新车型试驾邀请",
          "is_text_title" : "true",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "快快快,冲冲冲,宝驴战士在行动!\n作为世界上最成功的豪华汽车品牌之一,我们从未停下脚步,不能说风驰电掣吧,只能说五秒一米。",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        }, {
          "type" : "button",
          "content" : "立即预约",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 6
        }, {
          "type" : "image",
          "src" : "709284435094100001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 7
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建视频类模板(Video)。模板为试商用,分别创建video、title、text、和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "Video",
      "tpl_name" : "测试:新品视频推荐模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "video",
          "src" : "709329169166600001",
          "cover" : "709329184257700001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试月巴克 挚爱回归 | 威士忌",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "月巴克甄选,威士忌桶酿冷萃,20Hr慢萃,烟熏酒感。让人年年不忘的风味密码,就藏在这颗咖啡豆中。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "了解详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 4
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建视频图文类模板(VideoImageAndText)。模板为试商用,分别设置video、image、title、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "VideoImageAndText",
      "tpl_name" : "测试:视频图文模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "video",
          "src" : "706316737703800001",
          "cover" : "706316757404500001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "709339781871400001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "测试老伦敦鱼肉派仰望星空9块9",
          "is_text_title" : "true",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "像是来自异次元的食物,除了他的名字,无论是品相还是味道都令人难以接受,你要不要尝试一下?拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "button",
          "content" : "立即了解",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ]
    }
  • 创建电商类模板(ECImageAndText)-图文模式(显示货币符号)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "ECImageAndText",
      "tpl_name" : "测试:电商模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709206231474000001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "709258670432600001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "709206119700000001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "160.00",
          "is_text_title" : "true",
          "position_number" : 4,
          "currency_display" : 1
        }, {
          "type" : "text",
          "content" : "满减",
          "is_text_title" : "true",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "测试猫车模拟驾驶",
          "is_text_title" : "true",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "您的体力已耗尽!拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 7
        }, {
          "type" : "button",
          "content" : "添加购物车",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 8
        }, {
          "type" : "button",
          "content" : "立即购买",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 9
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建电商类模板(ECImageAndText)-视频模式(不显示货币符号)。模板为试商用,分别设置video、title、text和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "ECImageAndText",
      "tpl_name" : "测试:创建电商模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "video",
          "src" : "706316737703800001",
          "cover" : "706316757404500001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "500",
          "is_text_title" : "true",
          "position_number" : 2,
          "currency_display" : 0
        }, {
          "type" : "text",
          "content" : "电子换新季",
          "is_text_title" : "true",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "测试RVIDIA/ntx 13700F/老矿工级显卡",
          "is_text_title" : "true",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "刀法精湛,唯我皮衣刀客黄伟达!CMD,YES!拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "button",
          "content" : "加入购物车",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 6
        }, {
          "type" : "button",
          "content" : "立即购买",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 7
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建图片轮播类模板(CarouselSquareImage)(比例1:1)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "CarouselSquareImage",
      "tpl_name" : "测试:消息推送模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709329780880700001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "709330167360600001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "709322435765200001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "测试对钱不感兴趣",
          "is_text_title" : "true",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "“我对钱不感兴趣,我平生最后悔的事就是创立了现在的公司”,拥有261911640000元资产的首富马雨先生如是说到。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 6
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建图文视频类模板(ImageTextAndVideo)。模板为试商用,分别设置image、video、title、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "ImageTextAndVideo",
      "tpl_name" : "测试:图文视频模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "708935153673600001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_URL",
          "position_number" : 1
        }, {
          "type" : "video",
          "src" : "706316737703800001",
          "cover" : "706316757404500001",
          "src_type" : 1,
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "测试一级标题",
          "is_text_title" : "true",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "文本内容。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "button",
          "content" : "打开链接",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 5
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ]
    }
  • 创建一般通知类模板(Notification1)。模板为试商用,分别设置title、text、button和image模板组件,支持动态参数设置,支持厂商为"HUAWEI, XIAOMI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "Notification1",
      "tpl_name" : "测试:购票通知模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "text",
          "content" : "测试乘车通知",
          "is_text_title" : "true",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "欢迎乘坐xx市地铁。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "乘车路线",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "${param1}",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "乘车时间",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "${param2}",
          "is_text_title" : "false",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "行程单号",
          "is_text_title" : "false",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "${param3}",
          "is_text_title" : "false",
          "position_number" : 8
        }, {
          "type" : "button",
          "content" : "地铁路线",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 9
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_URL",
          "position_number" : 10
        }, {
          "type" : "image",
          "src" : "708938538225200001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_URL",
          "position_number" : 11
        } ],
        "page_order" : 1
      } ],
      "params" : [ {
        "type" : 1,
        "name" : "${param1}",
        "example" : "北京-深圳"
      }, {
        "type" : 1,
        "name" : "${param2}",
        "example" : "2020年12月31日 18:00"
      }, {
        "type" : 1,
        "name" : "${param3}",
        "example" : 1364000000000001
      } ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      } ]
    }
  • 创建多图文类模板(MultipleImageAndText):1对。模板为试商用,分别设置image、title和text模板组件,支持厂商为"HUAWEI, XIAOMI, OPPO, MEIZU"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "MultipleImageAndText",
      "tpl_name" : "测试:创建文章推送模板(1对)",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709996126698200001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试2022年上半年中国游戏产业报告!",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "709823764258400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "【那个游戏5】600多个小时在那个游戏OL里能做什么?拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      }, {
        "state" : 1,
        "factory_type" : "MEIZU"
      } ]
    }
  • 创建多图文模板(MultipleImageAndText):3对。模板为试商用,分别设置image、title和text模板组件,可设置3组图文,支持厂商为"HUAWEI, XIAOMI, OPPO, MEIZU"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "MultipleImageAndText",
      "tpl_name" : "测试:文章推送模板(3对)",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "710002667975300001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试阿玛呢 | 高定私仓香氛清新系列",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "709322435765200001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "中有 | BITO问际 M7 · 路演来啦!拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "image",
          "src" : "709823764258400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "少侠留步!十件可以提升生活品质的小物件就在这里",
          "is_text_title" : "false",
          "position_number" : 6
        }, {
          "type" : "image",
          "src" : "710004338436600001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "唇齿留香,女神们都在用的秘密牙膏!",
          "is_text_title" : "false",
          "position_number" : 8
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "XIAOMI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      }, {
        "state" : 1,
        "factory_type" : "MEIZU"
      } ]
    }
  • 创建横滑类2模板(CarouselTitle)。模板为试商用,共有3页,每页分别设置image、title和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "CarouselTitle",
      "tpl_name" : "测试:商品推荐模板(样式2)",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "710007346331400001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试玩咖周末漫游指南。拒收请回复R",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        } ],
        "page_order" : 1
      }, {
        "contents" : [ {
          "type" : "image",
          "src" : "710008006313500001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试月球商店555号~",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        } ],
        "page_order" : 2
      }, {
        "contents" : [ {
          "type" : "image",
          "src" : "710004338436600001",
          "src_type" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试爆款单品不止六折!",
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        } ],
        "page_order" : 3
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ]
    }
  • 创建图片轮播类模板(CarouselSquareImage)(比例16:9)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "CarouselImageSixteenToNine",
      "tpl_name" : "测试:培训推荐模板(16:9)",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "710013258135800001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "710013320555400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "710013369414800001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "测试课程招生 | 艺术相伴,写意",
          "is_text_title" : "true",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "丰富的师资、现金的课程体系,全面对接剧院资源,提供一站式教学服务体系和广阔的演出交流平台,打造全新的艺术交易品牌。为丰富地方文化教育资源,培养潜在观众群体,提升市民文化修养发挥重要作用。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 6
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建图片轮播类模板(CarouselSquareImage)(比例48:65)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI, OPPO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "CarouselVerticalImage",
      "tpl_name" : "测试:创建图片轮播模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "710017105923100001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "710016994975400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "710016702179400001",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "测试一级标题",
          "is_text_title" : "true",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "正文文本。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "button",
          "content" : "查看详情",
          "action" : {
            "target" : "https://www.example.com/"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 6
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "OPPO"
      } ]
    }
  • 创建单卡券(CardVoucher)(折扣券)。模板为试商用,分别设置text、title、image和button模板组件,支持厂商为"HUAWEI , OPPO , VIVO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "CardVoucher",
      "tpl_name" : "测试-折扣券",
      "use_id" : 2,
      "pages" : [ {
        "page_order" : 1,
        "contents" : [ {
          "type" : "text",
          "content" : "8.6折",
          "is_text_title" : "false",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "折扣券",
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : " 满 1000 可用",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "双节活动。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "image",
          "src_type" : 1,
          "src" : "713355798843010000",
          "action_type" : "OPEN_URL",
          "position_number" : 6,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "button",
          "content" : "点击前往",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "action" : {
            "target" : "https://www.example.com"
          }
        } ]
      } ],
      "params" : [ ],
      "factorys" : [ {
        "factory_type" : "HUAWEI",
        "state" : 1
      }, {
        "factory_type" : "OPPO",
        "state" : 1
      }, {
        "factory_type" : "VIVO",
        "state" : 1
      } ]
    }
  • 创建单卡券(CardVoucher)(满减券)。模板为试商用,分别设置text、title、image和button模板组件,支持厂商为"HUAWEI,OPPO , VIVO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "CardVoucher",
      "tpl_name" : "测试-满减券",
      "use_id" : 2,
      "pages" : [ {
        "page_order" : 1,
        "contents" : [ {
          "type" : "text",
          "content" : "¥100",
          "is_text_title" : "false",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "满减券",
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : " 满 1000 可用",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "欢迎选购。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "image",
          "src_type" : 1,
          "src" : "714366886086740000",
          "action_type" : "OPEN_URL",
          "position_number" : 6,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "button",
          "content" : "点击前往",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "action" : {
            "target" : "https://www.example.com"
          }
        } ]
      } ],
      "params" : [ ],
      "factorys" : [ {
        "factory_type" : "HUAWEI",
        "state" : 1
      }, {
        "factory_type" : "OPPO",
        "state" : 1
      }, {
        "factory_type" : "VIVO",
        "state" : 1
      } ]
    }
  • 创建单卡券(CardVoucher)(自定义)。模板为试商用,分别创建text、title、image和button组件,支持厂商为"HUAWEI, OPPO , VIVO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "CardVoucher",
      "tpl_name" : "测试-自定义卡券",
      "use_id" : 2,
      "pages" : [ {
        "page_order" : 1,
        "contents" : [ {
          "type" : "text",
          "content" : "优惠活动",
          "is_text_title" : "false",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "卡券类型",
          "is_text_title" : "false",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "使用门槛",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "自定义卡券。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "is_text_title" : "false",
          "position_number" : 5
        }, {
          "type" : "image",
          "src_type" : 1,
          "src" : "714366886086740000",
          "action_type" : "OPEN_URL",
          "position_number" : 6,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "button",
          "content" : "点击前往",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "action" : {
            "target" : "https://www.example.com"
          }
        } ]
      } ],
      "params" : [ ],
      "factorys" : [ {
        "factory_type" : "HUAWEI",
        "state" : 1
      }, {
        "factory_type" : "OPPO",
        "state" : 1
      }, {
        "factory_type" : "VIVO",
        "state" : 1
      } ]
    }
  • 创建多卡券(CardVouchers)(多卡券单按钮)。模板为试商用,分别创建text和button模板组件,支持多组卡券,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "CardVouchers",
      "tpl_name" : "测试-多卡券单按钮",
      "use_id" : 2,
      "pages" : [ {
        "page_order" : 1,
        "contents" : [ {
          "type" : "text",
          "content" : "测试-满减优惠",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "卡券类型",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "免单",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "使用门槛",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "测试-自定义卡券。拒收请回复R",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "领取30天后有效",
          "position_number" : 6
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "visible" : 0,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "折扣券",
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "8.6折",
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "满1000可用",
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "测试-折扣优惠",
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "position_number" : 12
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 13,
          "visible" : 0,
          "action" : {
            "target" : "https://button"
          }
        }, {
          "type" : "text",
          "content" : "满减券",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : "¥280",
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "满2000可用",
          "position_number" : 16
        }, {
          "type" : "text",
          "content" : "测试-满减优惠",
          "position_number" : 17
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "position_number" : 18
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 19,
          "visible" : 0,
          "action" : {
            "target" : "https://button"
          }
        }, {
          "type" : "text",
          "content" : "满减券",
          "position_number" : 20
        }, {
          "type" : "text",
          "content" : "¥380",
          "position_number" : 21
        }, {
          "type" : "text",
          "content" : "满2000可用",
          "position_number" : 22
        }, {
          "type" : "text",
          "content" : "测试-满减优惠",
          "position_number" : 23
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "position_number" : 24
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 25,
          "visible" : 0,
          "action" : {
            "target" : "https://button"
          }
        }, {
          "type" : "button",
          "content" : "立即领取",
          "action_type" : "OPEN_URL",
          "position_number" : 26,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        } ]
      } ],
      "params" : [ ],
      "factorys" : [ {
        "factory_type" : "HUAWEI",
        "state" : 1
      } ]
    }
  • 创建多卡券(CardVouchers)(多卡券多按钮)。模板为试商用,分别创建text和button模板组件,支持多组卡券,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "CardVouchers",
      "tpl_name" : "测试-多卡券多按钮",
      "use_id" : 2,
      "pages" : [ {
        "page_order" : 1,
        "contents" : [ {
          "type" : "text",
          "content" : "测试-满减优惠",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "卡券类型",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "优惠活动",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "使用门槛",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "测试-自定义卡券。拒收请回复R",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "领取30天后有效",
          "position_number" : 6
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "折扣券",
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "8.6折",
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "满1000可用",
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "测试-折扣优惠",
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "position_number" : 12
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 13,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "满减券",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : "¥280",
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "满2000可用",
          "position_number" : 16
        }, {
          "type" : "text",
          "content" : "测试-满减优惠",
          "position_number" : 17
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "position_number" : 18
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 19,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "满减券",
          "position_number" : 20
        }, {
          "type" : "text",
          "content" : "¥380",
          "position_number" : 21
        }, {
          "type" : "text",
          "content" : "满2000可用",
          "position_number" : 22
        }, {
          "type" : "text",
          "content" : "测试-满减优惠",
          "position_number" : 23
        }, {
          "type" : "text",
          "content" : "2022-01-01~2022-12-31",
          "position_number" : 24
        }, {
          "type" : "button",
          "content" : "去领取",
          "action_type" : "OPEN_URL",
          "position_number" : 25,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "button",
          "content" : "立即领取",
          "action_type" : "OPEN_URL",
          "position_number" : 26,
          "visible" : 0,
          "action" : {
            "target" : "https://www.example.com"
          }
        } ]
      } ],
      "params" : [ ],
      "factorys" : [ {
        "factory_type" : "HUAWEI",
        "state" : 1
      } ]
    }
  • 创建图文类模板(StandardImageAndText)(VIVO厂商)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"VIVO",不支持厂商为"HUAWEI, XIAOMI, OPPO, MEIZU",短信签名为"koomessage"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "756036238808491111",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试-活动通知",
          "visible" : 1,
          "is_text_title" : "true",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "你相信光吗,你在哪里,光就在哪里。拒收请回复R",
          "visible" : 1,
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "点击进入",
          "visible" : 1,
          "action" : {
            "target" : "https://www.baidu.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 4
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 0,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 0,
        "factory_type" : "XIAOMI"
      }, {
        "state" : 0,
        "factory_type" : "OPPO"
      }, {
        "state" : 0,
        "factory_type" : "MEIZU"
      }, {
        "state" : 1,
        "factory_type" : "VIVO"
      } ],
      "card_id" : "StandardImageAndText",
      "tpl_name" : "测试-VIVO",
      "scene" : "",
      "use_id" : 2,
      "sms_example" : "你好尊贵的X先生,点击查看优惠k2mg.cn/adc123",
      "sms_signs" : [ "koomessage" ],
      "sms_template" : "你好尊贵的[文本0-20]点击进入[字母0-20]"
    }
  • 创建电商类多商品模板(Ecommerce)(显示货币符号)。模板为试商用,分别设置text、image、title和button模板组件,组件可设置为隐藏,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "Ecommerce",
      "tpl_name" : "测试-电商多商品模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "text",
          "content" : "测试标题",
          "visible" : 1,
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "内容描述。拒收请回复R",
          "visible" : 1,
          "position_number" : 2
        }, {
          "type" : "button",
          "content" : "图片按钮点击跳转",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "image",
          "src" : "722372808671272960",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "隐藏价格背景",
          "visible" : 0,
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "隐藏价格99",
          "visible" : 0,
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "商品1标题",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "商品1描述",
          "visible" : 1,
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "Label2",
          "visible" : 0,
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "货币单位",
          "visible" : 1,
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : 100.0,
          "visible" : 1,
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "按钮1",
          "visible" : 1,
          "position_number" : 12
        }, {
          "type" : "button",
          "content" : "按钮1",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 13
        }, {
          "type" : "image",
          "src" : "722372826597732352",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : "隐藏优惠价格",
          "visible" : 0,
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "隐藏优惠价格99",
          "visible" : 0,
          "position_number" : 16
        }, {
          "type" : "text",
          "content" : "商品2标题",
          "visible" : 1,
          "position_number" : 17
        }, {
          "type" : "text",
          "content" : "商品2描述",
          "position_number" : 18
        }, {
          "type" : "text",
          "content" : "Edit Text",
          "visible" : 0,
          "position_number" : 19
        }, {
          "type" : "text",
          "content" : "货币单位",
          "visible" : 1,
          "position_number" : 20
        }, {
          "type" : "text",
          "content" : 100.0,
          "visible" : 1,
          "position_number" : 21
        }, {
          "type" : "text",
          "content" : "按钮2",
          "visible" : 1,
          "position_number" : 22
        }, {
          "type" : "button",
          "content" : "按钮2",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 23
        }, {
          "type" : "image",
          "src" : "722372826597732352",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 24
        }, {
          "type" : "text",
          "content" : "隐藏优惠价格",
          "visible" : 0,
          "position_number" : 25
        }, {
          "type" : "text",
          "content" : "隐藏优惠价格999",
          "position_number" : 26
        }, {
          "type" : "text",
          "content" : "商品3标题",
          "is_text_title" : false,
          "position_number" : 27
        }, {
          "type" : "text",
          "content" : "商品3描述",
          "visible" : 1,
          "position_number" : 28
        }, {
          "type" : "text",
          "src" : "Edit text",
          "visible" : 0,
          "position_number" : 29
        }, {
          "type" : "text",
          "content" : "货币单位",
          "visible" : 1,
          "position_number" : 30
        }, {
          "type" : "text",
          "content" : 100.0,
          "visible" : 1,
          "position_number" : 31
        }, {
          "type" : "text",
          "content" : "按钮3",
          "visible" : 1,
          "position_number" : 32
        }, {
          "type" : "button",
          "content" : "按钮3",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 33
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ]
    }
  • 创建机票类模板(Trip1)。模板为试商用,分别设置image、text、和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "729178704084770816",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "行程通知-测试机票类",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "订单号:12095888888。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "深圳",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "武汉",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "17:40",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "19:35",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "2022/04/20",
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "MU2558",
          "visible" : 1,
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "2022/04/20",
          "visible" : 1,
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "乘车人",
          "visible" : 1,
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "舱位",
          "visible" : 1,
          "position_number" : 12
        }, {
          "type" : "text",
          "content" : "登机口",
          "position_number" : 13
        }, {
          "type" : "text",
          "content" : "徐乐",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : "商务舱",
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "A15",
          "position_number" : 16
        }, {
          "type" : "button",
          "content" : "联系客服",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 17
        }, {
          "type" : "button",
          "content" : "订单详情",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 18
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "card_id" : "Trip1",
      "tpl_name" : "测试-机票类",
      "scene" : "data",
      "use_id" : 2,
      "sms_example" : ""
    }
  • 创建火车票类模板(Trip2)。模板为试商用,分别设置image、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "729178704084770816",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "火车票出票成功-测试",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "订单号:SZ88888888。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "深圳",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "北京",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "18:30",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "02:55",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "2022/04/11",
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "G888",
          "visible" : 1,
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "2022/04/12",
          "visible" : 1,
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "乘车人",
          "visible" : 1,
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "成人票",
          "visible" : 1,
          "position_number" : 12
        }, {
          "type" : "text",
          "content" : "二等座",
          "position_number" : 13
        }, {
          "type" : "text",
          "content" : "许可",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : 568.88,
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "12车12F",
          "position_number" : 16
        }, {
          "type" : "button",
          "content" : "咨询客服",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 17
        }, {
          "type" : "button",
          "content" : "查看改签",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 18
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "card_id" : "Trip2",
      "tpl_name" : "测试-火车票类",
      "scene" : "",
      "use_id" : 2,
      "sms_example" : ""
    }
  • 创建汽车票类模板(Trip3)。模板为试商用,分别设置image、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "729178704084770816",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "汽车票出票-测试",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "订单号:S88888866。拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "深圳",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "汕头",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "9:00",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "14:00",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "2022/04/11",
          "position_number" : 8
        }, {
          "type" : "text",
          "content" : "粤X-999999",
          "visible" : 1,
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "2022/04/11",
          "visible" : 1,
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "乘车人",
          "visible" : 1,
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "票价",
          "visible" : 1,
          "position_number" : 12
        }, {
          "type" : "text",
          "content" : "座位",
          "position_number" : 13
        }, {
          "type" : "text",
          "content" : "许可",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : 180,
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "5F",
          "position_number" : 16
        }, {
          "type" : "button",
          "content" : "联系客服",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 17
        }, {
          "type" : "button",
          "content" : "退票",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 18
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "card_id" : "Trip3",
      "tpl_name" : "测试-汽车票类",
      "scene" : "",
      "use_id" : 2,
      "sms_example" : ""
    }
  • 创建增强机票类模板(PlaneTrip)。模板为试商用,分别设置title、text、image和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "pages" : [ {
        "contents" : [ {
          "type" : "text",
          "content" : "测试机票出票成功",
          "is_text_title" : "true",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "06:50",
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "12:00",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "12月30日",
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "经停杭州",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "12月30日",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "深圳宝安国际机场T3",
          "position_number" : 7
        }, {
          "type" : "text",
          "content" : "乌鲁木齐地窝堡机场T2",
          "position_number" : 8
        }, {
          "type" : "image",
          "content" : "选座升舱",
          "src" : "747402037796315136",
          "cover" : null,
          "src_type" : 1,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 9
        }, {
          "type" : "image",
          "content" : "托运购买",
          "src" : "747402037796315136",
          "src_type" : 1,
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 10
        }, {
          "type" : "image",
          "content" : "客服电话",
          "src" : "747402037796315136",
          "visible" : 1,
          "content_child" : null,
          "src_type" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 11
        }, {
          "type" : "image",
          "content" : "航班改期",
          "src" : "747402037796315136",
          "visible" : 1,
          "content_child" : null,
          "src_type" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 12
        }, {
          "type" : "text",
          "content" : "航班号",
          "content_child" : "海航HU7851",
          "position_number" : 13
        }, {
          "type" : "text",
          "content" : "登机口",
          "content_child" : "A3",
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : "座位号",
          "content_child" : "13A,13B,13C",
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "舱位类型",
          "content_child" : "经济舱",
          "position_number" : 16
        }, {
          "type" : "text",
          "content" : "经停时长",
          "content_child" : "2时5分",
          "position_number" : 17
        }, {
          "type" : "text",
          "content" : "总金额",
          "content_child" : 3320.0,
          "position_number" : 18
        }, {
          "type" : "text",
          "content" : "左边标题",
          "visible" : 1,
          "content_child" : "左边内容",
          "position_number" : 19
        }, {
          "type" : "text",
          "content" : "中间标题",
          "content_child" : "中间内容",
          "visible" : 1,
          "position_number" : 20
        }, {
          "type" : "text",
          "content" : "右边标题",
          "visible" : 1,
          "content_child" : "右边内容",
          "position_number" : 21
        }, {
          "type" : "text",
          "content" : "乘机人",
          "content_child" : "张毅,李小明,王赫赫",
          "position_number" : 22
        }, {
          "type" : "text",
          "content" : "票号",
          "content_child" : "784-6736858234782",
          "position_number" : 23
        }, {
          "type" : "text",
          "content" : "附属标题",
          "content_child" : "附属内容",
          "position_number" : 24
        }, {
          "type" : "text",
          "content" : "请您至少提前2小时至机场办理乘机手续,以免误机!",
          "position_number" : 25
        }, {
          "type" : "button",
          "content" : "立即打车",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 26
        }, {
          "type" : "button",
          "content" : "点击进入",
          "visible" : 1,
          "action" : {
            "target" : "https://www.baidu.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 27
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "card_id" : "PlaneTrip",
      "tpl_name" : "测试-增强机票类",
      "scene" : "",
      "use_id" : 2,
      "sms_example" : ""
    }
  • 创建个性化红包类模板(RedPacketPersonal)(样式2)。模板为试商用,设置button模板组件,支持厂商为"HUAWEI, VIVO"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "RedPacketPersonal",
      "tpl_name" : "测试:个性化红包模板",
      "sub_type" : 2,
      "pages" : [ {
        "contents" : [ {
          "type" : "button",
          "content" : "抢",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      }, {
        "state" : 1,
        "factory_type" : "VIVO"
      } ]
    }
  • 创建海报类模板(SimplePoster)。模板为试商用,设置image模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "SimplePoster",
      "tpl_name" : "测试:海报模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "747402037796315136",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "src_type" : 1,
          "position_number" : 1
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "scene" : "",
      "sms_example" : ""
    }
  • 创建超文本普通类模板(NativePureText)。模板为试商用,分别设置text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "NativePureText",
      "tpl_name" : "测试:超文本普通",
      "pages" : [ {
        "contents" : [ {
          "type" : "text",
          "content" : "文本内容",
          "visible" : 1,
          "is_text_title" : false,
          "position_number" : 1
        }, {
          "type" : "button",
          "content" : "按钮1",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "button",
          "content" : "按钮2",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "scene" : "",
      "sms_example" : ""
    }
  • 创建超文本增强类模板(NativeImageAndText)。模板为试商用,分别设置title、image、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "NativeImageAndText",
      "tpl_name" : "测试:超文本增强",
      "pages" : [ {
        "contents" : [ {
          "type" : "text",
          "content" : "测试标题",
          "visible" : 1,
          "is_text_title" : true,
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "747402037796315136",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "src_type" : 1,
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "内容",
          "visible" : 1,
          "is_text_title" : false,
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "按钮1",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 4
        }, {
          "type" : "button",
          "content" : "按钮2",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "scene" : "",
      "sms_example" : ""
    }
  • 创建短剧视频模板(ShortVideo)。模板为试商用,分别设置video、title、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "ShortVideo",
      "tpl_name" : "测试:短视频模板",
      "pages" : [ {
        "contents" : [ {
          "type" : "video",
          "src" : "747402037796315135",
          "cover" : "747402037796315135",
          "visible" : 1,
          "src_type" : 1,
          "position_number" : 1,
          "ratio" : "threeToFour",
          "action_type" : "OPEN_URL",
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "测试标题",
          "content_child" : "短视频模板",
          "is_text_title" : true,
          "visible" : 1,
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "内容。拒收请回复R",
          "content_child" : "短视频模板",
          "visible" : 1,
          "is_text_title" : false,
          "position_number" : 3
        }, {
          "type" : "button",
          "content" : "按钮1",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 4
        }, {
          "type" : "button",
          "content" : "按钮2",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "scene" : "",
      "sms_example" : ""
    }
  • 创建电商类模板(ECImageAndText)(设置按钮颜色)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "ECImageAndText",
      "tpl_name" : "测试:电商类模板",
      "sub_type" : 1,
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "709206231474000001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 1
        }, {
          "type" : "image",
          "src" : "709258670432600001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 2
        }, {
          "type" : "image",
          "src" : "709206119700000001",
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "160.00",
          "is_text_title" : "true",
          "position_number" : 4,
          "currency_display" : 1
        }, {
          "type" : "text",
          "content" : "满减",
          "is_text_title" : "true",
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "测试猫车模拟驾驶",
          "is_text_title" : "true",
          "position_number" : 6
        }, {
          "type" : "text",
          "content" : "您的体力已耗尽!拒收请回复R",
          "is_text_title" : "false",
          "position_number" : 7
        }, {
          "type" : "button",
          "content" : "添加购物车",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 8
        }, {
          "type" : "button",
          "content" : "立即购买",
          "action" : {
            "target" : "https://www.example.com"
          },
          "action_type" : "OPEN_BROWSER",
          "position_number" : 9
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ],
      "scene" : "",
      "sms_example" : ""
    }
  • 创建短剧图片模板(ShortVideoImage)。模板为试商用,分别设置image、title、text和button模板组件,支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "use_id" : 2,
      "card_id" : "ShortVideoImage",
      "tpl_name" : "短剧图片测试1:1有按钮-一体化",
      "scene" : "智能信息模版",
      "sub_type" : 2,
      "sms_example" : "你有一条新消息请查收",
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "HWR100044608",
          "cover" : "747402037796315135",
          "visible" : 1,
          "src_type" : 1,
          "position_number" : 1,
          "ratio" : "oneToOne",
          "action_type" : "OPEN_BROWSER",
          "currency_display" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "短剧图片测试1:1",
          "is_text_title" : true,
          "visible" : 1,
          "position_number" : 2,
          "currency_display" : 1
        }, {
          "type" : "text",
          "content" : "编辑文本描述,最多显示69个字。编辑文本描述,最多显示69个字。拒收请回复R",
          "visible" : 1,
          "is_text_title" : false,
          "position_number" : 3,
          "currency_display" : 1
        }, {
          "type" : "button",
          "content" : "链接",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_URL",
          "position_number" : 4,
          "currency_display" : 1
        }, {
          "type" : "button",
          "content" : "小程序链接",
          "action" : {
            "target" : "https://www.example.com"
          },
          "visible" : 1,
          "action_type" : "OPEN_BROWSER",
          "position_number" : 5,
          "currency_display" : 1
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ]
    }
  • 创建电商领券类竖版模板(EcommerceCouponVertical)。模板为试商用,根据position_number从1到7分别创建logo图、标题、副标题、券金额、券标题、券副标题、券按钮组件;position_number从8到13为商品1、从14到19为商品2、从20到25为商品3。支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "EcommerceCouponVertical",
      "tpl_name" : "测试电商领券",
      "use_id" : 2,
      "sub_type" : 1,
      "pages" : [ {
        "page_order" : 1,
        "contents" : [ {
          "type" : "image",
          "src_type" : 1,
          "visible" : 1,
          "src" : "HWR100003769",
          "action_type" : "OPEN_URL",
          "position_number" : 1,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "测试新客专享福利",
          "is_text_title" : "true",
          "visible" : 1,
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "店铺新人超值礼包等你拿",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "100",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "测试-最高减50元",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "同类商品仅限享受一次优惠活动。拒收请回复R",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 6
        }, {
          "type" : "button",
          "content" : "领",
          "visible" : 1,
          "button_type" : "static",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "image",
          "src_type" : 1,
          "visible" : 1,
          "src" : "HWR100003915",
          "action_type" : "OPEN_URL",
          "position_number" : 8,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "测试***唇膏新色1966红色持续保湿滋润",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "正品保证",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "全国包邮",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 11
        }, {
          "type" : "text",
          "content" : "300",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 12
        }, {
          "type" : "button",
          "content" : "前往购买",
          "action_type" : "OPEN_URL",
          "visible" : 1,
          "position_number" : 13,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "image",
          "src_type" : 1,
          "visible" : 1,
          "src" : "HWR100003897",
          "action_type" : "OPEN_URL",
          "position_number" : 14,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "测试***唇膏新品,小辣椒色",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 15
        }, {
          "type" : "text",
          "content" : "超值好物",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 16
        }, {
          "type" : "text",
          "content" : "内部包邮",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 17
        }, {
          "type" : "text",
          "content" : "320",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 18
        }, {
          "type" : "button",
          "content" : "前往购买",
          "action_type" : "OPEN_URL",
          "visible" : 1,
          "position_number" : 19,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "image",
          "src_type" : 1,
          "src" : "HWR100003915",
          "visible" : 1,
          "action_type" : "OPEN_URL",
          "position_number" : 20,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "测试***唇膏持久显色,不拔干,外观优雅,时尚美丽",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 21
        }, {
          "type" : "text",
          "content" : "优雅时尚",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 22
        }, {
          "type" : "text",
          "content" : "全国包邮",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 23
        }, {
          "type" : "text",
          "content" : "360",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 24
        }, {
          "type" : "button",
          "content" : "前往购买",
          "action_type" : "OPEN_URL",
          "visible" : 1,
          "position_number" : 25,
          "action" : {
            "target" : "https://www.example.com"
          }
        } ]
      } ],
      "params" : [ ],
      "factorys" : [ {
        "factory_type" : "HUAWEI",
        "state" : 1
      } ]
    }
  • 创建电商领券类横版模板(EcommerceCouponHorizontal)。模板为试商用,根据position_number由1到7分别创建logo图、标题、副标题、券金额、券标题、券副标题、券按钮组件;position_number从8到11为商品1、从12到15为商品2、从16到19为商品3。支持厂商为"HUAWEI"。

    https://koomessage.myhuaweicloud.cn/v1/aim/templates
    
    {
      "card_id" : "EcommerceCouponHorizontal",
      "tpl_name" : "测试-电商领券横版",
      "use_id" : 2,
      "sub_type" : 1,
      "pages" : [ {
        "contents" : [ {
          "type" : "image",
          "src" : "HWR100058888",
          "visible" : 1,
          "action" : {
            "target" : "https://www.example.com"
          },
          "src_type" : 1,
          "action_type" : "OPEN_URL",
          "position_number" : 1
        }, {
          "type" : "text",
          "content" : "测试新客专享福利",
          "is_text_title" : "true",
          "visible" : 1,
          "position_number" : 2
        }, {
          "type" : "text",
          "content" : "店铺新人超值礼包等你拿",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 3
        }, {
          "type" : "text",
          "content" : "100",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 4
        }, {
          "type" : "text",
          "content" : "测试-最高减50元",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 5
        }, {
          "type" : "text",
          "content" : "同类商品仅限享受一次优惠活动。拒收请回复R",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 6
        }, {
          "type" : "button",
          "content" : "领",
          "visible" : 1,
          "button_type" : "static",
          "action_type" : "OPEN_URL",
          "position_number" : 7,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "image",
          "src_type" : 1,
          "visible" : 1,
          "src" : "HWR100058888",
          "action_type" : "OPEN_URL",
          "position_number" : 8,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "299",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 9
        }, {
          "type" : "text",
          "content" : "***唇膏",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 10
        }, {
          "type" : "text",
          "content" : "质地丝滑",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 11
        }, {
          "type" : "image",
          "src_type" : 1,
          "visible" : 1,
          "src" : "HWR100058888",
          "action_type" : "OPEN_URL",
          "position_number" : 12,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "199",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 13
        }, {
          "type" : "text",
          "content" : "***小辣椒色唇膏",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 14
        }, {
          "type" : "text",
          "content" : "光泽亮丽",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 15
        }, {
          "type" : "image",
          "src_type" : 1,
          "visible" : 1,
          "src" : "HWR100058888",
          "action_type" : "OPEN_URL",
          "position_number" : 16,
          "action" : {
            "target" : "https://www.example.com"
          }
        }, {
          "type" : "text",
          "content" : "329",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 17
        }, {
          "type" : "text",
          "content" : "***哑光口红",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 18
        }, {
          "type" : "text",
          "content" : "持久光泽",
          "is_text_title" : "false",
          "visible" : 1,
          "position_number" : 19
        } ],
        "page_order" : 1
      } ],
      "params" : [ ],
      "factorys" : [ {
        "state" : 1,
        "factory_type" : "HUAWEI"
      } ]
    }

响应示例

状态码: 200

返回信息。

{
  "status" : "200",
  "message" : "success",
  "data" : {
    "tpl_id" : "600000001"
  }
}

状态码

状态码

描述

200

返回信息。

400

非法参数。

500

内部错误。

错误码

请参见错误码

相关文档