卡片短信模板示例

卡片短信在终端侧给用户呈现出多媒体卡片效果,提升通知可读性和互动性。在发送卡片短信之前,需要先创建卡片短信模板并通过审核,您可参照本文的模板示例进行填写。

重要
  • 您可以通过调用CreateCardSmsTemplate接口传入Template参数创建卡片短信模板,或通过控制台进行创建。

  • 请阅读卡片短信模板参数说明,了解模板具体参数说明。

  • 示例仅供参考,请根据实际情况填写模板中的参数。

注意事项

  • 必填项必须填写,且数据类型需填写正确。

  • 视频、图片类模板的资源尺寸和大小需符合规格。

  • 标题、正文、按钮的字数有限制。

  • 所有模板请按展示图片的顺序封装positionNumber,通常为从上至下、从左至右。

  • 动参Type=1时,Sample必填,动参变量定义和使用需保持一致。

  • 由于入参结构复杂,请确认参数结构,避免多次JSON序列化,导致解析错误。

  • 界面字体、背景色差需易于分辨,否则可能审核不通过。

图文类模板

模板类型

cardType

图文模板

5

长文本模板

15

轮播模板

11、12、13

多图文模板

7

横滑类1模板

1

横滑类2模板

2

图文模板

15

代码示例

无动参

{
  "extendInfo": {
    "scene": "HMOVM图文",
    "purpose": "2",
    "userExt": {
      "outId": "1234554321"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28755",
            "actionType": "OPEN_APP",
            "action": {
              "target": "https://s.tb.cn/c.KxzZ",
              "merchantName": "测试-图文模板",
              "packageName": [
                "com.taobao.taobao"
              ],
              "floorUrl": "https://s.tb.cn/c.KxzZ"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "测试- BENZ AMG 2020 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "测试-梅赛德斯-奔驰,创新激情永不灭。作为汽车 XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_BROWSER",
            "action": {
              "target": "https://www.mercedes-benz.com.cn",
              "merchantName": "测试-正在跳转梅赛德斯-奔驰"
            },
            "positionNumber": 4
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 5
}

有动参

{
  "extendInfo": {
    "scene": "HMOVM图文",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "全新纯电EQE"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "y6.ePwql"
      }
    ],
    "userExt": {
      "outId": "1234554321"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28755",
            "actionType": "OPEN_APP",
            "action": {
              "target": "https://s.tb.cn/c.KxzZ",
              "merchantName": "测试-图文模板",
              "packageName": [
                "com.taobao.taobao"
              ],
              "floorUrl": "https://s.tb.cn/c.KxzZ"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "测试- BENZ AMG 2020 试驾邀请 ${param1}",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "测试-梅赛德斯-奔驰,创新激情永不灭。作为汽车 XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_BROWSER",
            "action": {
              "target": "https://www.mercedes-benz.com.cn/${param2}",
              "merchantName": "测试-正在跳转梅赛德斯-奔驰"
            },
            "positionNumber": 4
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 5
}

长文本模板

30

说明

【企业】中的内容可以通过设置visible=0进行隐藏,需要占位,设置隐藏

代码示例

无动参

{
  "extendInfo": {
    "scene": "长图文测试8501",
    "purpose": "2",
    "userExt": {
      "outId": "测试123"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21566",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔驰",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ AMG 2020 ",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,梅赛德斯-奔驰,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "查看详情",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com/",
              "merchantName":正在跳转..."
            },
            "positionNumber": 5
          },
          {
            "type": "BUTTON",
            "content": "立即预约",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXXX/123",
              "merchantName":"正在跳转..."
            },
            "positionNumber": 6
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21786",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "21786"
            },
            "positionNumber": 7
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 15
}

有动参

{
  "extendInfo": {
    "scene": "长图文测试8501",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电动EDE"
      }
    ],
    "userExt": {
      "outId": "测试123"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21566",
            "visible": 0,
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔驰",
            "isTextTitle": true,
            "visible": 0,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ AMG 2020 ${param1}",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,梅赛德斯-奔驰,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "查看详情",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com/",
              "merchantName":"正在跳转..."
            },
            "positionNumber": 5
          },
          {
            "type": "BUTTON",
            "content": "立即预约",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXXX/123",
              "merchantName":"正在跳转..."
            },
            "positionNumber": 6
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21786",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "21786"
            },
            "positionNumber": 7
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 15
}

轮播模板

26

图片尺寸不同时,cardType参数不同,请您按需选择:

  • 16:9轮播模板:11

  • 1:1轮播模板:12

  • 48:65轮播模板:13

16:9轮播模板示例

无动参

{
  "extendInfo": {
    "scene": "HO16:9轮播",
    "purpose": "2",
    "userExt": {
      "outId": "1234554321"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23145",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23145"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23166",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23166"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ AMG 2020 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "特心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 11
}

有动参

{
  "extendInfo": {
    "scene": "HO16:9轮播",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电动EDE"
      }
    ],
    "userExt": {
      "outId": "1234554321"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23145",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23145"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23166",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23166"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ ${param1} 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "特心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 11
}

1:1轮播模板示例

无动参

{
  "extendInfo": {
    "scene": "HO1:1轮播",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电动EDE"
      }
    ],
    "userExt": {
      "outId": "1234554321"
    },
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23145",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23145"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23166",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23166"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ ${param1} 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "特心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 12
}

有动参

{
  "extendInfo": {
    "scene": "HO1:1轮播",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电动EDE"
      }
    ],
    "userExt": {
      "outId": "1234554321"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23145",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23145"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23166",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23166"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ ${param1} 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "特心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 12
}

48:65轮播模板示例

无动参

{
  "extendInfo": {
    "scene": "HO48:65轮播",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23145",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23145"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23166",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23166"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ AMG 2020 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "特心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 13
}

有动参

{
  "extendInfo": {
    "scene": "HO48:65轮播",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电动EDE"
      }
    ],
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23145",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23145"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "23166",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "23166"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ ${param1} 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "特心所向,驰以恒#作为世界上最成功的豪华汽车品牌之一,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 13
}

多图文模板

16

说明
  • 图、文需成对出现,顺序为图在前、文在后。

  • 主图+主标题放在最前,子图+子标题1-3个。

  • 打开大图的资源地址与模板图片资源地址需一致。如果模板资源类型是ID,则传ID。

代码示例

无动参

{
  "extendInfo": {
    "scene": "商用多图文类模板",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/bf83a3523abdd9/0316e7d09f5357f68f--4105360918.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/13bacd926189bc93fe98ad652f11d85c--819052851.jpg"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "第三届腾讯游戏玩家开放日在中国深圳正式启动~",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21678",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "21678"
            },
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "十三年IP正版手游,情怀再续完美还原端游..",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/202002/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/202002/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg"
            },
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "《魂斗罗:归来》是由腾讯联合日本KONAMI共同研发的...",
            "isTextTitle": false,
            "positionNumber": 6
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28755",
            "actionType": " VIEW_PIC",
            "action": {
              "target": "28755"
            },
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "《王者荣耀》是腾讯第一5V5团队公平竞技手游,国民M...",
            "isTextTitle": false,
            "positionNumber": 8
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 7
}

有动参

{
  "extendInfo": {
    "scene": "HMOVM多图文",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "2022年11月"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "/helloworld"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/bf83a3523abdd9/0316e7d09f5357f68f--4105360918.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/13bacd926189bc93fe98ad652f11d85c--819052851.jpg"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "第三届腾讯游戏玩家开放日将于${param1}在中国深圳正式启动~",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21678",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "21678"
            },
            "positionNumber": 3
          },
          {
            "type": "TEXT""content": "十三年IP正版${param2}手游,情怀再续完美还原端游..",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/202002/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/202002/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg"
            },
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "《魂斗罗:归来》是由腾讯联合日本KONAMI共同研发的...",
            "isTextTitle": false,
            "positionNumber": 6
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28755",
            "actionType": " VIEW_PIC",
            "action": {
              "target": "28755"
            },
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "《王者荣耀》是腾讯第一 5V5 团队公平竞技手游,国民M...",
            "isTextTitle": false,
            "positionNumber": 8
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 7
}

横滑类1模板

由多个图文类模板内容构成,数量为2-10个(即2-10个tmpCards)。

17

代码示例

无动参

{
  "extendInfo": {
    "scene": "HOVM横滑类1",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "FlowerInfused Glass",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "北欧简约天云艺术现代家具 XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 4
          }
        ]
      },
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "213234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "Forest",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "南美原始森林艺术现代家具XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 4
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 1
}

有动参

{
  "extendInfo": {
    "scene": "HOVM横滑类1",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "测试标题1"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "测试标题2"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "FlowerInfused Glass ${param1}",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "北欧简约天云艺术现代家具 XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 4
          }
        ]
      },
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "213234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "Forest${param2}",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "南美原始森林艺术现代家具 XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 4
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 1
}

横滑类2模板

与横滑类1模板的区别在于没有正文只有Title,Title一般加粗。

19

代码示例

无动参

{
  "extendInfo": {
    "scene": "HOVM横滑类2",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "北欧简约天云艺术现代家具XXXX ",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 3
          }
        ]
      },
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "213234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "南美原始森林艺术现代家具XXXX",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 3
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 2
}

有动参

{
  "extendInfo": {
    "scene": "HOVM横滑类2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "测试标题1"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "测试标题2"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "28234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "北欧简约天云艺术现代家具XXXX ${param1}",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 3
          }
        ]
      },
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "213234",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "南美原始森林艺术现代家具 XXXX ${param2}",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 3
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 2
}

视频类模板

模板类型

cardType

视频模板

4

视频图文模板

14

图文视频模板

18

视频模板

13

代码示例

无动参

{
  "extendInfo": {
    "scene": "HOV视频",
    "purpose": "2",
    "userExt": {
      "companyName": "阿里云"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "VIDEO",
            "srcType": 1,
            "cover": "28754",
            "src": "28753",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "BENZAMG 2020试驾邀请",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔驰,创新激情永不灭。作为汽车XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_BROWSER",
            "action": {
              "target": "https://www.mercedes-benz.com.cn/",
              "merchantName": "测试-正在跳转梅赛德斯-奔驰"
            },
            "positionNumber": 4
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 4
}

有动参

{
  "extendInfo": {
    "scene": "HOV视频",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "全新纯电EQE"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "y6.ePwql"
      }
    ],
    "userExt": {
      "companyName": "阿里云"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "VIDEO",
            "srcType": 1,
            "cover": "28754",
            "src": "28753",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "测试- BENZ AMG 2020 试驾邀请${param1}",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "测试-梅赛德斯-奔驰,创新激情永不灭。作为汽车XXXX",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_BROWSER",
            "action": {
              "target": "https://www.mercedes-benz.com.cn/${param2}",
              "merchantName": "测试-正在跳转梅赛德斯-奔驰"
            },
            "positionNumber": 4
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 4
}

视频图文模板

29

说明

图片比例21:9,视频比例16:9,数量均只有1个。上视频、下图片。

代码示例

无动参

{
  "extendInfo": {
    "scene": "测试-视频图文模板",
    "purpose": "2",
    "userExt": {
      "outId": "1234554321"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "VIDEO",
            "srcType": 1,
            "src": "23167",
            "cover": "23167",
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "719814534054846464",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "719814534054846464"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔弛,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索、创造、颠覆、革新、为心中所向,驰之以恒!",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXXX/${param1}",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 14
}

有动参

{
  "extendInfo": {
    "scene": "测试-视频图文模板",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电动EDE"
      }
    ]
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "VIDEO",
            "srcType": 1,
            "src": "23167",
            "cover": "23167",
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "719814534054846464",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "719814534054846464"
            },
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": " ${param1} 试驾邀请",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔弛,创新激情永不灭。作为汽车发明者,我们从未停下脚步,探索,创造,颠覆,革新,为心中所向,驰之以恒!",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": " ${param1} 预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXXX/${param1}",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 14
}

图文视频模板

与视频图文模板的区别在于视频和图的位置不同。

33

说明

视频比例 16:9,图片比例21:9,数量均只有1个。上图片、下视频。

代码示例

无动参

{
  "extendInfo": {
    "scene": "测试图文视频851",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "src": "21665",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 1
          },
          {
            "type": "VIDEO",
            "srcType": 1,
            "src": "34221",
            "cover": "21666",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ AMG 2020 试驾邀请 ",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔驰,创新激情永不灭。作为汽车 XXXX",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 18
}

有动参

{
  "extendInfo": {
    "scene": "测试图文视频851",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "纯电EDE"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "ae28j"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "src": "21665",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 1
          },
          {
            "type": "VIDEO",
            "srcType": 1,
            "src": "34221",
            "cover": "21666",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "BENZ ${param1} 试驾邀请 ",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "梅赛德斯-奔驰,创新激情永不灭。作为汽车 XXXX",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "预约试驾",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param2}"
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 18
}

通知类标题

模板类型

cardType

一般通知模板

3

行程通知模板

6

一般通知模板

20

代码示例

无动参

{
  "extendInfo": {
    "scene": "HM通知",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "交易提醒",
            "isTextTitle": true,
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "您尾号为7283的账户支出",
            "isTextTitle": false,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "2680.60",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "元",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "交易时间",
            "isTextTitle"false,
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "2020年12月31日 18:00",
            "isTextTitle": false,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "交易类型",
            "isTextTitle": false,
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "微信支付",
            "isTextTitle": false,
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "交易金额",
            "isTextTitle": false,
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "2680.60",
            "isTextTitle": false,
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "剩余金额",
            "isTextTitle": false,
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "2308629.86",
            "isTextTitle": false,
            "positionNumber"12
          },
          {
            "type": "BUTTON",
            "content": "联系客服",
            "actionType": "DIAL_PHONE",
            "action": {
              "target": "159XXXXXX"
            },
            "positionNumber": 13
          },
          {
            "type": "BUTTON",
            "content": "查看详情",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 14
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "684986582695976960",
            "actionType": "OPEN_URL",
            "action": {
              "target": " https://www.baidu.com?app=123",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 15
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 3
}

有动参

{
  "extendInfo": {
    "scene": "HM通知",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "7283"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "2680.60"
      },
      {
        "name": "${param3}",
        "type": 1,
        "example": "2020年12月31日 18:00"
      },
      {
        "name": "${param4}",
        "type": 1,
        "example": "2680.60"
      },
      {
        "name": "${param5}",
        "type": 1,
        "example": "2308629.86"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "交易提醒",
            "isTextTitle": true,
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "您尾号为${param1}的账户支出",
            "isTextTitle": false,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "${param2}",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "元",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "交易时间",
            "isTextTitle": false,
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "${param3}",
            "isTextTitle": false,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "交易类型",
            "isTextTitle": false,
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "微信支付",
            "isTextTitle": false,
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "交易金额",
            "isTextTitle": false,
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "${param4}",
            "isTextTitle": false,
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "剩余金额",
            "isTextTitle": false,
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "${param5}",
            "isTextTitle": false,
            "positionNumber": 12
          },
          {
            "type": "BUTTON",
            "content": "联系客服",
            "actionType": "DIAL_PHONE",
            "action": {
              "target": "159XXXXXX"
            },
            "positionNumber": 13
          },
          {
            "type": "BUTTON",
            "content": "查看详情",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 14
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "684986582695976960",
            "actionType": "OPEN_URL",
            "action": {
              "target": " https://www.baidu.com?app=123",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 15
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 3
}

行程通知模板

21

说明
  • tmpCards中第一个位置是底部图片。

  • 日期、时间、地点需要成对,从左到右出现。

  • 说明详情需要3个一组出现。

代码示例

无动参

{
  "extendInfo": {
    "scene": "H行程",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/10b6f3e3d13739ae0d987dcd5b01bd32--2989669678.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/10b6f3e3d13739ae0d987dcd5b01bd32--2989669678.jpg"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "火车票购票成功",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "订单号:EJ7153628",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "深圳",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "乌鲁木齐",
            "isTextTitle": false,
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "15:05",
            "isTextTitle": false,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "22:55",
            "isTextTitle": false,
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "2021-01-01",
            "isTextTitle": false,
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "G321",
            "isTextTitle": false,
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "2021-01-01",
            "isTextTitle": false,
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "乘座人",
            "isTextTitle": false,
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "成人票",
            "isTextTitle": false,
            "positionNumber": 12
          },
          {
            "type": "TEXT",
            "content": "二等座",
            "isTextTitle": false,
            "positionNumber": 13
          },
          {
            "type": "TEXT",
            "content": "张三",
            "isTextTitle": false,
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "1420.19 元",
            "isTextTitle": false,
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "12车12F",
            "isTextTitle": false,
            "positionNumber": 16
          },
          {
            "type": "BUTTON",
            "content": "改签",
            "actionType": "DIAL_PHONE",
            "action": {
              "target": "1324354****"
            },
            "positionNumber": 17
          },
          {
            "type": "BUTTON",
            "content": "退票",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.ak47s.cn/back",
              "merchantName":"正在跳转..."
            },
            "positionNumber": 18
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 6
}

有动参

{
  "extendInfo": {
    "scene": "H行程",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "张三"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "back.do"
      }
    ]
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/10b6f3e3d13739ae0d987dcd5b01bd32--2989669678.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/10b6f3e3d13739ae0d987dcd5b01bd32--2989669678.jpg"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "火车票购票成功",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "订单号:EJ7153628",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "深圳",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "乌鲁木齐",
            "isTextTitle": false,
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "15:05",
            "isTextTitle": false,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "22:55",
            "isTextTitle": false,
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "2021-01-01",
            "isTextTitle": false,
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "G321",
            "isTextTitle": false,
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "2021-01-01",
            "isTextTitle": false,
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "乘座人",
            "isTextTitle": false,
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "成人票",
            "isTextTitle": false,
            "positionNumber": 12
          },
          {
            "type": "TEXT",
            "content": "二等座",
            "isTextTitle": false,
            "positionNumber": 13
          },
          {
            "type": "TEXT",
            "content": "${param1}",
            "isTextTitle": false,
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "1420.19 元",
            "isTextTitle": false,
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "12车12F",
            "isTextTitle": false,
            "positionNumber": 16
          },
          {
            "type": "BUTTON",
            "content": "改签",
            "actionType": "DIAL_PHONE",
            "action": {
              "target": "1324354****"
            },
            "positionNumber": 17
          },
          {
            "type": "BUTTON",
            "content": "退票",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.ak47s.cn/${param2}",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 18
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 6
}

电商类模板

模板类型

cardType

电商模板

10

多商品模板

17

红包模板

8

个性化红包模板

16

单卡券模板

19

多卡券模板

20

电商模板

22

电商图片模板示例

说明
  • 图片尺寸 1:1 ,数量支持1-8个,图片支持事件。

  • 按钮可以只配置一个

无动参

{
  "extendInfo": {
    "scene": "H电商图文",
    "purpose": "2",
    "userExt": {
      "outId": "12345452"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21689",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "21689"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg"
            },
            "positionNumber": 2
          },
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/1f752ca77f2d851a6e621d0b88a7d0ab--670462893.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/1f752ca77f2d851a6e621d0b88a7d0ab--670462893.jpg"
            },
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "399",
            "isTextTitle": true,
            "currencyDisplay": 1,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "到手价¥314元",
            "isTextTitle": true,
            "positionNumber": 5,
            "visible": 1
          },
          {
            "type": "TEXT",
            "content": "智能大容量感应垃圾桶",
            "isTextTitle": true,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "德国红点奖设计,一提打包自动换袋,方便、卫生,真正提升生活品质。",
            "isTextTitle": false,
            "positionNumber": 7
          },
          {
            "type": "BUTTON",
            "content": "进店逛逛",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 8
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 9
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 10
}

有动参

{
  "extendInfo": {
    "scene": "H电商图文",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "314元"
      }
    ],
    "userExt": {
      "outId": "12345452"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "21689",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "21689"
            },
            "positionNumber": 1
          },
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/bf83a3523abdd90316e7d09f5357f68f--4105360918.jpg"
            },
            "positionNumber": 2
          },
          {
            "type": "IMAGE",
            "srcType": 2,
            "src": "http://XXXX/1f752ca77f2d851a6e621d0b88a7d0ab--670462893.jpg",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "http://XXXX/1f752ca77f2d851a6e621d0b88a7d0ab--670462893.jpg"
            },
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "399",
            "isTextTitle": true,
            "currencyDisplay": 1,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "到手价¥${param1}",
            "isTextTitle": true,
            "positionNumber": 5,
            "visible": 1
          },
          {
            "type": "TEXT",
            "content": "智能大容量感应垃圾桶",
            "isTextTitle": true,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "德国红点奖设计,一提打包自动换袋,方便、卫生,真正提升生活品质。",
            "isTextTitle": false,
            "positionNumber": 7
          },
          {
            "type": "BUTTON",
            "content": "进店逛逛",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 8
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 9
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 10
}

电商视频模板示例

说明

1:视频尺寸 1:1 ,数量支持1个,不支持事件

2:按钮可以只配置一个

无动参

{
  "extendInfo": {
    "scene": "H电商视频",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "314元"
      }
    ],
    "userExt": {
      "outId": "12345452"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "VIDEO",
            "srcType": 1,
            "src": "21689",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "399",
            "isTextTitle": true,
            "currencyDisplay": 1,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "到手价¥${param1}",
            "isTextTitle": true,
            "positionNumber": 3,
            "visible": 1
          },
          {
            "type": "TEXT",
            "content": "智能大容量感应垃圾桶",
            "isTextTitle": true,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "德国红点奖设计,一提打包自动换袋,方便、卫生,真正提升生活品质。",
            "isTextTitle": false,
            "positionNumber": 5
          },
          {
            "type": "BUTTON",
            "content": "进店逛逛",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 6
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 7
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 10
}

有动参

{
  "extendInfo": {
    "scene": "H电商视频",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "314元"
      }
    ],
    "userExt": {
      "outId": "12345452"
    }
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "VIDEO",
            "srcType": 1,
            "src": "21689",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "399",
            "isTextTitle": true,
            "currencyDisplay": 1,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "到手价¥${param1}",
            "isTextTitle": true,
            "positionNumber": 3,
            "visible": 1
          },
          {
            "type": "TEXT",
            "content": "智能大容量感应垃圾桶",
            "isTextTitle": true,
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "德国红点奖设计,一提打包自动换袋,方便、卫生,真正提升生活品质。",
            "isTextTitle": false,
            "positionNumber": 5
          },
          {
            "type": "BUTTON",
            "content": "进店逛逛",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 6
          },
          {
            "type": "BUTTON",
            "content": "立即购买",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 7
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 10
}

多商品模板

32

说明
  • tmpCards的数量只能是22个或者33个(也就是最大的positionNumber=22或者33),数量为22表示列表显示2个商品,33表示列表显示3个商品。

  • 部分内容可隐藏,但是必须占位。

  • 目前多商品版式图片点击事件的跳转地址不支持动参。

代码示例

无动参

{
  "extendInfo": {
    "scene": "多商品模板测试-33",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "美妆**** - 顶部标题",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "不做小白,为美丽负责-顶部子标题",
            "visible": 0,
            "positionNumber": 2
          },
          {
            "type": "BUTTON",
            "content": "图片按钮点击跳转-顶部三角",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 3
          },
          {
            "type": "IMAGE",
            "src": "23123",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格背景",
            "visible": 0,
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格 112",
            "visible": 0,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "圣罗兰(YSL)方管口红唇膏新色1966红色(缎光持久....",
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "正品包邮",
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "可隐藏的标签-正品包邮",
            "visible": 0,
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "货币单位",
            "visible": 1,
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": 288.00,
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "立即购买",
            "visible": 1,
            "positionNumber": 12
          },
          {
            "type": "BUTTON",
            "content": "商品点击",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 13
          },
          {
            "type": "IMAGE",
            "src": "23114",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "立省 ",
            "visible": 1,
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "99元",
            "visible": 1,
            "positionNumber": 16
          },
          {
            "type": "TEXT",
            "content": "魅可MAC子弹头唇膏哑光口红 602 Chili 小辣椒色魅可 MAC 子弹头唇膏哑光口红 602 Chili 小辣椒色",
            "positionNumber": 17
          },
          {
            "type": "TEXT",
            "content": "香港直邮",
            "positionNumber": 18
          },
          {
            "type": "TEXT",
            "content": "正品超值好物",
            "visible": 1,
            "positionNumber": 19
          },
          {
            "type": "TEXT",
            "content": "货币单位",
            "visible": 1,
            "positionNumber": 20
          },
          {
            "type": "TEXT",
            "content": 315.00,
            "positionNumber": 21
          },
          {
            "type": "TEXT",
            "content": "立即购买",
            "visible": 1,
            "positionNumber": 22
          },
          {
            "type": "BUTTON",
            "content": "商品点击",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 23
          },
          {
            "type": "IMAGE",
            "src": "54321",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 24
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格背景",
            "visible": 0,
            "positionNumber": 25
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格 99",
            "visible": 0,
            "positionNumber": 26
          },
          {
            "type": "TEXT",
            "content": "凡光胶囊口红唇膏磁铁丝绒辛辣甘甜...",
            "positionNumber": 27
          },
          {
            "type": "TEXT",
            "content": "超值好物",
            "positionNumber": 28
          },
          {
            "type": "TEXT",
            "content": "可隐藏的标签-正品包邮",
            "visible": 0,
            "positionNumber": 29
          },
          {
            "type": "TEXT",
            "content": "货币单位",
            "visible": 1,
            "positionNumber": 30
          },
          {
            "type": "TEXT",
            "content": 119.01,
            "positionNumber": 31
          },
          {
            "type": "TEXT",
            "content": "立即购买",
            "visible": 1,
            "positionNumber": 32
          },
          {
            "type": "BUTTON",
            "content": "商品点击",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 33
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 17
}

有动参

{
  "extendInfo": {
    "scene": "多商品模板测试-33",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "13245"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "21345"
      },
      {
        "name": "${param3}",
        "type": 1,
        "example": "45321"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "美妆****-顶部标题",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "不做小白,为美丽负责-顶部子标题",
            "visible": 0,
            "positionNumber": 2
          },
          {
            "type": "BUTTON",
            "content": "图片按钮点击跳转-顶部三角",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 3
          },
          {
            "type": "IMAGE",
            "src": "23123",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格背景",
            "visible": 0,
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格 112",
            "visible": 0,
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "圣罗兰(YSL)方管口红唇膏新色 1966 红色(缎光持久....",
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "正品包邮",
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "可隐藏的标签-正品包邮",
            "visible": 0,
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "货币单位",
            "visible": 1,
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": 288.00,
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "立即购买",
            "visible": 1,
            "positionNumber": 12
          },
          {
            "type": "BUTTON",
            "content": "商品点击",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param1}",
              "merchantName": "阿里云"
            },
            "positionNumber": 13
          },
          {
            "type": "IMAGE",
            "src": "23114",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "立省 ",
            "visible": 1,
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "99元",
            "visible": 1,
            "positionNumber": 16
          },
          {
            "type": "TEXT",
            "content": "魅可 MAC 子弹头唇膏哑光口红 602 Chili 小辣椒色魅可 MAC 子弹头唇膏哑光口红 602 Chili 小辣椒色",
            "positionNumber": 17
          },
          {
            "type": "TEXT",
            "content": "香港直邮",
            "positionNumber": 18
          },
          {
            "type": "TEXT",
            "content": "正品超值好物",
            "visible": 1,
            "positionNumber": 19
          },
          {
            "type": "TEXT",
            "content": "货币单位",
            "visible": 1,
            "positionNumber": 20
          },
          {
            "type": "TEXT",
            "content": 315.00,
            "positionNumber": 21
          },
          {
            "type": "TEXT",
            "content": "立即购买",
            "visible": 1,
            "positionNumber": 22
          },
          {
            "type": "BUTTON",
            "content": "商品点击",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param2}",
              "merchantName": "阿里云"
            },
            "positionNumber": 23
          },
          {
            "type": "IMAGE",
            "src": "54321",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "阿里云"
            },
            "positionNumber": 24
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格背景",
            "visible": 0,
            "positionNumber": 25
          },
          {
            "type": "TEXT",
            "content": "隐藏优惠价格 99",
            "visible": 0,
            "positionNumber": 26
          },
          {
            "type": "TEXT",
            "content": "凡光胶囊口红唇膏磁铁丝绒辛辣甘甜...",
            "positionNumber": 27
          },
          {
            "type": "TEXT",
            "content": "超值好物",
            "positionNumber": 28
          },
          {
            "type": "TEXT",
            "content": "可隐藏的标签-正品包邮",
            "visible": 0,
            "positionNumber": 29
          },
          {
            "type": "TEXT",
            "content": "货币单位",
            "visible": 1,
            "positionNumber": 30
          },
          {
            "type": "TEXT",
            "content": 119.01,
            "positionNumber": 31
          },
          {
            "type": "TEXT",
            "content": "立即购买",
            "visible": 1,
            "positionNumber": 32
          },
          {
            "type": "BUTTON",
            "content": "商品点击",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param3}",
              "merchantName": "阿里云"
            },
            "positionNumber": 33
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 17
}

红包模板

25

代码示例

无动参

{
  "extendInfo": {
    "scene": "HMMO红包",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "Q8jVYBnwN3Lxnc6eIjV",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "盒马生鲜",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "双十一全球狂欢节",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "给你发了一个红包",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "立即领取",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 8
}

有动参

{
  "extendInfo": {
    "scene": "HMMO红包",
    "purpose": "2",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "张三的小店"
      }
    ]
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "Q8jVYBnwN3Lxnc6eIjV",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "盒马生鲜",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "双十一全球狂欢节",
            "isTextTitle": false,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "${param1}给你发了一个红包",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "BUTTON",
            "content": "立即领取",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com",
              "merchantName": "正在跳转..."
            },
            "positionNumber": 5
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 8
}

个性化红包模板

31

说明
  • 按钮只能填限定的4个字,支持事件,但是不支持打开大图事件。

  • 图片比例3:4,建议不要使用色差太大的图片。

代码示例

无动参

{
  "extendInfo": {
    "scene": "测试个性红包851",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "41625",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "41625"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "盒马生鲜",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "盒马祝您",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "给你发了个红包!世间万物,唯有发红包的人不可辜负!",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "32145",
            "positionNumber": 5
          },
          {
            "type": "BUTTON",
            "content": "開",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123",
              "merchantName": "盒马"
            },
            "positionNumber": 6
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 16
}

有动参

{
  "extendInfo": {
    "scene": "测试个性红包851",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "王二小"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "qu98v"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "41625",
            "actionType": "VIEW_PIC",
            "action": {
              "target": "41625"
            },
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "盒马生鲜",
            "isTextTitle": true,
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "盒马祝${param1}",
            "isTextTitle": true,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "给你发了个红包!世间万物,唯有发红包的人不可辜负!",
            "isTextTitle": false,
            "positionNumber": 4
          },
          {
            "type": "IMAGE",
            "srcType": 1,
            "src": "32145",
            "positionNumber": 5
          },
          {
            "type": "BUTTON",
            "content": "開",
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param2}",
              "merchantName": "盒马"
            },
            "positionNumber": 6
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 16
}

单卡券模板

35

代码示例

无动参

{
  "extendInfo": {
    "scene": "单卡券测试851",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "30",
            "currencyDisplay": 1,
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "新人专享券",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "满 100 可用",
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "仅限购买电子类部分商品",
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 5
          },
          {
            "type": "IMAGE",
            "src": "21345",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com"
            },
            "positionNumber": 6
          },
          {
            "type": "BUTTON",
            "content": "立即领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com?app=123"
            },
            "positionNumber": 7
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 19
}

有动参

{
  "extendInfo": {
    "scene": "单卡券测试851",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "100"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "qwqe45"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "30",
            "currencyDisplay": 1,
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "新人专享券",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "满 ${param1} 可用",
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "仅限购买电子类部分商品",
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 5
          },
          {
            "type": "IMAGE",
            "src": "21345",
            "srcType": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com"
            },
            "positionNumber": 6
          },
          {
            "type": "BUTTON",
            "content": "立即领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://XXXX.com?app=${param2}"
            },
            "positionNumber": 7
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 19
}

多卡券模板

36

说明
  • 【优惠】只能包括¥和数字,只能包含文字否则终端无法显示,¥可以通过设置currencyDisplay=0隐藏。

  • 大小按钮只能2选1。

代码示例

无动参小按钮

{
  "extendInfo": {
    "scene": "多卡券模板测试",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "双 12 优惠精品推荐",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "10",
            "currencyDisplay": 1,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "满 50 减 10",
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "仅可购买电子类部分商品(华为旗舰店)",
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 6
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "30",
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "满 100 可用",
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "仅可购买母婴用品类部分商品(巴拉巴拉旗舰店)",
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 12
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 13
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "50",
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "每满 300 可减",
            "positionNumber": 16
          },
          {
            "type": "TEXT",
            "content": "仅可购买个护洗漱自营用品类部分商品(雅诗兰黛旗舰店)",
            "positionNumber": 17
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 18
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 19
          },
          {
            "type": "TEXT",
            "content": "商品券",
            "positionNumber": 20
          },
          {
            "type": "TEXT",
            "content": "200",
            "positionNumber": 21
          },
          {
            "type": "TEXT",
            "content": "无门槛",
            "positionNumber": 22
          },
          {
            "type": "TEXT",
            "content": "全类双十二专场",
            "positionNumber": 23
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 24
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 25
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 20
}

无动参大按钮

{
  "extendInfo": {
    "scene": "多卡券模板测试",
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "双 12 优惠精品推荐",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "10",
            "currencyDisplay": 1,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "满 50 减 10",
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "仅可购买电子类部分商品(华为旗舰店)",
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 6
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "30",
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "满 100 可用",
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "仅可购买母婴用品类部分商品(巴拉巴拉旗舰店)",
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 12
          },
          {
            "type": "TEXT",
            "content": "50",
            "positionNumber": 13
          },
          {
            "type": "TEXT",
            "content": "每满 300 可减",
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "仅可购买个护洗漱自营用品类部分商品(雅诗兰黛旗舰店)",
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 16
          },
          {
            "type": "TEXT",
            "content": "商品券",
            "positionNumber": 17
          },
          {
            "type": "TEXT",
            "content": "200",
            "positionNumber": 18
          },
          {
            "type": "TEXT",
            "content": "无门槛",
            "positionNumber": 19
          },
          {
            "type": "TEXT",
            "content": "全类双十二专场",
            "positionNumber": 20
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 21
          },
          {
            "type": "BUTTON",
            "content": "去使用(大按钮)",
            "visible": 0,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=123"
            },
            "positionNumber": 22
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 20
}

有动参

{
  "extendInfo": {
    "scene": "多卡券模板测试",
    "params": [
      {
        "name": "${param1}",
        "type": 1,
        "example": "12341231"
      },
      {
        "name": "${param2}",
        "type": 1,
        "example": "34121231"
      },
      {
        "name": "${param3}",
        "type": 1,
        "example": "32456322"
      }
    ],
    "purpose": "2"
  },
  "templateContent": {
    "pages": [
      {
        "tmpCards": [
          {
            "type": "TEXT",
            "content": "双 12 优惠精品推荐",
            "positionNumber": 1
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 2
          },
          {
            "type": "TEXT",
            "content": "10",
            "currencyDisplay": 1,
            "positionNumber": 3
          },
          {
            "type": "TEXT",
            "content": "满 50 减 10",
            "positionNumber": 4
          },
          {
            "type": "TEXT",
            "content": "仅可购买电子类部分商品(华为旗舰店)",
            "positionNumber": 5
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 6
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param1}"
            },
            "positionNumber": 7
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 8
          },
          {
            "type": "TEXT",
            "content": "30",
            "positionNumber": 9
          },
          {
            "type": "TEXT",
            "content": "满 100 可用",
            "positionNumber": 10
          },
          {
            "type": "TEXT",
            "content": "仅可购买母婴用品类部分商品(巴拉巴拉旗舰店)",
            "positionNumber": 11
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 12
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param2}"
            },
            "positionNumber": 13
          },
          {
            "type": "TEXT",
            "content": "店铺优惠券",
            "positionNumber": 14
          },
          {
            "type": "TEXT",
            "content": "50",
            "positionNumber": 15
          },
          {
            "type": "TEXT",
            "content": "每满 300 可减",
            "positionNumber": 16
          },
          {
            "type": "TEXT",
            "content": "仅可购买个护洗漱自营用品类部分商品(雅诗兰黛旗舰店)",
            "positionNumber": 17
          },
          {
            "type": "TEXT",
            "content": "2021.09.12~2021.12.12",
            "positionNumber": 18
          },
          {
            "type": "BUTTON",
            "content": "去领取",
            "visible": 1,
            "actionType": "OPEN_URL",
            "action": {
              "target": "https://www.baidu.com?app=${param3}"
            },
            "positionNumber": 19
          }
        ]
      }
    ]
  },
  "cardSignName": "阿里云",
  "cardType": 20
}