Skip to main content

GetTemplates

To get a list of template associated with a business phone.

Request Parameters

NameTypeDescriptionRequired
ActionstringValue: GetTemplates.YES
AccountIdintAccount Id.YES
BusinessPhonestringPhone number of template.YES
NamestringTemplate name.NO
LimitintLimit size of each search.NO
AfterstringPagination mark.NO
BeforestringPagination mark.NO

Request Example

{
"Action": "GetTemplates",
"AccountId": 8899,
"BusinessPhone": "8615xxxx79987",
"Name":"ceshi",
"Limit":2,
"After":"MAZDZD"
}

Response Parameters

NameTypeDescription
ActionstringGetTemplatesResponse.
RetCodeint0 for success Error Codes.
MessagestringMessage.
RequestIdstringRequest Id.
DataobjectReturn data.

Data Parameters

NameTypeDescription
Data[]templateTemplate list.
PagingobjectPaging info.

Paging Parameters

NameTypeDescription
CursorobjectPagination mark.
NextstringNext page. If it is not empty, you can turn the page forwards.
PrevstringPrev page. If it is not empty, you can turn the page backwards.

Cursor Parameters

NameTypeDescription
AfterstringPaging cursor(Next Page).
BeforestringPaging cursor(Prev Page).

template Parameters

NameTypeDescription
IDstringTemplate Id.
NamestringTemplate Name.
CategorystringCategory
LanguagestringTemplate Language.
StatusstringStatus
RejectedReasonstringTemplate Rejected Reason.
QualityScoreobjectTemplate Quality Score.
Tags[]stringTemplate Tags.
Components[]componentTemplate Components.

QualityScore Parameters

NameTypeDescription
ScorestringQuality 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
}