Coupontools Logo

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.

Retrieve a list of your loyalty cards

Returns a list of all your loyalty cards.
Base URL
# Parameter Input Description
1 client_id API client ID Can be found in your API documentation
2 client_secret API client secret Can be found in your API documentation
3 only_active true/false When set to true, only campaigns marked as 'active' will be returned.
4 sorting asc/desc Default is sorted by createdate ascending.
	$ch = curl_init();
	$url = "";
	$client_id = "XXX"; // Your API client ID (required)
	$client_secret = "YYY"; // Your API client secret (required)
	$data = [
	curl_setopt($ch, CURLOPT_URL, "$url");
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_VERBOSE, true);
	curl_setopt($ch, CURLOPT_HTTPHEADER, [
		"X-Client-Id: $client_id",
		"X-Client-Secret: $client_secret",
		"Content-Type: application/json",
	curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
	$response = curl_exec($ch);
Example response
			"status": {
				"status": "OK"
			"amount_of_loyaltycards": "1",
			"loyaltycards": [
					"ID": "loy_123456",
					"code": "abc123",
					"url": "",
					"status": "active",
					"name": "Your loyalty card",
					"type": "stampcard",
					"amount_of_stamps": "8",
					"title": "Title here",
					"description": "Description text",
					"terms_title": "Terms & Conditions",
					"terms_text": "Terms here",
					"logo": "",
					"front_image": "",
					"back_image": "",
					"previewimage": "",
					"last_updated": "2018-06-20 14:43:16 UTC",
					"has_locations": "true",
					"amount_of_locations": "1",
					"locations": [
							"ID": "lloc_123456",
							"company_name": "Test location",
							"company_street": "Wall street 1",
							"company_zip": "10000",
							"company_city": "New York",
							"company_state": "New York",
							"company_country": "United States",
							"company_email": "",
							"company_phone": "+123456789",
							"company_website": "",
							"company_hours": "24/7",
							"company_lat": "31.072166",
							"company_long": "25.752893",
							"online": "1",
							"company_password": "1234"

Register now for a 7-days trial account

Start using Coupontools today!

Great you're here! Cookies? Read our Privacy Policy. I accept