Description

This function limits the packages that a reseller assigns to cPanel accounts.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/setresellerpackagelimit?api.version=1&user=username&no_limit=0&package=package1&allowed=1&number=5
https://hostname.example.com:2087/cpsess##########/xml-api/setresellerpackagelimit?api.version=1&user=username&no_limit=0&package=package1&allowed=1&number=5
whmapi1 setresellerpackagelimit user=username no_limit=0 package=package1 allowed=1 number=5

{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "setresellerpackagelimit"
  }
}
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>setresellerpackagelimit</command>
    </metadata>
</result>

   

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid reseller username on the server.username
no_limitBoolean

Whether to grant the reseller unlimited package use.

This parameter defaults to 0.

  • 1 — Grant the reseller unlimited package use.
  • 0 — Use package limits.
0
packagestring

A hosting plan (package), to modify the reseller's access settings for it.

Use this parameter with the number or allowed parameters. 

A valid hosting plan (package) on the server.package1
allowedBoolean

Whether the reseller can access the package hosting plan.

If you use this parameter, you must also include the package parameter.

  • 1 — Enable access.
  • 0 — Disable access.
1
numberinteger

The maximum number of accounts to which the reseller can assign the package hosting plan.

  • If you use this parameter, you must also include the package parameter.
  • If you set a value for this parameter and set the allowed parameter to 0, the reseller cannot use the hosting plan.
A positive integer.5

Returns

This function only returns metadata.