- Created by Documentation, last modified on Nov 26, 2019
Description
This function returns the raw data of a license's billing data.
Examples
https://manage2.cpanel.net/XMLinvoice.cgi?date=2019-11&output=xml
https://manage2.cpanel.net/XMLinvoice.cgi?id=1494276&output=json
https://manage2.cpanel.net/XMLinvoice.cgi?date=2019-11&output=yaml
Note:
You cannot call this function with cPanel Licensing.
Note:
You cannot call this function with cPanel Licensing.
{ "status": 1, "reason": "OK", "results": { "company_id": "2221", "date": 1568423996, "company_name": "Example Private", "subtotal": 1665.5, "discount": 0.75, "licenses": [ { "ip": "192.0.2.102", "subtotal": "11.00", "package_id": "11997", "discount": "0.00", "taxed": 0, "total": "11.00", "host": "epws.example.net", "package": "INTERNAL-VPS", "bulk_charge": 0, "id": "22307167", "product": "cPanel\/WHM", "accounts": 1, "auto_scaled": null }, { "ip": "192.0.2.102", "subtotal": "32.00", "package_id": "11993", "discount": "0.00", "taxed": 0, "total": "32.00", "host": "krazyfunfilms.example.net", "package": "INTERNAL", "bulk_charge": 0, "id": "31422437", "product": "cPanel\/WHM", "accounts": 5, "auto_scaled": null }, { "ip": "192.0.2.102", "subtotal": "32.00", "package_id": "11993", "discount": "0.00", "taxed": 0, "total": "32.00", "host": "netleon-new-us.example.net", "package": "INTERNAL", "bulk_charge": 0, "id": "46860987", "product": "cPanel\/WHM", "accounts": 62, "auto_scaled": null }, { "ip": "192.0.2.102", "subtotal": "11.00", "package_id": "11997", "discount": "0.00", "taxed": 0, "total": "11.00", "host": "linuxindia2.example.com", "package": "INTERNAL-VPS", "bulk_charge": 0, "id": "22306655", "product": "cPanel\/WHM", "accounts": 98, "auto_scaled": null } ], "sales_tax": null, "total": 1664.75, "previous_date": 1568410735, "due_date": 1569719996, "bulk_charge": 0, "id": "1494276", "snapshot": 1 } }
<?xml version="1.0"?> <XMLinvoice reason="OK" status="1"> <results id="1510641" bulk_charge="0" company_id="3541" company_name="EXAMPLE PRIVATE" date="1573861224" discount="0" due_date="1575157224" previous_date="1571181736" sales_tax="" snapshot="1" subtotal="231.3" total="231.3"> <licenses id="51867429" accounts="245" auto_scaled="" bulk_charge="0" discount="0.0000" host="maxacloud1.example.com" ip="192.0.2.102" package="cPanel Premier Cloud" package_id="21167" product="cPanel/WHM" subtotal="46.5000" taxed="0" total="46.5000"/> <licenses id="51867421" accounts="698" auto_scaled="" bulk_charge="0" discount="0.0000" host="maxacluster1.example.com" ip="192.0.2.102" package="cPanel Premier Metal" package_id="21171" product="cPanel/WHM" subtotal="91.8000" taxed="0" total="91.8000"/> <licenses id="51867437" accounts="160" auto_scaled="" bulk_charge="0" discount="0.0000" host="maxacluster3.example.com" ip="192.0.2.102" package="cPanel Premier Cloud" package_id="21167" product="cPanel/WHM" subtotal="38.0000" taxed="0" total="38.0000"/> <licenses id="51867425" accounts="34" auto_scaled="" bulk_charge="0" discount="0.0000" host="maxacluster4.example.com" ip="192.0.2.102" package="cPanel Plus Cloud" package_id="22081" product="cPanel/WHM" subtotal="25.0000" taxed="0" total="25.0000"/> <licenses id="51867433" accounts="22" auto_scaled="" bulk_charge="0" discount="0.0000" host="mailcloud1.example.com" ip="192.0.2.102" package="cPanel Pro Cloud" package_id="21163" product="cPanel/WHM" subtotal="17.5000" taxed="0" total="17.5000"/> <licenses id="51867441" accounts="3" auto_scaled="" bulk_charge="0" discount="0.0000" host="instance-2.example.internal" ip="192.0.2.102" package="cPanel Admin Cloud" package_id="21159" product="cPanel/WHM" subtotal="12.5000" taxed="0" total="12.5000"/> </results> </XMLinvoice>
--- reason: OK results: bulk_charge: 0 company_id: 3544 company_name: EXAMPLE PRIVATE date: '1573861244' discount: '0' due_date: '1575157244' id: 1510641 licenses: - accounts: 245 auto_scaled: ~ bulk_charge: 0 discount: '0.0000' host: maxacloud1.example.com id: 51867429 ip: 192.0.2.102 package: cPanel Premier Cloud package_id: 21167 product: cPanel/WHM subtotal: '46.5000' taxed: 0 total: '46.5000' - accounts: 698 auto_scaled: ~ bulk_charge: 0 discount: '0.0000' host: maxacluster1.example.com id: 51867421 ip: 192.0.2.102 package: cPanel Premier Metal package_id: 21171 product: cPanel/WHM subtotal: '91.8000' taxed: 0 total: '91.8000' - accounts: 160 auto_scaled: ~ bulk_charge: 0 discount: '0.0000' host: maxacluster3.example.com id: 51867437 ip: 192.0.2.102 package: cPanel Premier Cloud package_id: 21167 product: cPanel/WHM subtotal: '38.0000' taxed: 0 total: '38.0000' - accounts: 34 auto_scaled: ~ bulk_charge: 0 discount: '0.0000' host: maxacluster4.example.com id: 51867425 ip: 192.0.2.102 package: cPanel Plus Cloud package_id: 22081 product: cPanel/WHM subtotal: '25.0000' taxed: 0 total: '25.0000' - accounts: 22 auto_scaled: ~ bulk_charge: 0 discount: '0.0000' host: mailcloud1.example.com id: 51867433 ip: 192.0.2.102 package: cPanel Pro Cloud package_id: 21163 product: cPanel/WHM subtotal: '17.5000' taxed: 0 total: '17.5000' - accounts: 3 auto_scaled: ~ bulk_charge: 0 discount: '0.0000' host: instance-2.example.internal id: 51867441 ip: 192.0.2.102 package: cPanel Admin Cloud package_id: 21159 product: cPanel/WHM subtotal: '12.5000' taxed: 0 total: '12.5000' previous_date: '1571181736' sales_tax: ~ snapshot: 1 subtotal: '231.3' total: '231.3' status: 11
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
id | integer | Required. The license ID for which to return the invoice data. Note: You can specify either the | A valid license ID. | 12345 |
date | string | Required. The billing date for which to return the invoice data. Note: You can specify either the | A valid date in the format | 2019-09 |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
company_id | integer | The company ID of the invoiced licenses. | A valid company ID. | 2221 |
date | integer | The date of the invoice. | A timestamp, in Unix time format. | 1568423996 |
company_name | string | The license's company name. | A string value. | Example Internet |
subtotal | numeric | The cost invoiced before any applicable discounts. | A numeric value. | 1665.5 |
discount | numeric | The discount applied to the invoice. | A numeric value. | 0.75 |
licenses | array | An array that contains an unnamed hash of license information. | One or more unnamed hashes. | |
unnamed hash | hash | A hash that contains license information. | This hash contains the following returns:
| |
accounts | integer | The number of active accounts. The function returns this value in the unnamed hash. | A numeric value. | 30 |
| Boolean | Whether the license is set to an auto-scaled package type. The function returns this value in the unnamed hash. |
| 4 |
| numeric | The amount of the bulk charge for the license. The function returns this value in the unnamed hash. | A numeric value. | 0.00 |
| numeric | The discount applied to the invoice. The function returns this value in the unnamed hash. | A numeric value. | 0.00 |
| string | The license's server's hostname. The function returns this value in the unnamed hash. | A valid domain name. | example.com |
| integer | A license's ID. The function returns this value in the unnamed hash. | A positive integer. | 46860987 |
| string | The license's server's IP address. The function returns this value in the unnamed hash. | A valid IP address. | 192.168.0.20 |
| string | The name of the package on the invoice. The function returns this value in the unnamed hash. | A valid string. | Example-VPS |
| integer | The license's package ID. The function returns this value in the unnamed hash. | A valid package ID. | 761 |
| integer | The product type ID. The function returns this value in the unnamed hash. | A numeric value assigned to a product name:
| 1 |
| integer | The cost invoiced before any applicable discounts. The function returns this value in the unnamed hash. | A numeric value. | 100 |
| Boolean | Whether the license includes tax. The function returns this value in the unnamed hash. |
| 0 |
| integer | The final cost of the license after all taxes and discounts. The function returns this value in the unnamed hash. | A numeric value. |
|
Function information
About the Manage2 API
The Manage2 API automates license management procedures.
Find a function
Related functions
-
Page:Manage2 API Functions - Look Up License ID — This function returns an IP address's license ID.
-
Page:Manage2 API Functions - Change a License IP Address — This function transfers an existing license.
-
Page:Manage2 API Functions - Fetch Risk Data — This function returns an IP address's fraud risk score.
-
Page:Manage2 API Functions - Expire Licenses — This function expires a license.
-
Page:Manage2 API Functions - Extend One-Time Licenses — This function extends one-time licenses for one year.