Coupon Code Templates
Coupon Code Templates are only available while using Cloud API.
Coupon code templates are marketing templates that display a single copy code button. When tapped, the code is copied to the customer's clipboard.
Limitations
Coupon code templates are currently not supported by the WhatsApp web client.
Codes are limited to 15 characters.
Button text cannot be customized.
Templates are limited to one copy code button.
Template Creation
Use the create template endpoint to create coupon code templates
POST
https://waba-v2.360dialog.io/v1/configs/templates
Headers
Name | Type | Description |
---|---|---|
D360-API-KEY | string |
Post Body
Properties
Placeholder | Description | Example Value |
---|---|---|
String | Required. Template name. Maximum 512 characters. |
|
Enum | Required. Template language and locale code. |
|
String | Required. Coupon code to be copied when tapped. Maximum 15 characters. |
|
Example Request
Example Response
Sending Coupon Templates
Use the Cloud API to send approved coupon code templates in template messages
POST
https://waba-v2.360dialog.io/messages
Request Body
Name | Type | Description |
---|---|---|
to | string | Recipient wa_id |
type | string | Message type |
language | string | Template language |
policy | string | Delivery policy |
code | string | Language code |
name | string | Template name |
messaging_product | string | Required only for Cloud API.
Messaging service used for the request. Use |
index | integer | Required. Indicates order in which button should appear, if the template uses multiple buttons. Buttons are zero-indexed, so setting value to |
cupon_code | string | Required. The coupon code to be copied when the customer taps the button. |
Upon success, the API will respond with the following:
It is only possible to send Templates with an Active status. A message template's status can change automatically from Active to Paused or Disabled based on feedback from customers. For this reason, we recommend that you monitor status changes to take appropriate actions whenever a message template that you rely upon becomes, or is in danger of becoming, paused or disabled.
Properties
Placeholder | Description | Example Value |
---|---|---|
String | Required. The WhatsApp ID or phone number of the customer to send the message to. |
|
String | Required. Name of the template to be sent. |
|
String | Required. The template's language and locale code. |
|
Integer | Required. Indicates order in which button should appear, if the template uses multiple buttons. Buttons are zero-indexed, so setting value to |
|
String | Required.
The coupon code to be copied when the customer taps the button. |
|
Post Body Example
Example Request
Example Response
Last updated