26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Get user's virtual key

Get a user's virtual key

GET  /api/v1/billing/users/{login}/ble-controllers/{ble_controller}/virtual-keys

Returns the virtual key held by the user with the specified login on the BLE-controller. A user can have at most one key per controller, so the key is identified by login rather than ID.

The key format is described in Get a virtual key by ID.

Method parameters

string login  required , User login (in URL)


string ble_controller  required , BLE controller UUID (in URL)

200  OK

Successful response

JSON
{
    "id": 15,
    "ble_device_id": "00000000-0000-0000-0000-000000000001",
    "user": {
        "id": 42,
        "login": "170300101",
        "name": "Ivan Petrov"
    },
    "type": "temporary",
    "valid_from": "2026-01-15T10:00:00.000000Z",
    "valid_till": "2026-02-15T10:00:00.000000Z",
    "is_active": true,
    "is_valid_now": true,
    "created_by": {
        "id": 2,
        "login": "billing"
    },
    "created_at": "2026-01-15T10:00:00.000000Z",
    "updated_at": "2026-01-15T10:00:00.000000Z"
}

404  Not Found

BLE controller not found

JSON
{
    "error": "resource not found"
}

404  Not Found

User not found or has no key on this controller

JSON
{
    "error": "wrong api endpoint"
}
cURL
Bash
curl -k --request GET\
	--url 'https://your-domain/api/v1/billing/users/{login}/ble-controllers/{ble_controller}/virtual-keys' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "login": "string",
    "ble_controller": "string"
}'
PHP
PHP
$data = array (
  'login' => 'string',
  'ble_controller' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/users/{login}/ble-controllers/{ble_controller}/virtual-keys', false, $context);