Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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: BASIC AUTH

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:

  • image

  • video

  • document

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
}

  • No labels