Child pages
  • Manage2 API Functions - Service Credit
Skip to end of metadata
Go to start of metadata

Description

This function returns the Manage2 account's service credit status.

Examples 


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLserviceCredit.cgi?liscid=123456
JSON
https://manage2.cpanel.net/XMLserviceCredit.cgi?liscid=123456&output=json
YAML
https://manage2.cpanel.net/XMLserviceCredit.cgi?liscid=123456&output=yaml
 cPanel Licensing PHP Class
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("barney@example.com", "12345luggage");
$ret = $cpl->addServiceCredit(array(
    "liscid" => "1234"
));
?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $cpl = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage');
my $result = $licenseManager->addServiceCredit(
    'liscid' => '1234'
);
 Output (JSON)
{
  "reason": "OK",
  "results": [
	{
     "license_id": "12345",
     "status": "approved",
     "status_reason": "Successfully applied service credit"
  	}
  ]
  "status": 1
}
 Output (XML)
<XMLserviceCredit reason="OK" status="1">
  <results license_id="12345" status="approved" status_reason="Successfully applied service credit" />
</XMLserviceCredit>
 Output (YAML)
---
reason: OK
results:
 -
  license_id: 12345
  status: approved
  status_reason: Successfully applied service credit
status: 1

Parameters

ParameterTypeDescriptionPossible valuesExample
liscidinteger

Required.

The license ID number.

Note:

To list multiple licenses, enter this parameter multiple times,
e.g. ?liscid=1&liscid=2.

A valid license ID. 

12345

Returns

ReturnTypeDescriptionPossible valuesExample
resultsarray of hashesAn array of unnamed hashes.This array includes the license_id, status, and status_reason returns.

hashA hash of the license ID's and their status.This hash includes the license_id, status, and status_reason returns.
 license_idintegerThe license ID number.A valid license ID.

12345

 statusstring

The license ID's service credit status.

Note:

The reason field in the metadata will return OK even when the status is denied. This will change when future iterations of the XMLserviceCredit.cgi API accepts multiple licenses in the parameters.

  • approved

  • denied
denied
 status_reasonstring

The reason why the status return is denied or approved.

  • license_id not found in last invoice.
  • license_id refers to a legacy license.
  • An adjustment has already been granted for this license_id.
  • Adjustment would put license over cpanel revenue percentage limit.
  • Successfully applied service credit.
  • license_id must refer to an inactive license.

license_id not found in last invoice.