GetTemplates
To get a list of template associated with a business phone.
Request Parameters
Name | Type | Description | Required |
---|---|---|---|
Action | string | Value: GetTemplates. | YES |
AccountId | int | Account Id. | YES |
BusinessPhone | string | Phone number of template. | YES |
Name | string | Template name. | NO |
Limit | int | Limit size of each search. | NO |
After | string | Pagination mark. | NO |
Before | string | Pagination mark. | NO |
Request Example
{
"Action": "GetTemplates",
"AccountId": 8899,
"BusinessPhone": "8615xxxx79987",
"Name":"ceshi",
"Limit":2,
"After":"MAZDZD"
}
Response Parameters
Name | Type | Description |
---|---|---|
Action | string | GetTemplatesResponse. |
RetCode | int | 0 for success Error Codes. |
Message | string | Message. |
RequestId | string | Request Id. |
Data | object | Return data. |
Data Parameters
Name | Type | Description |
---|---|---|
Data | []template | Template list. |
Paging | object | Paging info. |
Paging Parameters
Name | Type | Description |
---|---|---|
Cursor | object | Pagination mark. |
Next | string | Next page. If it is not empty, you can turn the page forwards. |
Prev | string | Prev page. If it is not empty, you can turn the page backwards. |
Cursor Parameters
Name | Type | Description |
---|---|---|
After | string | Paging cursor(Next Page). |
Before | string | Paging cursor(Prev Page). |
template Parameters
Name | Type | Description |
---|---|---|
ID | string | Template Id. |
Name | string | Template Name. |
Category | string | Category |
Language | string | Template Language. |
Status | string | Status |
RejectedReason | string | Template Rejected Reason. |
QualityScore | object | Template Quality Score. |
Tags | []string | Template Tags. |
Components | []component | Template Components. |
QualityScore Parameters
Name | Type | Description |
---|---|---|
Score | string | Quality Score |
component Parameters
Refer to Components
Response Example
{
"Action": "GetTemplatesResponse",
"Data": {
"Data": [
{
"Category": "AUTHENTICATION",
"Components": [
{
"Example": {
"BodyText": [
[
"1313"
]
]
},
"Text": "Hi, your verification code is {{1}}, Please do not share the information with others",
"Type": "BODY"
}
],
"ID": "92962xxxx754",
"Language": "en",
"Name": "ceshiyanzhengma",
"QualityScore": {
"Score": "UNKNOWN"
},
"Tags": [
"TEST_TAG"
],
"RejectedReason": "INVALID_FORMAT",
"Status": "REJECTED"
},
{
"Category": "UTILITY",
"Components": [
{
"Example": {
"HeaderHandle": [
"https://scontent.whatsapp.net/v/t61.29466-34/339053090_782169319941265_6515992918508567612_n.png?ccb=1-7&_nc_sid=57045b&_nc_ohc=kqoiquC7lvYAX_nBRL_&_nc_ht=scontent.whatsapp.net&edm=AH51TzQEAAAA&oh=01_AdQ6WI1_lWevNio26xXchMxcIv8aeVoF1UD9cTVdXtkkuw&oe=646FF3F7"
]
},
"Format": "IMAGE",
"Type": "HEADER"
},
{
"Text": "TEST TEMPLATE",
"Type": "BODY"
},
{
"Buttons": [
{
"Text": "LINK",
"Type": "URL",
"URL": "http://uspeedo.com/"
}
],
"Type": "BUTTONS"
}
],
"ID": "782xxxx607932",
"Language": "af",
"Name": "ceshi",
"Tags": null,
"QualityScore": {
"Score": "UNKNOWN"
},
"RejectedReason": "INCORRECT_CATEGORY",
"Status": "REJECTED"
}
],
"Paging": {
"Cursors": {
"After": "MgZDZD",
"Before": "MQZDZD"
},
"Next": "",
"Previous": ""
}
},
"Message": "",
"RequestId": "d71eb04c-7475-4f06-8be4-96cea6041545",
"RetCode": 0
}