Breadcrumbs

Dеactivate a device

The method and parameters


JSON
{
    "uuid": "7a593d26-8cfd-47e9-8647-1fb18a36fedb",
    "leave_reserved": true
}

POST  /api/v1/billing/devices/deactivate

string uuid  required – A device UUID


bool leave_reserved – the flag responsible for leaving the device reserved after deletion

204  No Content

Successful response

422  Unprocessable Entity

Returns a JSON object with an error. See Validation.

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/devices/deactivate' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "uuid": "string",
    "leave_reserved": true
}'
PHP
PHP
$data = array (
  'uuid' => 'string',
  'leave_reserved' => true,
);
$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/devices/deactivate', false, $context);