Breadcrumbs

Manage licenses for a user

The method and parameters

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

This manages a user's licenses based on their login. If all three analytics parameters are set to null or zero, the user’s access to analytics will be disabled.

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 cases of the second license level


int analytic_l3 – the number of cases of the third license level

204  No Content

Successful response

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' \
	--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', false, $context);