Breadcrumbs

Deactivate a device


The method and parameters

POST  /api/v1/billing/devices/deactivate

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

string uuid  required – a device UUID.


bool leave_reserved – indicates whether the device should remain reserved after it is deleted. Set to true to keep the device in a reserved state even after deletion.

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/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);