/openserver/wxaapi/newtmpl/gettemplate
Property | Type | Required | Description |
access_token | string | True | Access token |
Property | Type | Description |
errmsg | string | Error message. |
errcode | int32 | Error code. |
data | array<object> | Template list. |
data.priTmplId | string | Template ID. |
data.title | string | Title. |
data.content | string | Content. |
data.example | string | Example. |
data.type | string | Type. |
data.keywordEnumValueList | array<object> | Enumeration list. |
data.keywordEnumValueList.keywordCode | string | Enumeration name. |
data.keywordEnumValueList.enumValueList | array<string> | Enumeration values. |
{"data": [{"content": "testtest400:{{phrase1.DATA}}\\ntesttest401:{{phrase2.DATA}}","example": "testtest400:testtest400\\ntesttest401:testtest401","keywordEnumValueList": [{"enumValueList": ["To be paid","Wait for delivery","Has been shipped","Completed","Canceled"],"keywordCode": "enum.DATA"}],"priTmplId": "mti_oAWECeEacUIdYvUxSbJBNbkOIfzJHEcJIRSEMAE","title": "testtest400","type": 3},{"content": "Order Number:{{thing1.DATA}}\\nOrder type:{{thing2.DATA}}\\nOrder Time:{{date.DATA}}\\nOrder status:{{phrase.DATA}}","example": "Order Number:100020241130100001\\nOrder type:Personal order\\nOrder Time:2024/11/30 11:19:00\\nOrder status:Pending shipment","keywordEnumValueList": [{"enumValueList": ["To be paid","Wait for delivery","Has been shipped","Completed","Canceled"],"keywordCode": "enum.DATA"}],"priTmplId": "mti_AgKglmMmSMbFVXBpaFunPSIoDGddPKSFGbSAYRe","title": "Received order notification","type": 2}],"errcode": 0,"errmsg": "ok","requestId": "19d63f1109f24857961de213bcfc7e75"}
/openserver/cgi-bin/message/subscribe/send
Property | Type. | Required | Description |
access_token | string | True | Access token for the API call. This parameter should be in the URL, not in the body. |
template_id | string | True | The ID of the subscription template to be sent. |
page | string | False | The page to navigate to when the template card is clicked. This must be a page within the mini program. Parameters can be included (e.g. index?foo=bar). If not provided, the template will not have a navigation link. |
touser | string | True | The OpenID of the recipient (user). |
data | string | True | Template content. |
miniprogram_state | string | True | The type of mini program to navigate to: developer for the development version, trial for the Preview, formal for the official version. Defaults to the official version. |
lang | string | True | Language types viewed in the mini program. Supported values are zh_CN (Simplified Chinese) and en_US (English). |
Property | Type. | Description |
errcode | number | Error code. |
errmsg | string | Error message. |
{"errcode":0,"errmsg":"ok"}
Parameter | Category | Parameter value limitations | Description |
thing.DATA | Thing | Up to 20 characters | It can be a combination of numbers, letters, or symbols. |
number.DATA | Number | Up to 32 numbers | Only numbers are allowed, and decimals are supported. |
letter.DATA | Letter | Up to 32 letters | Only letters are allowed. |
symbol.DATA | Symbol | Up to 5 symbols | Only symbols are allowed. |
character_string.DATA | String | Up to 32 characters | It can be a combination of numbers, letters, or symbols. |
time.DATA | Time | 24-hour time format (supports year, month, day) | For example: 15:01, or 15:01 on October 1, 2019. |
date.DATA | Date | Year, month, and date (supports 24-hour time format) | For example: October 1, 2019, or 15:01 on October 1, 2019. |
amount.DATA | Amount | 1 currency symbol plus numbers with up to 10 numbers, and decimals are supported | Decimals are supported. |
phone_number.DATA | Phone number | Up to 17 characters. Numbers and symbols are allowed. | Phone number. For example, +86-188xxxxxx68. |
car_number.DATA | Car plate | Up to 12 characters | Car plate number |
name.DATA | Name | Up to 20 characters | Name. |
phrase.DATA | Description | Up to 16 characters | Status description. For example: In delivery. |
enum.DATA | Enumeration values | Only field values within the enumeration values are allowed. | Enumeration type. |
Name: {{name01.DATA}}Amount: {{amount01.DATA}}Itinerary: {{thing01.DATA}}Date: {{date01.DATA}}
{"touser": "OPENID","template_id": "TEMPLATE_ID","page": "index","data": {"name01": {"value": "XX"},"amount01": {"value": "$100"},"thing01": {"value": "Guangzhou to Beijing"},"date01": {"value": "2018-01-01"}}}
Was this page helpful?