26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Link devices to access point

POST  /api/v1/billing/access-points/{access_point}/attach

Links one or more devices to an access point.

The request body is an array of device objects.

For an intercom (intercom), the id field contains the numeric intercom ID.

For a BLE controller (openy_controller), it contains the controller UUID.

Devices that are already linked aren't duplicated.

Returns the access point with updated device lists.

JSON
[
    {
        "id": 10,
        "type": "intercom"
    },
    {
        "id": "00000000-0000-0000-0000-000000000003",
        "type": "openy_controller"
    }
]

Method parameters

string access_point  required , (path) Access point UUID.


mixed array, []* Array of device objects to link.


mixed string, [].type* Device type. Allowed values: `intercom`, `openy_controller`, `camera`.

200  OK

Devices linked. Returns the access point with its linked devices (see Get access point information).

422  Unprocessable Entity

Validation error. For more information, see General information > Validation.

JSON
{
    "message": "Validation failed",
    "errors": {
        "0.type": [
            "The selected 0.type is invalid."
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/access-points/{access_point}/attach' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "access_point": "string",
    "array": "",
    "string": ""
}'
PHP
PHP
$data = array (
  'access_point' => 'string',
  'array' => '',
  '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/access-points/{access_point}/attach', false, $context);