云消息服务 KOOMESSAGE-创建个人模板:请求示例

时间:2024-04-01 14:51:08

请求示例

  • 创建红包类模板(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"。

    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"
      } ]
    }
  • 创建横滑类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"。

    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
      } ]
    }
  • 创建单卡券(CardVoucher)(满减券)。模板为试商用,分别设置text、title、image和button模板组件,支持厂商为"HUAWEI"。

    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
      } ]
    }
  • 创建单卡券(CardVoucher)(自定义)。模板为试商用,分别创建text、title、image和button组件,支持厂商为"HUAWEI"。

    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
      } ]
    }
  • 创建多卡券(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"。

    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"
      } ]
    }
  • 创建海报类模板(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"
      } ]
    }
support.huaweicloud.com/api-koomessage/CreatePersonalTemplate.html