Child pages
  • Manage2 API Functions - Reactivate Expired Licenses
Skip to end of metadata
Go to start of metadata

Description


This function reactivates an account's expired cPanel license.

Examples 


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLlicenseReActivate.cgi?liscid=12345
JSON
https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=json&liscid=12345
YAML
https://manage2.cpanel.net/XMLlicenseReActivate.cgi?output=yaml&liscid=12345
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com", "12345luggage");
$license = $cpl->reactivateLicense(array(
	"liscd"  => "12345",
	"force"  => "0",
	"dryrun" => "1",
	)
);
?>

 

 

 cPanel Licensing Perl Module
use cPanelLicensing;
my $cpl = new cPanelLicensing('user' => barney\@example.com", 'pass' => "12345luggage");
my $licenseid = $licenseManager->reactivateLicense(
	'liscid' => '12345',
	'force'  => '0',
	'dryrun' => '1',
);
 Output (JSON)
{
  "monthly_price": "25.00",
  "status": 1,
  "reason": "Reactivated TRAININGSEMINAR-INTERNAL license on 127.0.0.2 in the 'foo' group.",
  "price": "150.00",
  "licenseid": "12345"
}
 Output (XML)
<XMLlicenseReActivate licenseid="12345" monthly_price="25.00" price="150.00" reason="Reactivated TRAININGSEMINAR-INTERNAL license on 127.0.0.2 in the 'foo' group." status="1"/>
 Output (YAML)
--- 
licenseid: '12345'
monthly_price: 25.00
price: 150.00
reason: Reactivated TRAININGSEMINAR-INTERNAL license on 127.0.0.2 in the 'foo' group.
status: 1 

Parameters

ParameterTypeDescriptionPossible valuesExample
liscidstring

Required

The ID of the license to reactivate.

A valid license number.

The List License Information function returns a list of possible values.

127.0.0.1
forceBoolean

Whether to force reactivate the license.

This parameter defaults to 0.

  • 1 — Force reactivate the license.
  • 0 — Do not force reactivate the license.
0
dryrunBoolean

Whether to show error messages and price information, but not reactivate the license.

This parameter defaults to 1.

  • 1 — Show error messages and price information, but do not reactivate the license.
  • 0 — Reactivate the license.
0

Returns

ReturnTypeDescriptionPossible valuesExample
licenseidintegerThe reactivated license's ID.The license's ID number.12345
monthly_pricenumericThe monthly amount of a license.A numeric value that measures the price, in US Dollars..25.00
pricenumeric

The amount of a license.

A numeric value that measures the price, in US Dollars.150.00
reasonstring

Information about the license activation.

A string value.Reactivated TRAININGSEMINAR-INTERNAL license on 127.0.0.2 in the 'foo' group.
statusBooleanWhether the function succeeded.
  • 1 — Success.

  • 0 — Failure.
1