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.

Update a subaccount

Update a subaccount by passing the package ID
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 subaccount Subaccount ID Example: sub_123456
4 package Package ID Can be found on the package page in your dashboard. Example: pac_XXX
	$ch = curl_init();
	$url = "";
	$client_id = "XXX"; // Your API client ID (required)
	$client_secret = "YYY"; // Your API client secret (required)
	$data = [
		'subaccount' => "sub_1234",
		'package' => "pac_123456"
	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 success response
			"status": {
				"status": "OK"
			"subaccount": {
				"ID": "sub_123456",
				"status": "updated",
Possible errors
  • 200: Missing parameter: subaccount
  • 200: Missing parameter: package
  • 510: Subaccount ID not correct.

  • 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