Manage2 API Function - List Package Information


Last modified: March 6, 2024

Description

This function returns the Manage2 account’s packages.

Examples

Note:
To see the expanded returns, add the expand parameter to the end of each browser-based call.

XML

http://manage2.cpanel.net/XMLpackageInfo.cgi

JSON

http://manage2.cpanel.net/XMLpackageInfo.cgi?output=json

YAML

http://manage2.cpanel.net/XMLpackageInfo.cgi?output=yaml

1
2
3
4
5
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("[email protected]","123456luggage");
$lisc = $cpl->fetchPackages();
?>

1
2
3
use cPanelLicensing;
    my $cpl = new cPanelLicensing(user => 'username\@example.com', pass => '123456luggage');
$cpl->fetchPackages()

Without the expand parameter:

1
2
3
<XMLpackageInfo reason="OK" status="1" version="0.3">
  <packages P2="2-HOUR-DEPLOYMENT" P3="2-DAY-TEST" />
</XMLpackageInfo>

With the expand parameter:

1
2
3
4
<XMLpackageInfo reason="OK" status="1" version="0.3">
  <package name="2-HOUR-DEPLOYMENT" autoscale_target="0" base_price="0.00" bulk_charge="0.00" discountable="0" external="0" host_type="dedicated" is_autoscale="0" max_accounts="" packageid="P2" product_name="cPanel/WHM" producttype="1" term="" term_seconds="7200" trial="1" user_billing_rate="0.00" user_billing_threshold="" valid="1" />
  <package name="2-DAY-TEST" autoscale_target="0" base_price="0.00" bulk_charge="0.00" discountable="0" external="0" host_type="dedicated" is_autoscale="0" max_accounts="" packageid="P3" product_name="cPanel/WHM" producttype="1" term="" term_seconds="172800" trial="1" user_billing_rate="0.00" user_billing_threshold="" valid="1" />
</XMLpackageInfo>

Without the expand parameter:

1
2
3
4
5
6
7
8
9
{
  "packages": [{
    "P2": "2-HOUR-DEPLOYMENT",
    "P3": "2-DAY-TEST"
  }],
  "reason": "OK",
  "status": 1,
  "version": 0.3
}

With the expand parameter:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  "package": [{
      "autoscale_target": 0,
      "base_price": "0.00",
      "bulk_charge": "0.00",
      "discountable": 0,
      "external": 0,
      "host_type": "dedicated",
      "is_autoscale": 0,
      "max_accounts": null,
      "name": "2-HOUR-DEPLOYMENT",
      "packageid": "P2",
      "product_name": "cPanel/WHM",
      "producttype": 1,
      "term": null,
      "term_seconds": 7200,
      "trial": 1,
      "user_billing_rate": "0.00",
      "user_billing_threshold": null,
      "valid": 1
    },
    {
      "autoscale_target": 0,
      "base_price": "0.00",
      "bulk_charge": "0.00",
      "discountable": 0,
      "external": 0,
      "host_type": "dedicated",
      "is_autoscale": 0,
      "max_accounts": null,
      "name": "2-DAY-TEST",
      "packageid": "P3",
      "product_name": "cPanel/WHM",
      "producttype": 1,
      "term": null,
      "term_seconds": 172800,
      "trial": 1,
      "user_billing_rate": "0.00",
      "user_billing_threshold": null,
      "valid": 1
    }
  ],
  "reason": "OK",
  "status": 1,
  "version": 0.3
  }

Without the expand parameter:

1
2
3
4
5
6
7
---
packages:
- P2: 2-HOUR-DEPLOYMENT
  P3: 2-DAY-TEST
reason: OK
status: 1
version: 0.3

With the expand parameter:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
package:
- autoscale_target: 0
  base_price: '0.00'
  bulk_charge: '0.00'
  discountable: 0
  external: 0
  host_type: dedicated
  is_autoscale: 0
  max_accounts: ~
  name: 2-HOUR-DEPLOYMENT
  packageid: P2
  product_name: cPanel/WHM
  producttype: 1
  term: ~
  term_seconds: 7200
  trial: 1
  user_billing_rate: '0.00'
  user_billing_threshold: ~
  valid: 1
- autoscale_target: 0
  base_price: '0.00'
  bulk_charge: '0.00'
  discountable: 0
  external: 0
  host_type: dedicated
  is_autoscale: 0
  max_accounts: ~
  name: 2-DAY-TEST
  packageid: P3
  product_name: cPanel/WHM
  producttype: 1
  term: ~
  term_seconds: 172800
  trial: 1
  user_billing_rate: '0.00'
  user_billing_threshold: ~
  valid: 1
reason: OK
status: 1
version: 0.3

Parameters

This function accepts the following parameters:

Parameter Type Description Example
expand string Display the following additional package information returns:
  • base_price
  • bulk_charge
  • discountable
  • is_autoscale
  • autoscale_target
  • external
  • host_type
  • hsites
    Note:
    The function only returns this value for Sitejet Studio licenses.
  • max_accounts
  • name
  • packageid
  • producttype
  • product_name
  • projects
    Note:
    The function only returns this value for koality licenses.
  • servers
    Note:
    The function only returns this value for 360 Monitoring licenses.
  • sites
    Note:
    The function only returns this value for 360 Monitoring licenses.
  • ssites
    Note:
    The function only returns this value for Sitejet Studio licenses.
  • term
  • term_seconds
  • trial
  • user_billing_rate
  • user_billing_threshold
  • valid
This parameter does not accept values.
expand

Returns

This function’s output changes depending on the use of expand return:

Without the expand parameter

This function returns the following values when you do not call the expand parameter:

Parameter Type Description Example
packages object A list of package IDs and their assigned package. "P2": "2-HOUR-DEPLOYMENT"
reason string Information about the operation. OK
status Boolean Whether the function succeeded:
  • 1 — Success.
  • 0 — Failure.
1
version float Internal information that the Manage2 API uses to identify the version. 0.3

With the expand parameter

This function returns the following values when you call the expand parameter:

Return Type Description Example
package array of objects An array of objects containing each package and its information.
    autoscale_target Boolean Whether the package is an option for licenses with prices that scale with account volume (Auto-Scale):
  • 1 — Package is an option for Auto-Scale.
  • 0 — Package is not an option for Auto-Scale.
The function returns this value in the package object.
1
    base_price numeric The base rate of billing, in US dollars.

The function returns this value in the package object.
17.50
    bulk_charge numeric A non-discountable charge for blocks of additional accounts, in US dollars.

The function returns this value in the package object.
2.00
    discountable Boolean Whether the package qualifies for a discount:
  • 1 — Qualifies.
  • 0 — Does not qualify.
The function returns this value in the package object.
1
    external Boolean Whether the partner’s hardware hosts the package (external).
  • 1 — External.
  • 0 — Not external.
The function returns this value in the package object.
0
    host_type string The host type (virtual or dedicated) the license requires:
  • virtual
  • dedicated
The function returns this value in the package object.
virtual
    hosted_sites integer The total number of hosted sites on a Sitejet Studio license.
Note:
The function only returns this value for Sitejet Studio licenses.
The function returns this value in the package object.
1
    is_autoscale Boolean Whether the package’s price scales with the license’s account volume:
  • 1 — Auto-Scales.
  • 0 — Does not Auto-Scale.
The function returns this value in the package object.
1
    koaproj integer The total number of projects for a koality license.
Note:
The function only returns this value for koality licenses.
The function returns this value in the package object.
30
    max_accounts integer The maximum number of accounts allowed on the license.
  • 0 or a positive integer.
  • null — The license has unlimited accounts.
The function returns this value in the package object.
30
    name string The name of the cPanel package.

The function returns this value in the package object.
cPanel Autoscale Cloud (Internal)
    packageid integer The ID number of the package.

The function returns this value in the package object.
31369
    producttype integer The product type ID:
  • 1 — cPanel/WHM
  • 2 — Enkompass
  • 4 — RESERVED
  • 8 — SiteZen
  • 16 — CloudLinux
  • 32 — KernelCare
  • 64 — DNSOnly
  • 128 — LiteSpeed
  • 256 — Imunify360
  • 512 — WHMCS
  • 1024 — JetBackup
  • 524288 — 360 Monitoring
  • 2097152 — koality
  • 16777216 — Sitejet Studio
  • 33554432 — XOVI NOW
The function returns this value in the package object.
1
    product_name string The cPanel product’s name:
  • cPanel/WHM
  • Enkompass
  • RESERVED
  • SiteZen
  • CloudLinux
  • KernelCare
  • DNSOnly
  • LiteSpeed
  • Imunify360
  • WHMCS
  • JetBackup
  • 360 Monitoring
  • koality
  • Sitejet Studio
  • XOVI NOW
The function returns this value in the package object.
cPanel/WHM
    servers integer The number of server monitors in the 360 Monitoring license.
Note:
The function only returns this value for 360 Monitoring and WP Guardian licenses.
The function returns this value in the package object.
1
    sites integer The number of site monitors in the 360 Monitoring license.
Note:
The function only returns this value for 360 Monitoring licenses.
The function returns this value in the package object.
20
    self_hosted_sites integer The total number of self-hosted sites on a Sitejet Studio license.
Note:
The function only returns this value for Sitejet Studio licenses.
The function returns this value in the package object.
1
    term integer The license billing frequency, in months:
  • A positive integer.
  • null — The package uses the term_seconds return.
Note:
The term and term_seconds returns are mutually exclusive.
The function returns this value in the package object.
12
    term_seconds integer The number of seconds before the license expires:
  • A positive integer.
  • null — The package uses the term return.
Note:
The term and term_seconds returns are mutually exclusive.
The function returns this value in the package object.
120000
    trial Boolean Whether the package is a trial license:
  • 1 — The package is a trial license.
  • 0 — The package is not a trial license.
The function returns this value in the package object.
0
    user_billing_rate integer The billing rate for each account over the user_billing_threshold value.

The function returns this value in the package object.
0
    user_billing_threshold integer The number of accounts included with the license. Additional accounts that exceed this value will be billed at the user_billing_rate value.
  • null or 0 — No billing threshold.
The function returns this value in the package object.
30
    valid Boolean Whether the package is valid:
  • 1 — Valid.
  • 0 — Not valid.
The function returns this value in the package object.
1
reason string Information about the operation. OK
status Boolean Whether the function succeeded:
  • 1 — Success.
  • 0 — Failure.
1
version float Internal information that the Manage2 API uses to identify the version. 0.3

Additional Documentation