26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Update BLE controller

Update a BLE controller

PATCH  /api/v1/billing/ble-controllers/{ble_controller}

Updates BLE controller parameters. Only the provided fields sid, pid, master; all other fields remain unchanged). The type is used only for validation and isn't stored.

JSON
{
    "sid": "EFGH5678",
    "pid": "ABCD1234",
    "master": "AABBCCDDEEFF00"
}

Method parameters

string ble_controller  required , (path) BLE controller UUID.


string type, Device type (validation only, not stored). Allowed values: `openy`, `generic`.


string sid, Device system identifier (System ID). At least 8 characters. Must be unique.


string pid, Device identifier (Product ID). At least 8 characters.


string master, Device master key. At least 12 characters.

200  OK

BLE controller updated successfully

JSON
{
    "uuid": "00000000-0000-0000-0000-000000000001",
    "title": "OPENYLOCK v.3 | k7Qz2",
    "model": "OPENYLOCK v.3",
    "sid": "EFGH5678",
    "pid": "ABCD1234",
    "master": "AABBCCDDEEFF00",
    "online_status": "online",
    "deleted_by": null,
    "deleted_at": null,
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z"
}

404  Not Found

BLE controller not found

422  Unprocessable Entity

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

JSON
{
    "message": "Validation failed",
    "errors": {
        "sid": [
            "The sid has already been taken."
        ]
    }
}
cURL
Bash
curl -k --request PATCH \
	--url 'https://your-domain/api/v1/billing/ble-controllers/{ble_controller}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "ble_controller": "string",
    "type": "string",
    "sid": "string",
    "pid": "string",
    "master": "string"
}'
PHP
PHP
$data = array (
  'ble_controller' => 'string',
  'type' => 'string',
  'sid' => 'string',
  'pid' => 'string',
  'master' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PATCH',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/ble-controllers/{ble_controller}', false, $context);