Breadcrumbs

Chеck license management

The method and parameters

POST  /api/v1/billing/user/manage/licenses/check

This checks if a user has the ability to manage licenses, based on their login. The response will only include the licenses specified in the request.

JSON
{
    "login": "test@mail.com",
    "analytic_l1": null,
    "analytic_l2": 1,
    "analytic_l3": 0
}

string login – a user login


int analytic_l1 – the number of cases of the first license level


int analytic_l2 – the number of the second license level


int analytic_l3– the number of the third license level

200  OK

Returns a list of licenses and the ability to edit them

JSON
{
    "analytic_l1": false,
    "analytic_l2": true,
    "analytic_l3": true
}

422  Unprocessable Entity

Returns a JSON object with an error. For details, see General information > Validation.

JSON
{
    "message": "No error message here",
    "errors": {
        "any_key": [
            "Error details"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/user/manage/licenses/check' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "login": "string",
    "analytic_l1": 0,
    "analytic_l2": 0,
    "analytic_l3": 0
}'
PHP
PHP
$data = array (
  'login' => 'string',
  'analytic_l1' => 0,
  'analytic_l2' => 0,
  'analytic_l3' => 0,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/user/manage/licenses/check', false, $context);