Skip to main content
Skip table of contents

Rеserve a device

The method and parameters

Reserve a device so that it becomes unavailable for adding.

If a device is reserved, it cannot be added without additionally sending the skip_reserve_check parameter to the activation request.

JSON
{
    "type": "mediaagent",
    "mac": "fake_mac_5",
    "serial_number": "sn"
}

Possible error codes:

  • 33600 - Device not found

  • 33603 - Device already activated

  • 33610 - Device in the process of deactivation

  • 33622 - Device in initialization (just registered in the system and will be available soon)

  • 33599 - Device reserved

POST /api/v1/billing/devices/reserve

string type REQUIRED – a device type


string mac – a device Mac address


string serial_number – a device serial number

200 OK

Successful response

JSON
{
    "id": 25,
    "type": "mediaagent",
    "uuid": "7a593d26-8cfd-47e9-8647-1fb18a36fedb",
    "serial_number": "sn",
    "status": "reserve",
    "mac": "mac",
    "name": null,
    "version": "1.1.1.1",
    "created_at": null,
    "last_updated_at": null,
    "is_online": true
}

400 Bad Request

Reservation Error

JSON
{
    "message": "The reason for the error will be described here",
    "code": 1000
}

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/reserve' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "type": "string",
    "mac": "string",
    "serial_number": "string"
}'
PHP
PHP
$data = array (
  'type' => 'string',
  'mac' => 'string',
  'serial_number' => 'string',
);
$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/reserve', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.