Directory
List directories
Retrieve a list of all directories.
GET
https://api.coupontools.com/v4/directory
Authentication:
API KeysExample
Response
Get directory
Retrieve directory information by ID.
GET
https://api.coupontools.com/v4/directory/{id}
Authentication:
API KeysExample
Response
Directory users
List users
Retrieve a list of all registered users for a directory.
GET
https://api.coupontools.com/v4/directory/{id}/users
Authentication:
API KeysExample
Response
Get user
Get a directory user by ID.
GET
https://api.coupontools.com/v4/directory/{id}/users/{userId}
Authentication:
API KeysExample
Response
Create user
Create a directory user.
POST
https://api.coupontools.com/v4/directory/{id}/users
Authentication:
API KeysParameters
If not defined, we'll generate a random password
Birth date
Custom 1 through custom 3
Example
Response
Update user
Update a directory user. Currently only supports block.
POST
https://api.coupontools.com/v4/directory/{id}/users/{userId}
Authentication:
API KeysParameters
(un)block users to (dis)allow access to directory
Example
Response
Give paid access
Give a directory user access to all paid content of a directory.
POST
https://api.coupontools.com/v4/directory/{id}/users/{userId}/access
Authentication:
API KeysParameters
UTC date when the paid access expires in 'yyyy-MM-dd HH:mm:ss' format.
Example
Response
Revoke paid access
Take away a directory user's access to paid content of a directory.
DELETE
https://api.coupontools.com/v4/directory/{id}/users/{userId}/access
Authentication:
API KeysExample
Response
Create single sign-on
Creates a single-use single sign-on token. When passing the token in the url, the browser will automatically sign in as the requested user. The token will only be valid once.
POST
https://api.coupontools.com/v4/directory/{id}/users/{userId}/sso
Authentication:
API KeysExample
Response
Distribution
Send directory by email
Distribute your directory through email. Sending emails requires a positive email balance/credit (check out: integrations -> email marketing).
POST
https://api.coupontools.com/v4/directory/{id}/send/email
Authentication:
API KeysParameters
Email address of receiver
Email address of sender. By default we'll use noreply@yourwhitelabeldomain.com
text: Plain text body html: HTML body (automatically parsed before sending)
Subject of email
Body of email. Set 'type' parameter to 'html' to pass HTML body. Body is automatically parsed before sending.
Text on button. By default button_text is set to 'View deals'
Example
Response
Send directory 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/v4/directory/{id}/send/sms
Authentication:
API KeysParameters
Phone number of receiver. International E.164 notation
Body of SMS. The directory URL will be added to the back of the message