Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sends a template message to a whatsapp customer.

Status
colourYellow
titleHTTP POST
/livechat/:domain/sendExternalTemplateMessageToCtlivesocial

Path Variables:

Name

Mandatory

Type

Description

domain

Status
titleNO

Status
titleSTRING

Unique domain identifier

Authorization: StatustitleBASIC AUTHsee Authentication mechanisms

Request Body:

Type:
Status
titleJSON

Name

Mandatory

Type

Description

customerPhoneNumber

Status
colourRed
titleYES

Status
titleSTRING

customer phone number

servicePhoneNumber

Status
colourRed
titleYES

Status
titleSTRING

whatsapp business number

templateName

Status
colourRed
titleYES

Status
titleSTRING

template name

language

Status
colourRed
titleYES

Status
titleSTRING

template language

header

Status
colourRed
titleYES

Status
titleobject

template header (null if there is no header or no multimedia header). See table below for details.

headerData

Status
colourRed
titleYES

Status
titlearray

array of strings representing the header parameters. (pass empty array in case there are no parameters)

bodyData

Status
colourRed
titleYES

Status
titlearray

array of strings representing the body parameters. (pass empty array in case there are no parameters)

dynamicUrl

Status
colourRed
titleYES

Status
titlearray

array of string representing the url parameter. (pass empty array in case there is no url parameter)

Header object:

Name

Mandatory

Type

Description

type

Status
colourRed
titleYES

Status
titleSTRING

header type. Can assume one of the following values:

  • image

  • video

  • document

data

Status
colourRed
titleYES

Status
titleSTRING

base64 string

documentType

Status
colourRed
titleYES

Status
titleSTRING

document extension

fileName

Status
colourRed
titleYES

Status
titleSTRING

file name (extension included)

Response:

Type:
Status
titleJSON

Name

Type

Description

result

Status
titleBOOLEAN

If true, the service response was performed correctly

error

Status
titleNULL
/
Status
titleSTRING

Contains the error description if an error has occurred in the request

Example:

Request

http://<hostname>:<port>/livechat/default/sendExternalTemplateMessageToCtlivesocial

...