Directory

List directories

Retrieve a list of all directories.

GET https://api.coupontools.com/v4/directory

Authentication:

API Keys

Example

Loading...

Response

Loading...

Get directory

Retrieve directory information by ID.

GET https://api.coupontools.com/v4/directory/{id}

Authentication:

API Keys

Example

Loading...

Response

Loading...

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 Keys

Example

Loading...

Response

Loading...

Get user

Get a directory user by ID.

GET https://api.coupontools.com/v4/directory/{id}/users/{userId}

Authentication:

API Keys

Example

Loading...

Response

Loading...

Create user

Create a directory user.

POST https://api.coupontools.com/v4/directory/{id}/users

Authentication:

API Keys

Parameters

Required email Email address
 
Optional password Password
If not defined, we'll generate a random password
Optional first_name First name
 
Optional last_name Last name
 
Optional phone Phone
 
Optional birth_date Date (format: yyyy-MM-dd)
Birth date
Optional address Address
 
Optional zip Zip
 
Optional city City
 
Optional custom_1 - custom_3 String
Custom 1 through custom 3

Example

Loading...

Response

Loading...

Update user

Update a directory user. Currently only supports block.

POST https://api.coupontools.com/v4/directory/{id}/users/{userId}

Authentication:

API Keys

Parameters

Optional block true | false
(un)block users to (dis)allow access to directory

Example

Loading...

Response

Loading...

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 Keys

Parameters

Optional expires_at Date (format: 'yyyy-MM-dd HH:mm:ss)
UTC date when the paid access expires in 'yyyy-MM-dd HH:mm:ss' format.

Example

Loading...

Response

Loading...

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 Keys

Example

Loading...

Response

Loading...

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 Keys

Example

Loading...

Response

Loading...

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 Keys

Parameters

Required receiver Email address
Email address of receiver
Optional sender Email address
Email address of sender. By default we'll use noreply@yourwhitelabeldomain.com
Optional type text | html
text: Plain text body
html: HTML body (automatically parsed before sending)
Optional subject String
Subject of email
Optional body String
Body of email. Set 'type' parameter to 'html' to pass HTML body. Body is automatically parsed before sending.
Optional button_text String
Text on button. By default button_text is set to 'View deals'

Example

Loading...

Response

Loading...

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 Keys

Parameters

Required receiver Phone number
Phone number of receiver. International E.164 notation
Optional body String
Body of SMS. The directory URL will be added to the back of the message

Example

Loading...

Response

Loading...