sendExternalTemplateMessageToCtlivesocial
Sends a template message to a whatsapp customer.
HTTP POST /livechat/:domain/sendExternalTemplateMessageToCtlivesocial
Path Variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | NO | STRING | Unique domain identifier |
Authorization: see Authentication mechanisms
Request Body:
Type: JSON
Name | Mandatory | Type | Description |
---|---|---|---|
customerPhoneNumber | YES | STRING | customer phone number |
servicePhoneNumber | YES | STRING | whatsapp business number |
templateName | YES | STRING | template name |
language | YES | STRING | template language |
header | YES | object | template header (null if there is no header or no multimedia header). See table below for details. |
headerData | YES | array | array of strings representing the header parameters. (pass empty array in case there are no parameters) |
bodyData | YES | array | array of strings representing the body parameters. (pass empty array in case there are no parameters) |
dynamicUrl | YES | array | array of string representing the url parameter. (pass empty array in case there is no url parameter) |
Header object:
Name | Mandatory | Type | Description |
---|---|---|---|
type | YES | STRING | header type. Can assume one of the following values:
|
data | YES | STRING | base64 string |
documentType | YES | STRING | document extension |
fileName | YES | STRING | file name (extension included) |
Response:
Type: JSON
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
Example:
Request
http://<hostname>:<port>/livechat/default/sendExternalTemplateMessageToCtlivesocial
Request body
{
"customerPhoneNumber": "393403603062",
"servicePhoneNumber": "3902124122690",
"templateName": "shipping_confirmation",
"language":"en_GB",
"header": null,
"headerData": ["Griffin"],
"bodyData": ["5"],
"dynamicUrl": ["contact-highway/"]
}
Response
{
"result": true,
"error": null
}
Â