# Get all key logs

`GET https://api.parklio.com/v2/key-logs`

This endpoint allows the user to list all key logs

**Auth:** `Authorization: Bearer <token>`

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sort` | string[] | no | Sort as `field:asc` or `field:desc`. Send it once. Fields: `name`, `id`. See [Sorting](/api/conventions#sorting). |
| `page` | number | no | Page number, starting at 1. See [Paging](/api/conventions#paging). |
| `size` | number | no | Items per page: 10 by default, at most 300. See [Paging](/api/conventions#paging). |
| `filter` | string[] | no | Filter as `field:rule:value`, for example `lot_id:eq:7`. Repeat `filter` to combine filters; all must match. Fields: `account_id`, `date_from`, `date_to`, `lot_id`, `name`, `product_id`, `receiver_identifier`, `status`, `zone_id`. See [Filtering](/api/conventions#filtering). |

## Responses

### 200

```json
{
  "success": true,
  "meta": {
    "total": 100,
    "per_page": 10,
    "current_page": 1,
    "last_page": 1,
    "first_page": 1,
    "first_page_url": "/?page=2",
    "last_page_url": "/?page=10",
    "next_page_url": "/?page=3",
    "previous_page_url": "/?page=1"
  },
  "data": [
    {
      "product": {
        "product_error": {
          "product": {
            "id": 1,
            "device_id": "B123456",
            "name": "B123456",
            "power_type": "battery",
            "lot_id": 1,
            "zone_id": 1,
            "product_type_id": 1,
            "status": "online"
          },
          "id": 1,
          "error_code": "string",
          "jammed": 1,
          "sensor_dirty": 1,
          "pin_broken": 1,
          "rtcc_invalid": 1,
          "master_key_not_set": 1,
          "deleted_at": null,
          "created_at": {},
          "updated_at": {}
        },
        "id": 1,
        "device_id": "B123456",
        "name": "B123456",
        "power_type": "battery",
        "lot_id": 1,
        "zone_id": 1,
        "product_type_id": 1,
        "hardware_version": "1.0.0",
        "firmware_version": "1.0.0.",
        "latitude": 1,
        "longitude": 1,
        "status": "online",
        "advertisement_data": "string",
        "battery_status": 1,
        "product_error_id": 1,
        "rssi": -80,
        "created_at": {},
        "updated_at": {},
        "barrier": {
          "id": 1,
          "product_id": 1,
          "state": "opened",
          "is_autoclose": 1,
          "is_car_on_top": 0,
          "autoclose_time": 45,
          "created_at": {},
          "updated_at": {}
        },
        "gate": {
          "id": 1,
          "product_id": 2,
          "state": "opened",
          "permanent_position": "disabled",
          "deleted_at": null,
          "created_at": {},
          "updated_at": {}
        },
        "chain": {
          "id": 1,
          "product_id": 3,
          "state": "opened",
          "permanent_position": "disabled",
          "deleted_at": null,
          "created_at": {},
          "updated_at": {}
        },
        "bollard": {
          "id": 1,
          "product_id": 4,
          "state": "opened",
          "permanent_position": "disabled",
          "deleted_at": null,
          "created_at": {},
          "updated_at": {}
        },
        "brain": {
          "id": 1,
          "product_id": 5,
          "state": "opened",
          "permanent_position": "disabled",
          "deleted_at": null,
          "created_at": {},
          "updated_at": {}
        }
      },
      "operation_token": {
        "id": 1,
        "product_id": 1,
        "start_time": {},
        "end_time": {},
        "status": "string",
        "used_count": 1,
        "is_unlimited": 1,
        "token_close": "any",
        "token_open": "any",
        "token_status": "any",
        "deleted_at": null,
        "created_at": {},
        "updated_at": {}
      },
      "sender": {
        "id": 1,
        "account_id": 1,
        "account_user_role_id": 1,
        "email": "john.doe@example.com",
        "name": "John Doe",
        "phone": "string",
        "deleted_at": null,
        "created_at": {},
        "updated_at": {}
      },
      "id": 0,
      "name": "John Doe",
      "sender_id": 0,
      "product_id": 0,
      "operation_token_id": 0,
      "receiver_identifier": "john.doe@example.com",
      "receiver_identifier_type": "email",
      "deleted_at": {
        "deleted_at": null
      },
      "created_at": "2026-01-15T09:30:00.000Z",
      "updated_at": "2026-01-15T09:30:00.000Z"
    }
  ]
}
```

### 401 — Account user is not logged in and they should log in again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 1,
      "message": "Unauthorized access."
    }
  ]
}
```

### 404 — Resource that has been requested does not exist. User should not try to repeat this request.

```json
{
  "success": false,
  "errors": [
    {
      "code": 6,
      "message": "Resource not found."
    }
  ]
}
```

### 422 — Some of the provided request parameters are missing or are invalid. User should add/change them according to response message.

```json
{
  "success": false,
  "errors": [
    {
      "code": 23,
      "message": "Validation error",
      "field": "field"
    }
  ]
}
```

