Loyalty
List loyalty cards
Retrieve a list of all loyalty cards.
POST
https://api.coupontools.com/v3/loyalty/list
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
only_active | true/false | When set to true, only campaigns marked as 'active' will be returned. | Optional |
Example
Response
Get loyalty card
Retrieve loyalty card information by ID.
POST
https://api.coupontools.com/v3/loyalty/info
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
loyaltycard | Loyalty card ID | Can be found in the list of all loyalty cards | Required |
Example
Response
Possible errors
Loyalty users
Create user
Create a loyalty card user.
POST
https://api.coupontools.com/v3/loyaltyusers/create
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
Email address | Required | ||
password | Password | Required | |
phone | Phone number | Optional | |
first_Name | First name | Optional | |
last_Name | Last name | Optional | |
gender | Gender | Optional | |
birthday | Birthday | YYYY-MM-DD | Optional |
city | City | Optional |
Example
Response
Possible errors
Link user
Link a user to a loyalty card.
POST
https://api.coupontools.com/v3/loyaltyusers/link
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
loyaltycard | Loyalty card ID | Can be found in the list of all loyalty cards | Required |
user | Loyalty card user ID | Can be found in the list of all loyalty cards users or with the search function | Required |
Example
Response
Possible errors
List users
Retrieve a list of all users for a loyalty card.
POST
https://api.coupontools.com/v3/loyaltyusers/list
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
loyaltycard | Loyalty card ID | Can be found in the list of all loyalty cards | Required |
Example
Response
Possible errors
Search users
Find a user based on first name, last name, email, phone or ID.
POST
https://api.coupontools.com/v3/loyaltyusers/search
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
loyaltycard | Loyalty card ID | Can be found in the list of all loyalty cards | Required |
search | Search field | Minimum 3 characters needed in the search field. (Allowed characters: AZaZ09-_@) | Required |
Example
Response
Possible errors
Update points
Update the points for a loyalty user
POST
https://api.coupontools.com/v3/loyaltyusers/update
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
loyaltycard | Loyalty card ID | Can be found in the list of all loyalty cards | Required |
user | Loyalty card user ID | Can be found in the list of all loyalty cards users or with the search function | Required |
action | add_points add_stamps remove_points remove_stamps | Required | |
amount | Amount of points/stamps | Only integers allowed | Required |
merchantid | Merchant/location ID | Can be found in the list of all loyalty cards. | Optional |
Example
Response
Possible errors
Distribution
Send loyalty card by email
You need to have an email marketing platform connected to be able to send out marketing emails (check out: integrations -> email marketing).
POST
https://api.coupontools.com/v3/send/email
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
campaign | Loyalty card ID (loy_XXXXX) | Can be found in the list of all loyalty cards | Required |
Email address receiving loyalty card | Required | ||
subject | Subject of email | Optional |
Example
Response
Possible errors
Send loyalty card by text message
You need to have an SMS marketing platform connected to be able to send out SMS messages (check out: integrations -> SMS marketing).
E.164 phone number format:
First of all, in the international E.164 notation, a leading '0' is removed.
The UK mobile phone number '07911 123456' in international format is '+44 7911 123456', so without the leading zero.
Secondly, in the E.164 notation, all spaces, dashes ['-'] and parentheses [ '(' and ')'] are removed, besides the leading '+', all characters should be numeric.
Example: +447911123456
POST
https://api.coupontools.com/v3/send/sms
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
campaign | Loyalty ID (loy_XXXXX) | Can be found in the list of all directories | Required |
phone | Phone number receiving loyalty | International E.164 notation | Required |
body | SMS body text | The loyalty URL will be added to each message | Optional |
Example
Response
Possible errors
Notification
Send push notification
Send push notification to all users of a loyalty card. This requires the card to be added in the mobile wallet.
POST
https://api.coupontools.com/v3/loyalty/pushnotification/list
Authentication:
API KeysParameters
Parameter | Input | ||
---|---|---|---|
loyaltycard | Loyalty card ID (loy_XXXXXX) | Can be found in the list of all loyalty cards | Required |
message | Push notification message | Required |