Template Request API

Below is the Sample Template Request API Request & Response for requesting new WhatsApp Templates.

To use this API your project must be enabled with WhatsApp Business Account.

Request URL

Method : POST

Requesting Templates

https://pickyassist.com/app/api/v2/template-request

Fetching Template Statuss

https://pickyassist.com/app/api/v2/template-status

Sample Request - Text Template

{
"token":"782a357a2c11f54b83fd1a017f05eb6794",
"name":"order_confirmation",
"message_type":1,
"category":2,
"messages":[
{
"message":"Your order {{1}} for a total of {{2}} is confirmed. The expected delivery is {{3}}.",
"language":"en"
}
]
}

Sample Response

You need to save the "template_id" and should be used when sending WhatsApp Template Messages

{
"template_id":"XY6479",
"template_status":1,
"status":100,
"message":"Success"
}

Sample Request - Text Templates with Multiple Languages

{
"token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
"name":"welcome",
"message_type":1,
"category":10,
"messages":[
{
"message":"Hello {{1}}, Welcome to Pickyassist",
"language":"en"
},
{
"message":"Bonjour {{1}}, Bienvenue chez Pickyassist",
"language":"fr"
}
]
}

Sample Media Template Request - Image

{
"token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
"name":"welcome_message",
"message_type":2,
"category":10,
"footer":"test footer",
"messages":[
{
"message":"Hello {{1}}, Welcome to Pickyassist",
"language":"en"
}
]
}

Sample Media Template Request - Document

{
"token":"782a357a2c87687a11f54b83fd1a017f05eb6794",
"name":"welcome_message",
"message_type":2,
"category":10,
"header":"ADMISSION Details",
"footer":"test footer",
"messages":[
{
"message":"Hello {{1}}, Please read the guidelines",
"language":"en"
}
]
}

Sample Request - WhatsApp Interactive Button - Quick Replies with Text Message

Please mind the template button posistion , the button will be shown to the user as per the order its requested.

Once the template is approves it's not possible to change the order to button text.

{
"token": "{{token}}",
"name": "TEMPLATE-NAME",
"message_type": 2,
"category": 4,
"messages": [
{
"message": "Hello {{1}}\\n\\nYour appointment for {{2}} with {{3}} is {{4}} on {{5}} Please confirm by clicking the below button\\n\\nThanks\\n{{6}}",
"language": "en",
"buttons": [
{
"type": 1,
"text": "Confirm"
},
{
"type": 1,
"text": "Cancel"
},
{
"type": 1,
"text": "Not Sure"
}
]
}
]
}
โ€‹

Template API Request - Interactive Buttons URL & Phone Number

โ€‹

{
"token": "{{token}}",
"name": "delivery_out_button",
"message_type": 1,
"category": 4,
"messages": [
{
"message": "Hello {{1}}\n\nYour order {{2}} is out for delivery.",
"language": "en",
"buttons": [
{
"type": 2,
"text": "Track Package ",
"url": "https://bridgerbot.com/app/api/wa/buttons/{{1}}}"
},
{
"type": 3,
"text": "Call Support",
"phone_number": "+13026445173"
}
]
}
]
}
โ€‹

Template API Request - Interactive Buttons - URL

Must have {{1}} at the end of the URL like https://pickyassist.com/t/{{1}}

Only one dynamic variable is allowed and its should be at the end of the URL

Not possbile to change the URL once its approved

{
"token": "{{token}}",
"name": "order_shipped_button",
"message_type": 2,
"category": 4,
"messages": [
{
"message": "Hello {{1}}\n\nYour order {{2}} has been shipped through {{3}} on {{4}} and tracking number is {{5}}.\n\nThanks\n{{6}}",
"language": "en",
"buttons": [
{
"type": 2,
"text": "Track Order",
"url": "https://pickyassist.com/t/{{1}]"
}
]
}
]
}
โ€‹

Sample Request - Add New Language

You can add new language to an existing template by passing the template id along with new language contents, please note there is no option to edit an existing template.

{
"token": "768b6b220c702c77225236",
"template_id": "PV10560",
"message": "Ciao {{1}}, \n\nIl tuo ordine {{2}} รจ stato annullato {{3}}\n\nGrazie\n{{4}}",
"language": "it"
}

Sample Response

{
"status":100,"message":"Success"
}

Sample Request