1. 垂类卡片模板Schema结构定义

1.1 目录

业务垂类            APIKey说明
日历            almanacs-almancInfo            查黄历
日历           

datetime-datetimeInfo            

查时间
日历holiday-holidayInfo            查假期
星座sign-fortuneInfo            星座运势
地图导航restriction-restrictionInfo            限行查询
地图导航poi-poiSearchInfo            查地图-周边信息
地图导航trafficCondition-trafficConditionInfo            路况查询
地图导航geocoder-geocoderInfo            位置查询-逆地理编码
翻译            translation-translationInfo            翻译查询
本地生活life-garbageClassification            垃圾分类
菜谱

recipe-recipeInfo                

查菜谱
天气

weather-weatherInfo                

查天气-获取天气信息
天气weather-weatherCityInfo            查天气-城市位置
打车-地址列表查询taxi-addressList            打车-地址列表查询
打车-预叫车taxi-prepareInfo            打车-预叫车
新闻news-newsInfo            

听新闻

新闻news-newsVideoInfo            看新闻-新闻短视频推荐
智能聊天riddle-riddleInfo            猜谜语
游戏joke-jokeInfo            幽默笑话
解梦

dreamInterpretation-dreamInterpretationInfo                

解梦
百科encyclopedia-genericInfo            通用百科
百科
encyclopedia-automobileInfo            汽车百科
百科encyclopedia-celebrityInfo            人物百科
百科encyclopedia-plantInfo            植物百科
百科encyclopedia-animalInfo            动物百科
百科encyclopedia-artworkInfo            艺术品百科
百科encyclopedia-constructionInfo            建筑百科
线上商城shopping-scanImage            买商品-扫图购
线上商城shopping-scanCode            买商品-扫码购
快递logistics-searchLogisticsInfo            快递状态
快递logistics-subscriptionInfo            快递绑定跟踪
有声audio
有声垂类开发
有声读物audio-search            有声书-语音搜索专辑列表
有声读物audio-albumDetail            有声书-查询专辑详情,获取专辑的节目列表。
有声读物audio-queryContentUrl            有声书-获取节目资源URL
短视频       videoClips-queryVideoClips            看短视频-查询
题库questionBank-scanImage            查题库-扫图搜题
火车票railway-ticketInfo            查火车票状态-火车票详情
航班flight-flightInfo            查航班状态-航班详情
运动sports-sportsInfo            运动-运动数据
体育赛事sports-events
体育赛事信息获取
股票stockFund-stockQuery            查股票行情
汇率rate-exchange            汇率换算
景点Scenic
景点介绍
旅游攻略Travel Tips查看旅游攻略信息
历史的今天Calendar History查询历史的今天
旅行
travel-hotelInfo旅行-酒店信息查询

请参考各垂类的消息样例代码.

2. 通用卡片模板Schema结构定义

2.1 纯文本型通用模板

BasicTextTemplate

  1. {
  2.  "type": "BasicTextTemplate",
  3.  "content": {
  4.    "primaryInfo": {
  5.      "primaryText": {
  6.        "text": "string",
  7.        "highlightText": [
  8.          "string"
  9.        ],
  10.        "highlightColor": "ColorAccent"
  11.      },
  12.      "primaryNumericalList": [
  13.        {
  14.          "numerical": "string",
  15.          "highlightNumerical": "string",
  16.          "highlightColor": "ColorAccent"
  17.        }
  18.      ],
  19.      "tagText": "string"
  20.    },
  21.    "auxiliaryInfo": [
  22.      {
  23.        "auxiliaryText": [
  24.          {
  25.            "text": "string",
  26.            "bulletsUrl": "string",
  27.            "highlightText": [
  28.              "string"
  29.            ],
  30.            "highlightColor": "ColorAccent",
  31.            "subTitle": "string"
  32.          }
  33.        ]
  34.      },
  35.      {
  36.        "score": 0,
  37.        "tagText": [
  38.          "string"
  39.        ],
  40.        "tagStyle": [
  41.          {
  42.            "type": "GRADE",
  43.            "style": 1,
  44.            "color": "ColorPrimary"
  45.          }
  46.        ]
  47.      },
  48.      {
  49.        "price": [
  50.          {
  51.            "price": 0,
  52.            "originalPrice": 0,
  53.            "priceUnit": "CNY"
  54.          }
  55.        ]
  56.      }
  57.    ],
  58.    "detailUrl": {
  59.      "webURL": "string",
  60.      "deepLink": {
  61.        "url": "string",
  62.        "appName": "string",
  63.        "appPackage": "string",
  64.        "minVersion": 0,
  65.        "minAndroidAPILevel": 0
  66.      },
  67.      "quickApp": {
  68.        "url": "string",
  69.        "minPlatformVersion": 0,
  70.        "minVersion": 0
  71.      },
  72.      "faLink": {
  73.        "packageName": "string",
  74.        "serviceName": "string",
  75.        "startParams": "string",
  76.        "minVersion": 0,
  77.        "minApiVersion": 0
  78.      },
  79.      "silentLink": {
  80.        "url": "string",
  81.        "appName": "string",
  82.        "appPackage": "string",
  83.        "appBrief": "string",
  84.        "appIconUrl": "string"
  85.      }
  86.    },
  87.    "dataSource": {
  88.      "dataSource": "string",
  89.      "updateTime": "string",
  90.      "statement": "string",
  91.      "tagText": "string",
  92.      "tagStyle": {
  93.        "type": "GRADE",
  94.        "style": 1,
  95.        "color": "ColorPrimary"
  96.      }
  97.    }
  98.  }

  99. }

2.11 TextTemplatRsp

主信息定义

成员名称描述是否必选类型取值范围
Type卡片模板类型否stringBasicTextTemplate
content主信息定义否

TextContentInfo


/

2.12 TextContentInfo    

主信息定义

成员名称描述是否必选类型取值范围
primaryInfo主信息定义否PrimaryText, PrimaryNumericalListmaxLength:32

auxiliaryInfo

卡片辅助信息内容否

/


maxItems:3
detailUrl点击整个卡片需要实际跳转的H5链接,要求为https地址否InteractionmaxLength:512

dataSource

列表型卡片数据来源内容信息否DataSourceInfo

/

PrimaryText

主信息定义

成员名称描述是否必选类型取值范围
text主文本信息否StringmaxLength:64

highlightText

需要高亮的文本信息否

String


maxItems:2
highlightColor高亮信息颜色色值定义否StringEnum:
[ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]

PrimaryNumericalList

数字信息

成员名称描述是否必选类型取值范围
PrimaryNumerical主文本信息/PrimaryNumerical/

tagText

标签展示文本否

String


maxLength:32

PrimaryNumerical

主信息定义

成员名称描述是否必选类型取值范围
numerical数字类文本信息否StringmaxLength:64

highlightNumerical

高亮的数字类文本信息否

String


maxLength:64
highlightColor高亮信息颜色色值定义否StringEnum:
[ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]

DataSourceInfo    

卡片数据来源内容信息

成员名称描述是否必选类型取值范围
dataSource数据来源文字描述信息,如“华为视频”否StringmaxLength:32

updateTime

更新时间,如“更新时间 2020/06/22 20:11:00”否StringmaxLength:12
statement声明信息否StringmaxLength:12

tagText

数据来源标签展示文本否StringmaxLength:32

2.2 图文型模板

BasicImageDetailTemplate

  1. {
  2.  "type": "BasicImageDetailTemplate",
  3.  "content": {
  4.    "primaryInfo": {
  5.      "primaryText": {
  6.        "text": "string",
  7.        "highlightText": [
  8.          "string"
  9.        ],
  10.        "highlightColor": "ColorAccent"
  11.      },
  12.      "primaryNumericalList": [
  13.        {
  14.          "numerical": "string",
  15.          "highlightNumerical": "string",
  16.          "highlightColor": "ColorAccent"
  17.        }
  18.      ],
  19.      "tagText": "string"
  20.    },
  21.    "auxiliaryInfo": [
  22.      {
  23.        "auxiliaryText": [
  24.          {
  25.            "text": "string",
  26.            "bulletsUrl": "string",
  27.            "highlightText": [
  28.              "string"
  29.            ],
  30.            "highlightColor": "ColorAccent",
  31.            "subTitle": "string"
  32.          }
  33.        ]
  34.      },
  35.      {
  36.        "score": 0,
  37.        "tagText": [
  38.          "string"
  39.        ],
  40.        "tagStyle": [
  41.          {
  42.            "type": "GRADE",
  43.            "style": 1,
  44.            "color": "ColorPrimary"
  45.          }
  46.        ]
  47.      },
  48.      {
  49.        "price": [
  50.          {
  51.            "price": 0,
  52.            "originalPrice": 0,
  53.            "priceUnit": "CNY"
  54.          }
  55.        ]
  56.      }
  57.    ],
  58.    "imageInfo": {
  59.      "imageInfoList": [
  60.        {
  61.          "scale": "OneToOne",
  62.          "url": "string"
  63.        }
  64.      ],
  65.      "functionTag": "string",
  66.      "functionTagImgUrl": "string",
  67.      "operatorTag": "string"
  68.    },
  69.    "detailUrl": {
  70.      "webURL": "string",
  71.      "deepLink": {
  72.        "url": "string",
  73.        "appName": "string",
  74.        "appPackage": "string",
  75.        "minVersion": 0,
  76.        "minAndroidAPILevel": 0
  77.      },
  78.      "quickApp": {
  79.        "url": "string",
  80.        "minPlatformVersion": 0,
  81.        "minVersion": 0
  82.      },
  83.      "faLink": {
  84.        "packageName": "string",
  85.        "serviceName": "string",
  86.        "startParams": "string",
  87.        "minVersion": 0,
  88.        "minApiVersion": 0
  89.      },
  90.      "silentLink": {
  91.        "url": "string",
  92.        "appName": "string",
  93.        "appPackage": "string",
  94.        "appBrief": "string",
  95.        "appIconUrl": "string"
  96.      }
  97.    },
  98.    "dataSource": {
  99.      "dataSource": "string",
  100.      "updateTime": "string",
  101.      "statement": "string",
  102.      "tagText": "string",
  103.      "tagStyle": {
  104.        "type": "GRADE",
  105.        "style": 1,
  106.        "color": "ColorPrimary"
  107.      }
  108.    }
  109.  }

  110. }

2.21 ImageDetailTemplatRsp

主信息定义

成员名称描述是否必选类型取值范围
Type卡片模板类型否stringEnum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
content主信息定义否

ImageDetailContentInfo

/

ImageDetailContentInfo

主信息定义

成员名称描述是否必选类型取值范围
primaryInfo主信息定义否PrimaryInfo/

auxiliaryInfo

卡片辅助信息内容否

AuxiliaryTextInfo, TagTextInfo, PriceInfo

/
ImageInfo图片内容信息否Imageinfo
detailUrl点击整个卡片需要实际跳转的H5链接,要求为https地址否InteractionmaxLength:512

dataSource

列表型卡片数据来源内容信息否DataSourceInfo

/

PrimaryInfo

主信息定义

成员名称描述是否必选类型取值范围
primaryText主信息定义否PrimaryText/
primaryNumericalList数字信息否

PrimaryNumerical

/
tagText标签展示文本否stringmaxLength:32

AuxiliaryTextInfo

辅助信息展示文本

成员名称描述是否必选类型取值范围
AuxiliaryText辅助文本定义否string
maxLength:64

bulletsUrl

辅助信息项目符号图标Url否

string

maxLength:256
highlightText高亮文本信息否stringmaxItems:2
highlightColor高亮信息颜色色值定义否stringEnum:
[ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]
subTitle辅助文本信息的文本标签,辅助文本信息分组展示时不支持否

string

maxLength:32

TagTextInfo

标签展示文本

成员名称描述是否必选类型取值范围
score评分信息,5分制,如4.5否/
/

tagText

标签文本信息否

string

maxItems:4
tagStyle文本样式否TagStylemaxItems:2

TagStyle

主信息标签样式定义

成员名称描述是否必选类型取值范围
type标签类型否stringEnum:
[GRADE, TIME, DURATION, EPISODE, HOT, NEWEST, VIP, RECOMMEND, CUSTOM, NONE]

style

标签样式,默认为1,type为CUSTOM时该参数有效否

string

Enum:
[1, 2]
color项目符号颜色色值定义否stringEnum:
[ColorPrimary, ColorSecondary, ColorTeriary, ColorPrimaryInverse, ColorSecondaryInverse, ColorTertiaryInverse, ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]

PriceInfo

标签展示文本

成员名称描述是否必选类型取值范围
price标签文本信息否PricemaxItems:4

Price

辅助文本定义

成员名称描述是否必选类型取值范围
price

当前价格

否number($float)/

originalPrice

原价格否

number($float)

/
priceUnit价格单位否stringEnum:
Array [1]

Imageinfo

成员名称描述是否必选类型取值范围
imageInfoList

图片列表支持传递1:1、3:2、3:4等多种比例图片

否ImageItem/

functionTag

功能标签内容否

string

maxLength:32
functionTagImgUrl功能标签图片下载地址否stringmaxLength:256
operatorTag运营标签内容否stringmaxLength:32

ImageItem

图片内容信息

成员名称描述是否必选类型取值范围
scale

图片比例,默认1:1

否stringEnum:
[OneToOne, OneToOneCircle, ThreeToTwo, ThreeToFour, FiveToSeven, SixteenToNine]

url

图片下载地址否

string

maxLength:256

2.3 宫格型模板

ImageGridTemplate

  1. {
  2.  "type": "ImageGridTemplate",
  3.  "content": {
  4.    "title": "string",
  5.    "moreInfoLink": {
  6.      "webURL": "string",
  7.      "deepLink": {
  8.        "url": "string",
  9.        "appName": "string",
  10.        "appPackage": "string",
  11.        "minVersion": 0,
  12.        "minAndroidAPILevel": 0
  13.      },
  14.      "quickApp": {
  15.        "url": "string",
  16.        "minPlatformVersion": 0,
  17.        "minVersion": 0
  18.      },
  19.      "silentLink": {
  20.        "url": "string",
  21.        "appName": "string",
  22.        "appPackage": "string",
  23.        "appBrief": "string",
  24.        "appIconUrl": "string"
  25.      },
  26.      "buttonImageURL": "string",
  27.      "buttonText": "string"
  28.    },
  29.    "gridContent": [
  30.      {
  31.        "contentId": "string",
  32.        "primaryInfo": {
  33.          "primaryText": {
  34.            "text": "string",
  35.            "highlightText": [
  36.              "string"
  37.            ],
  38.            "highlightColor": "ColorAccent"
  39.          },
  40.          "tagText": "string",
  41.          "tagStyle": {
  42.            "type": "GRADE",
  43.            "style": 1,
  44.            "color": "ColorPrimary"
  45.          }
  46.        },
  47.        "extendContent": [
  48.          "string"
  49.        ],
  50.        "speakContent": "string",
  51.        "auxiliaryInfo": [
  52.          {
  53.            "auxiliaryText": [
  54.              {
  55.                "text": "string",
  56.                "bulletsUrl": "string",
  57.                "highlightText": [
  58.                  "string"
  59.                ],
  60.                "highlightColor": "ColorAccent",
  61.                "subTitle": "string"
  62.              }
  63.            ]
  64.          },
  65.          {
  66.            "score": 0,
  67.            "tagText": [
  68.              "string"
  69.            ],
  70.            "tagStyle": [
  71.              {
  72.                "type": "GRADE",
  73.                "style": 1,
  74.                "color": "ColorPrimary"
  75.              }
  76.            ]
  77.          },
  78.          {
  79.            "price": [
  80.              {
  81.                "price": 0,
  82.                "originalPrice": 0,
  83.                "priceUnit": "CNY"
  84.              }
  85.            ]
  86.          }
  87.        ],
  88.        "imageInfo": {
  89.          "imageInfoList": [
  90.            {
  91.              "scale": "OneToOne",
  92.              "url": "string"
  93.            }
  94.          ],
  95.          "functionTag": {
  96.            "type": "GRADE",
  97.            "functionTag": "string",
  98.            "style": 1,
  99.            "color": "ColorPrimary",
  100.            "imageUrl": "string"
  101.          },
  102.          "operatorTag": {
  103.            "type": "HOT",
  104.            "operatorTag": "string",
  105.            "style": 1,
  106.            "color": "ColorPrimary"
  107.          }
  108.        },
  109.        "detailUrl": {
  110.          "webURL": "string",
  111.          "deepLink": {
  112.            "url": "string",
  113.            "appName": "string",
  114.            "appPackage": "string",
  115.            "minVersion": 0,
  116.            "minAndroidAPILevel": 0
  117.          },
  118.          "quickApp": {
  119.            "url": "string",
  120.            "minPlatformVersion": 0,
  121.            "minVersion": 0
  122.          },
  123.          "faLink": {
  124.            "packageName": "string",
  125.            "serviceName": "string",
  126.            "startParams": "string",
  127.            "minVersion": 0,
  128.            "minApiVersion": 0
  129.          },
  130.          "silentLink": {
  131.            "url": "string",
  132.            "appName": "string",
  133.            "appPackage": "string",
  134.            "appBrief": "string",
  135.            "appIconUrl": "string"
  136.          }
  137.        }
  138.      }
  139.    ],
  140.    "dataSource": {
  141.      "dataSource": "string",
  142.      "updateTime": "string",
  143.      "statement": "string",
  144.      "tagText": "string",
  145.      "tagStyle": {
  146.        "type": "GRADE",
  147.        "style": 1,
  148.        "color": "ColorPrimary"
  149.      }
  150.    }
  151.  }
  152. }

ImageGridTemplatRsp

宫格卡片响应消息定义

成员名称描述是否必选类型取值范围
Type卡片模板类型否stringEnum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
content主信息定义否

ImageGridContentInfo

/

ImageGridContentInfo

主信息定义

成员名称描述是否必选类型取值范围
title宫格卡片标题否/maxLength:64

moreInfoLink

/否

ButtonInteraction

/
gridContent/
否ImageGridContentItemmaxItems:12
dataSource
否DataSourceInfo

ImageGridContentItem

主信息定义

成员名称描述是否必选类型取值范围
contentId内容ID否stringmaxLength:64

primaryInfo

/否

GridPrimaryText

/
extendContent本条记录支持的语音交互的其它说法。否string

maxItems:50

maxLength:128]

speakContent如果卡片支持语音交互,则卡片会在用户点击选定的内容时将该字段通过语音助手在原始语句中提交给CP 如 "第1个",否string
maxLength:128
auxiliaryInfo卡片辅助信息内容否AuxiliaryTextInfo, TagTextInfo, PriceInfomaxItems:4
imageInfo/否GridImageInfo/
detailUrl/
否
Interaction/

GridPrimaryText

主信息定义

成员名称描述是否必选类型取值范围
primaryText主信息定义否PrimaryText,/

tagText

主信息标签展示文本否

string

maxLength:32

GridImageInfo

宫格型卡片图片内容信息

成员名称描述是否必选类型取值范围

imageInfoList

图片列表支持传递1:1、3:2、3:4等多种比例图片否

ImageItem

/
functionTag//GridFunctionTag/
operatorTag//GridOperatorTag/

ImageItem

图片内容信息

成员名称描述是否必选类型取值范围

scale

图片比例,默认1:1否

string

Enum:
[OneToOne, OneToOneCircle, ThreeToTwo, ThreeToFour, FiveToSeven, SixteenToNine]
url图片下载地址/stringmaxLength:256

GridFunctionTag

宫格型卡片功能标签定义

成员名称描述是否必选类型取值范围
type标签类型否stringEnum:
[GRADE, TIME, DURATION, EPISODE, CUSTOM]

functionTag

功能标签内容否

string

maxLength:32
style标签样式否string

Enum:
[1, 2]

color项目符号颜色色值定义否string
Enum:
[ColorPrimary, ColorSecondary, ColorTeriary, ColorPrimaryInverse, ColorSecondaryInverse, ColorTertiaryInverse, ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]
imageUrl标签签名的图片下载地址,标签为自定义标签时该参数有效否stringmaxLength:256

GridOperatorTag    

宫格型卡片运营标签定义

成员名称描述是否必选类型取值范围
type标签类型否stringEnum:
[HOT, NEWEST, VIP, RECOMMEND, CUSTOM]

operatorTag

功能标签内容否

string

maxLength:32
style标签样式否string

Enum:
[1, 2]

color项目符号颜色色值定义否string
Enum:
[ColorPrimary, ColorSecondary, ColorTeriary, ColorPrimaryInverse, ColorSecondaryInverse, ColorTertiaryInverse, ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]

2.4 列表型模板

ListTemplate

  1. {
  2.  "type": "ListTemplate",
  3.  "content": {
  4.    "title": "string",
  5.    "listContent": [
  6.      {
  7.        "primaryInfo": {
  8.          "primaryText": {
  9.            "text": "string",
  10.            "highlightText": [
  11.              "string"
  12.            ],
  13.            "highlightColor": "ColorAccent"
  14.          },
  15.          "tagText": "string",
  16.          "tagStyle": {
  17.            "type": "GRADE",
  18.            "style": 1,
  19.            "color": "ColorPrimary"
  20.          }
  21.        },
  22.        "extendContent": [
  23.          "string"
  24.        ],
  25.        "speakContent": "string",
  26.        "auxiliaryInfo": [
  27.          {
  28.            "auxiliaryText": [
  29.              {
  30.                "text": "string",
  31.                "bulletsUrl": "string",
  32.                "highlightText": [
  33.                  "string"
  34.                ],
  35.                "highlightColor": "ColorAccent",
  36.                "subTitle": "string"
  37.              }
  38.            ]
  39.          },
  40.          {
  41.            "score": 0,
  42.            "tagText": [
  43.              "string"
  44.            ],
  45.            "tagStyle": [
  46.              {
  47.                "type": "GRADE",
  48.                "style": 1,
  49.                "color": "ColorPrimary"
  50.              }
  51.            ]
  52.          },
  53.          {
  54.            "price": [
  55.              {
  56.                "price": 0,
  57.                "originalPrice": 0,
  58.                "priceUnit": "CNY"
  59.              }
  60.            ]
  61.          }
  62.        ],
  63.        "imageInfo": {
  64.          "imageInfoList": [
  65.            {
  66.              "scale": "OneToOne",
  67.              "url": "string"
  68.            }
  69.          ],
  70.          "functionTag": {
  71.            "type": "GRADE",
  72.            "functionTag": "string",
  73.            "style": 1,
  74.            "color": "ColorPrimary",
  75.            "imageUrl": "string"
  76.          },
  77.          "operatorTag": {
  78.            "type": "HOT",
  79.            "operatorTag": "string",
  80.            "style": 1,
  81.            "color": "ColorPrimary"
  82.          }
  83.        },
  84.        "detailUrl": {
  85.          "webURL": "string",
  86.          "deepLink": {
  87.            "url": "string",
  88.            "appName": "string",
  89.            "appPackage": "string",
  90.            "minVersion": 0,
  91.            "minAndroidAPILevel": 0
  92.          },
  93.          "quickApp": {
  94.            "url": "string",
  95.            "minPlatformVersion": 0,
  96.            "minVersion": 0
  97.          },
  98.          "faLink": {
  99.            "packageName": "string",
  100.            "serviceName": "string",
  101.            "startParams": "string",
  102.            "minVersion": 0,
  103.            "minApiVersion": 0
  104.          },
  105.          "silentLink": {
  106.            "url": "string",
  107.            "appName": "string",
  108.            "appPackage": "string",
  109.            "appBrief": "string",
  110.            "appIconUrl": "string"
  111.          }
  112.        },
  113.        "operateIconInfo": [
  114.          {
  115.            "type": "JUMP",
  116.            "buttonName": "string",
  117.            "operParameters": {
  118.              "webURL": "string",
  119.              "deepLink": {
  120.                "url": "string",
  121.                "appName": "string",
  122.                "appPackage": "string",
  123.                "minVersion": 0,
  124.                "minAndroidAPILevel": 0
  125.              },
  126.              "quickApp": {
  127.                "url": "string",
  128.                "minPlatformVersion": 0,
  129.                "minVersion": 0
  130.              },
  131.              "faLink": {
  132.                "packageName": "string",
  133.                "serviceName": "string",
  134.                "startParams": "string",
  135.                "minVersion": 0,
  136.                "minApiVersion": 0
  137.              },
  138.              "silentLink": {
  139.                "url": "string",
  140.                "appName": "string",
  141.                "appPackage": "string",
  142.                "appBrief": "string",
  143.                "appIconUrl": "string"
  144.              }
  145.            },
  146.            "iconUrl": "string"
  147.          }
  148.        ],
  149.        "dataSourceInfo": {
  150.          "dataSource": "string",
  151.          "updateTime": "string",
  152.          "statement": "string",
  153.          "tagText": "string",
  154.          "tagStyle": {
  155.            "type": "GRADE",
  156.            "style": 1,
  157.            "color": "ColorPrimary"
  158.          }
  159.        }
  160.      }
  161.    ],
  162.    "dataSource": {
  163.      "dataSource": "string",
  164.      "updateTime": "string",
  165.      "statement": "string",
  166.      "tagText": "string",
  167.      "tagStyle": {
  168.        "type": "GRADE",
  169.        "style": 1,
  170.        "color": "ColorPrimary"
  171.      }
  172.    }
  173.  }
  174.  "pagination": {
  175.    "next": "string",
  176.    "total": 0
  177.  }
  178. }

  179. }

ListTemplateRsp

列表卡片响应消息定义

成员名称描述是否必选类型取值范围
type卡片模板类型否stringEnum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]

content

列表卡片主信息定义否

ListContentInfo

/
pagination响应体中的分页结构,携带后续查询的分页信息否PaginationRsp

Enum:
[1, 2]

ListContentInfo

列表卡片主信息定义

成员名称描述是否必选类型取值范围
title列表卡片标题否stringmaxLength:64

listContent

列表卡片主信息定义否

ListContentItem

maxItems:50

dataSource

列表型卡片数据来源内容信息否DataSourceInfo

/

PaginationRsp

响应体中的分页结构,携带后续查询的分页信息

成员名称描述是否必选类型取值范围
next下一条分页,不携带时没有更多的数据否stringmaxLength:16

total*

所有的数据条目数(不分页)否

/

minimum:0

ListContentItem

列表卡片主信息定义

成员名称描述是否必选类型取值范围
primaryInfo主信息定义否GridPrimaryText/
extendContent本条记录支持的语音交互的其它说法否string

maxItems:50

maxLength:128

speakContent如果卡片支持语音交互,则卡片会在用户点击选定的内容时将该字段通过语音助手在原始语句中提交给CP 如 "第1个"否stringmaxLength:128

auxiliaryInfo

卡片辅助信息内容否

AuxiliaryTextInfo, TagTextInfo, PriceInfo

/
ImageInfo图片内容信息否Imageinfo
detailUrl点击整个卡片需要实际跳转的H5链接,要求为https地址否InteractionmaxLength:512
operateIconInfo操作图标信息内容否OperateIconInfomaxItems:2

dataSourceInfo

列表型卡片数据来源内容信息否DataSourceInfo

/

OperateIconInfo

列表型卡片操作图标内容信息

成员名称描述是否必选类型取值范围
type操作图标操作类型否string
Enum:
[JUMP]
buttonName类型为按钮时的按钮名称文字信息否string

maxLength:32

operParameters/
否Interaction/

iconUrl

操作图标图片下载地址否

string

maxLength:256

2.5 拼接型模板

combinedTemplate

  1. {
  2.  "type": "combinedTemplate",
  3.  "contentItems": [
  4.    {
  5.      "type": "combinedTemplate",
  6.      "content": {
  7.        "primaryInfo": {
  8.          "primaryText": {
  9.            "text": "string",
  10.            "highlightText": [
  11.              "string"
  12.            ],
  13.            "highlightColor": "ColorAccent"
  14.          },
  15.          "primaryNumericalList": [
  16.            {
  17.              "numerical": "string",
  18.              "highlightNumerical": "string",
  19.              "highlightColor": "ColorAccent"
  20.            }
  21.          ],
  22.          "tagText": "string"
  23.        },
  24.        "auxiliaryInfo": [
  25.          {
  26.            "auxiliaryText": [
  27.              {
  28.                "text": "string",
  29.                "bulletsUrl": "string",
  30.                "highlightText": [
  31.                  "string"
  32.                ],
  33.                "highlightColor": "ColorAccent",
  34.                "subTitle": "string"
  35.              }
  36.            ]
  37.          },
  38.          {
  39.            "score": 0,
  40.            "tagText": [
  41.              "string"
  42.            ],
  43.            "tagStyle": [
  44.              {
  45.                "type": "GRADE",
  46.                "style": 1,
  47.                "color": "ColorPrimary"
  48.              }
  49.            ]
  50.          },
  51.          {
  52.            "price": [
  53.              {
  54.                "price": 0,
  55.                "originalPrice": 0,
  56.                "priceUnit": "CNY"
  57.              }
  58.            ]
  59.          }
  60.        ],
  61.        "detailUrl": {
  62.          "webURL": "string",
  63.          "deepLink": {
  64.            "url": "string",
  65.            "appName": "string",
  66.            "appPackage": "string",
  67.            "minVersion": 0,
  68.            "minAndroidAPILevel": 0
  69.          },
  70.          "quickApp": {
  71.            "url": "string",
  72.            "minPlatformVersion": 0,
  73.            "minVersion": 0
  74.          },
  75.          "faLink": {
  76.            "packageName": "string",
  77.            "serviceName": "string",
  78.            "startParams": "string",
  79.            "minVersion": 0,
  80.            "minApiVersion": 0
  81.          },
  82.          "silentLink": {
  83.            "url": "string",
  84.            "appName": "string",
  85.            "appPackage": "string",
  86.            "appBrief": "string",
  87.            "appIconUrl": "string"
  88.          }
  89.        },
  90.        "dataSource": {
  91.          "dataSource": "string",
  92.          "updateTime": "string",
  93.          "statement": "string",
  94.          "tagText": "string",
  95.          "tagStyle": {
  96.            "type": "GRADE",
  97.            "style": 1,
  98.            "color": "ColorPrimary"
  99.          }
  100.        }
  101.      }
  102.    },
  103.    {
  104.      "type": "BasicTextTemplate",
  105.      "content": {
  106.        "primaryInfo": {
  107.          "primaryText": {
  108.            "text": "string",
  109.            "highlightText": [
  110.              "string"
  111.            ],
  112.            "highlightColor": "ColorAccent"
  113.          },
  114.          "primaryNumericalList": [
  115.            {
  116.              "numerical": "string",
  117.              "highlightNumerical": "string",
  118.              "highlightColor": "ColorAccent"
  119.            }
  120.          ],
  121.          "tagText": "string"
  122.        },
  123.        "auxiliaryInfo": [
  124.          {
  125.            "auxiliaryText": [
  126.              {
  127.                "text": "string",
  128.                "bulletsUrl": "string",
  129.                "highlightText": [
  130.                  "string"
  131.                ],
  132.                "highlightColor": "ColorAccent",
  133.                "subTitle": "string"
  134.              }
  135.            ]
  136.          },
  137.          {
  138.            "score": 0,
  139.            "tagText": [
  140.              "string"
  141.            ],
  142.            "tagStyle": [
  143.              {
  144.                "type": "GRADE",
  145.                "style": 1,
  146.                "color": "ColorPrimary"
  147.              }
  148.            ]
  149.          },
  150.          {
  151.            "price": [
  152.              {
  153.                "price": 0,
  154.                "originalPrice": 0,
  155.                "priceUnit": "CNY"
  156.              }
  157.            ]
  158.          }
  159.        ],
  160.        "imageInfo": {
  161.          "imageInfoList": [
  162.            {
  163.              "scale": "OneToOne",
  164.              "url": "string"
  165.            }
  166.          ],
  167.          "functionTag": "string",
  168.          "functionTagImgUrl": "string",
  169.          "operatorTag": "string"
  170.        },
  171.        "detailUrl": {
  172.          "webURL": "string",
  173.          "deepLink": {
  174.            "url": "string",
  175.            "appName": "string",
  176.            "appPackage": "string",
  177.            "minVersion": 0,
  178.            "minAndroidAPILevel": 0
  179.          },
  180.          "quickApp": {
  181.            "url": "string",
  182.            "minPlatformVersion": 0,
  183.            "minVersion": 0
  184.          },
  185.          "faLink": {
  186.            "packageName": "string",
  187.            "serviceName": "string",
  188.            "startParams": "string",
  189.            "minVersion": 0,
  190.            "minApiVersion": 0
  191.          },
  192.          "silentLink": {
  193.            "url": "string",
  194.            "appName": "string",
  195.            "appPackage": "string",
  196.            "appBrief": "string",
  197.            "appIconUrl": "string"
  198.          }
  199.        },
  200.        "dataSource": {
  201.          "dataSource": "string",
  202.          "updateTime": "string",
  203.          "statement": "string",
  204.          "tagText": "string",
  205.          "tagStyle": {
  206.            "type": "GRADE",
  207.            "style": 1,
  208.            "color": "ColorPrimary"
  209.          }
  210.        }
  211.      }
  212.    },
  213.    {
  214.      "type": "BasicTextTemplate",
  215.      "content": {
  216.        "title": "string",
  217.        "moreInfoLink": {
  218.          "webURL": "string",
  219.          "deepLink": {
  220.            "url": "string",
  221.            "appName": "string",
  222.            "appPackage": "string",
  223.            "minVersion": 0,
  224.            "minAndroidAPILevel": 0
  225.          },
  226.          "quickApp": {
  227.            "url": "string",
  228.            "minPlatformVersion": 0,
  229.            "minVersion": 0
  230.          },
  231.          "silentLink": {
  232.            "url": "string",
  233.            "appName": "string",
  234.            "appPackage": "string",
  235.            "appBrief": "string",
  236.            "appIconUrl": "string"
  237.          },
  238.          "buttonImageURL": "string",
  239.          "buttonText": "string"
  240.        },
  241.        "gridContent": [
  242.          {
  243.            "contentId": "string",
  244.            "primaryInfo": {
  245.              "primaryText": {
  246.                "text": "string",
  247.                "highlightText": [
  248.                  "string"
  249.                ],
  250.                "highlightColor": "ColorAccent"
  251.              },
  252.              "tagText": "string",
  253.              "tagStyle": {
  254.                "type": "GRADE",
  255.                "style": 1,
  256.                "color": "ColorPrimary"
  257.              }
  258.            },
  259.            "extendContent": [
  260.              "string"
  261.            ],
  262.            "speakContent": "string",
  263.            "auxiliaryInfo": [
  264.              {
  265.                "auxiliaryText": [
  266.                  {
  267.                    "text": "string",
  268.                    "bulletsUrl": "string",
  269.                    "highlightText": [
  270.                      "string"
  271.                    ],
  272.                    "highlightColor": "ColorAccent",
  273.                    "subTitle": "string"
  274.                  }
  275.                ]
  276.              },
  277.              {
  278.                "score": 0,
  279.                "tagText": [
  280.                  "string"
  281.                ],
  282.                "tagStyle": [
  283.                  {
  284.                    "type": "GRADE",
  285.                    "style": 1,
  286.                    "color": "ColorPrimary"
  287.                  }
  288.                ]
  289.              },
  290.              {
  291.                "price": [
  292.                  {
  293.                    "price": 0,
  294.                    "originalPrice": 0,
  295.                    "priceUnit": "CNY"
  296.                  }
  297.                ]
  298.              }
  299.            ],
  300.            "imageInfo": {
  301.              "imageInfoList": [
  302.                {
  303.                  "scale": "OneToOne",
  304.                  "url": "string"
  305.                }
  306.              ],
  307.              "functionTag": {
  308.                "type": "GRADE",
  309.                "functionTag": "string",
  310.                "style": 1,
  311.                "color": "ColorPrimary",
  312.                "imageUrl": "string"
  313.              },
  314.              "operatorTag": {
  315.                "type": "HOT",
  316.                "operatorTag": "string",
  317.                "style": 1,
  318.                "color": "ColorPrimary"
  319.              }
  320.            },
  321.            "detailUrl": {
  322.              "webURL": "string",
  323.              "deepLink": {
  324.                "url": "string",
  325.                "appName": "string",
  326.                "appPackage": "string",
  327.                "minVersion": 0,
  328.                "minAndroidAPILevel": 0
  329.              },
  330.              "quickApp": {
  331.                "url": "string",
  332.                "minPlatformVersion": 0,
  333.                "minVersion": 0
  334.              },
  335.              "faLink": {
  336.                "packageName": "string",
  337.                "serviceName": "string",
  338.                "startParams": "string",
  339.                "minVersion": 0,
  340.                "minApiVersion": 0
  341.              },
  342.              "silentLink": {
  343.                "url": "string",
  344.                "appName": "string",
  345.                "appPackage": "string",
  346.                "appBrief": "string",
  347.                "appIconUrl": "string"
  348.              }
  349.            }
  350.          }
  351.        ],
  352.        "dataSource": {
  353.          "dataSource": "string",
  354.          "updateTime": "string",
  355.          "statement": "string",
  356.          "tagText": "string",
  357.          "tagStyle": {
  358.            "type": "GRADE",
  359.            "style": 1,
  360.            "color": "ColorPrimary"
  361.          }
  362.        }
  363.      }
  364.    }
  365.  ]

CombinedTemplateRsp

拼接通用模板内容定义

成员名称描述是否必选类型取值范围
type卡片模板类型否stringEnum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
contentItems拼接卡片模板内容信息否TextTemplatContentRsp,  ImageDetailTemplatContentRsp, ImageGridTemplatContentRspmaxItems:2

TextTemplatContentRsp

纯文本卡片内容信息

成员名称描述是否必选类型取值范围
type卡片模板类型否string
Enum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
content主信息定义否TextContentInfo

/

ImageDetailTemplatContentRsp

主信息定义

成员名称描述是否必选类型取值范围
type卡片模板类型否string
Enum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
content主信息定义否ImageDetailContentInfo

/

ImageGridTemplatContentRsp

宫格卡片响应消息定义

成员名称描述是否必选类型取值范围
type卡片模板类型否string
Enum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
content主信息定义否ImageGridContentInfo

/

2.6 沉浸大图卡片模板

FullImageTemplate

  1. {
  2.  "type": "FullImageTemplate",
  3.  "content": [
  4.    {
  5.      "primaryInfo": {
  6.        "primaryText": {
  7.          "text": "string",
  8.          "highlightText": [
  9.            "string"
  10.          ],
  11.          "highlightColor": "ColorAccent"
  12.        },
  13.        "tagText": "string"
  14.      },
  15.      "auxiliaryInfo": {
  16.        "text": "string",
  17.        "highlightText": [
  18.          "string"
  19.        ],
  20.        "highlightColor": "ColorAccent",
  21.        "bulletsUrl": "string"
  22.      },
  23.      "imageInfo": {
  24.        "url": "string"
  25.      },
  26.      "detailUrl": {
  27.        "webURL": "string",
  28.        "deepLink": {
  29.          "url": "string",
  30.          "appName": "string",
  31.          "appPackage": "string",
  32.          "minVersion": 0,
  33.          "minAndroidAPILevel": 0
  34.        },
  35.        "quickApp": {
  36.          "url": "string",
  37.          "minPlatformVersion": 0,
  38.          "minVersion": 0
  39.        },
  40.        "faLink": {
  41.          "packageName": "string",
  42.          "serviceName": "string",
  43.          "startParams": "string",
  44.          "minVersion": 0,
  45.          "minApiVersion": 0
  46.        },
  47.        "silentLink": {
  48.          "url": "string",
  49.          "appName": "string",
  50.          "appPackage": "string",
  51.          "appBrief": "string",
  52.          "appIconUrl": "string"
  53.        }
  54.      }
  55.    }
  56.  ]

FullImageTemplateRsp

沉浸式大图模板响应消息定义

成员名称描述是否必选类型取值范围
type卡片模板类型否stringEnum:
[BasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate]
content卡片内容信息否FullImageContentInfomaxItems:3

FullImageContentInfo

沉浸式大图模板内容信息定义

成员名称描述是否必选类型取值范围
primaryInfo主信息定义否FullPrimaryInfo/

auxiliaryInfo

卡片辅助信息内容否

FullAuxiliaryText

/
ImageInfo图片内容信息否FullImageInfo/
detailUrl点击整个卡片需要实际跳转的H5链接,要求为https地址否InteractionmaxLength:512

FullPrimaryInfo

沉浸式大图模板主信息定义

成员名称描述是否必选类型取值范围
primaryText/否primaryText/

tagText

标签展示文本否

string

maxLength:32

FullAuxiliaryText

沉浸式大图卡片辅助文本定义

成员名称描述是否必选类型取值范围
text辅助文本信息否stringmaxLength: 64

highlightText

高亮信息颜色色值定义否

HighlightColor

Enum:
[ColorAccent, Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9]
bulletsUrl辅助信息项目符号图标Url否stringmaxLength:256

FullImageInfo

沉浸式大图模板图片内容信息

成员名称描述是否必选类型取值范围
url图片下载地址否stringmaxLength: 256

3. 公共结构

结构

CpSkuIdDef

商品id

类型取值范围

string
               

最大长度:32,正则Pattern:[a-zA-Z0-9\-\_]
               

3.1 Interaction

成员名称描述是否必选类型取值范围
webURL点击整个卡片需要实际跳转的H5链接,要求为https地址。否string最大长度:512
deepLink对原生App的跳转否NativeAppLinkInteraction            /
quickApp对快应用的扩展否QuickAppLinkInteraction            /
SilentLinkInteraction对H5链接可静默下载的扩展否
SilentLinkInteraction/

3.2 NativeAppLinkInteraction

对原生App的跳转:

成员名称描述是否必选类型取值范围
urlApp的deeplink地址是string最大长度:512
appNameApp名称是string最大长度:256
appPackageApp包名是string最大长度:256
minVersion支持的APP的最小版本号VersionCode是long/
minAndroidAPILevel所需android最小API Level是long/

3.3 QuickAppLinkInteraction

对快应用的扩展:

成员名称描述是否必选类型取值范围
url快应用的deeplink地址是string最大长度:512
minPlatformVersion所需快应用引擎最小版本号是long/
minVersion支持的快应用的最小版本号VersionCode是long/

3.4 ButtonInteraction

按钮跳转交互:

成员名称描述是否必选类型取值范围
webURL点击整个卡片需要实际跳转的H5链接,要求为https地址。否string最大长度:512
deepLink对原生App的跳转否NativeAppLinkInteraction            /
quickApp对快应用的扩展否QuickAppLinkInteraction            /
buttonImageURLbuttonLinkArray场景下使用,超链接/按钮文本对应的图片展示。要求为https地址。否string最大长度:512
buttonTextbuttonLinkArray场景下使用,超链接/按钮文本内容。否string最大长度:64

3.5 Image

单个图片信息:

成员名称描述是否必选类型取值范围
url图片URL,要求为https格式。是string最大长度:512
widthPixels图片宽度(像素)是long最小值:1,最大值:16384
heightPixels图片高度(像素)是long最小值:1,最大值:16384

3.6 ImageInfo

图片信息,至少提供一张图。

成员名称描述是否必选类型取值范围
small小图否Image            /
medium中图否Image            /
large大图否Image            /

3.7 DateFormatString

日期格式,yyyy-HH-dd。

类型取值范围
string正则Pattern:[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}

3.8 DateTimeSecondFormatString

时间格式,yyyyMMddHHmmss。

类型取值范围
string正则Pattern:[0-9]{14}

3.9 PaginationReq

请求体中的分页结构,携带分页查询条件。

成员名称描述是否必选类型            取值范围
limit分页大小限制否long最小值: 0
start分页起始下标。不携带时表示从第一条开始查询。否string最大长度: 16

3.10 PaginationRsp

响应体中的分页结构,携带后续查询的分页信息。

成员名称描述是否必选类型取值范围
next下一条分页,不携带时没有更多的数据。否string最大长度: 16
total            所有的数据条目数(不分页)            是long            最小值: 0

3.11 Location

地理位置信息:

成员名称描述是否必选类型取值范围
locationSystem定位数据坐标系统,取值为:BD09LL(百度球面坐标)、GCJ02(国测局加密坐标)、WGS84(GPS设备获取的坐标)是string枚举值: BD09LL,GCJ02,WGS84
latitude纬度,ddd.dddddd 【度 . 度 格式】的十进制小数部分(6位)是string最大长度:10
longitude经度,ddd.dddddd 【度 . 度 格式】的十进制小数部分(6位)是string最大长度:10
           
poild位置ID否string最大长度:32

3.12 DeepLinkInteraction

DeepLink跳转结构体

成员名称描述是否必选类型取值范围
appLinkTypeapplink类型,0 APP;1 快应用;2 H5,端侧解析优先级顺序为APP>快应用>H5            是int枚举值:  0,1,2
linkUrl卡片跳转的路径,参数拼装在URL里。是string最大长度:512
appNameApp名称,最大长度256字节。跳转类型为H5时可空。是string最大长度:256
iconAPPLink的图标的资源地址,语音助手场景下留空。否string最大长度:512
briefAPPLink的简介概述,语音助手场景下留空。否string最大长度:512
appPackageApp包名,最大长度256字节。跳转类型为H5时可空。否string最大长度:256
minVersion支持的APP最小版本号。跳转类型为H5时可空。否long            /
minAndroidAPILevel所需android最小API Level。跳转类型为APP时必填。否long/
minPlatformVersion所需快应用引擎最小版本号。跳转类型为快应用时必填。否long/

3.13 SilentLinkInteraction

对H5链接可静默下载的扩展

成员名称描述是否必选类型取值范围
urlH5链接,要求为https地址是string

最大长度:512

appNameApp名称是string最大长度:256
appPackageApp包名是string最大长度:256
appBriefApp简要描述,用于下载界面的展示是string

最大长度:512

appIconUrlApp图标,用于下载界面的展示是string

最大长度:512

3.14 TextTemplatRsp

主信息定义

成员名称描述是否必选类型取值范围
Type卡片模板类型否stringBasicTextTemplate, BasicImageDetailTemplate, ImageGridTemplate, ShortcutGridTemplate, FullImageTemplate, ListTemplate, CombinedTemplate
content主信息定义否

TextContentInfo


/
style主信息定义否TextStyleInfo

最大长度:64