API & Webhooks
Connect the Coupontools platform with your apps or web projects. The Coupontools REST API allows you to query meta-data about your account, campaigns, distribution, validations, and usage data.
-
Subaccount
- Retrieve a list of subaccounts
- Retrieve info of a subaccount
- Create a subaccount
- Update a subaccount
- Create password reset url for subaccount
- Single sign on for subaccounts
-
Campaign
- Retrieve a list of your campaigns
- Retrieve information from a campaign
- Retrieve all usage data from a campaign
- Retrieve all data from one coupon session
- Update data from a coupon session
- Update data from multiple coupon sessions
- Search coupon session
- Search coupon session from a campaign
- Send single push notification
- Send push notification to all
-
Loyalty Card
- Retrieve a list of your loyalty cards
- Retrieve a list of users from a loyalty card
- Update loyalty card user
- Send single push notification
- Send push notification to all
-
Directory
- Retrieve a list of your directories
- Retrieve information from a directory
- Retrieve all campaigns from a directory
- Retrieve registered users from a directory
- Update directory user payment status
- Retrieve a list of categories
- Retrieve a list of 3rd level categories
-
Single Use
- Create a single use access URL
- Create multiple single use access URLs
- Remove a single use access URL
Authentication
Your API Keys (POST values)
client_id: | Login to your account to get your API keys |
client_secret: | Login to your account to get your API keys |
Your API Keys (Authentication headers)
X-Client-Id: | Login to your account to get your API keys |
X-Client-Secret: | Login to your account to get your API keys |
How to authenticate?
The API client and secret must be sent along with each API request, by providing it in the HTTP call's Authorization header or adding the client_id and client_secret parameters to the POST values.Example response with succesful authentication
{ "status": { "status": "OK" } }
Example response with failed authentication
{ "status": { "status": "failed", "errors": { "error_code": 1000, "error_message": "HTTP/1.0 401 Unauthorized. Client ID or Secret not correct." } } }