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.

Remove a single use access URL

Remove a single use URL for a campaign.
Base URL
POST: https://api4coupons.com/v3/singleuse/remove
Parameters
# Parameter Input Description
1 client_id API client ID Can be found in your API documentation
Required
2 client_secret API client secret Can be found in your API documentation
Required
3 campaign The unique ID from the campaign Can be found in the list of all campaigns.
Required
4 singleusecode The unique single use code
Required
<?php
	$ch = curl_init();
	$url = "https://api4coupons.com/v3/singleuse/remove";
	$client_id = "XXX"; // Your API client ID (required)
	$client_secret = "YYY"; // Your API client secret (required)
	$data = [
		'campaign' => "cam_123456",
		'couponsession' => "ac6s7u3g8a25ja7x9qg87"
	];
	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"
			},
			"campaign": "cam_12345",
			"action": "single_use_code_removed",
			"single_use_code": "mmt5hvx0uvs8ise44nsxk"
		}
		
Possible errors
  • 200: Missing parameter: campaign
  • 301: Invalid character in parameter: campaign.
  • 502: Campaign ID not found.
  • 513: Single use code not found.

  • Regístrate ahora para una cuenta de prueba por 7 días

    ¡Empieza a usar Coupontools hoy!

¡Genial, estás aquí! ¿Cookies? Lee nuestrasPolíticas de Privacidad. Yo acepto
x