# Expired accounts

This service retrieves the accounts of drivers who are no longer active.

If a driver has not performed a trip for a certain period of time, he is considered inactive and his account is considered expired.

The duration is adjustable according to your needs and must be in accordance with the legal requirements and conditions of use of the service.

{% hint style="info" %}
If you have your **admin API key**, you can try the API via this [**link**](https://drivequant.stoplight.io/docs/drivequant-public/b3A6Mjg1Mjc4MjI-get-all-expired-drivers).
{% endhint %}

## Get all expired drivers

<mark style="color:blue;">`GET`</mark> `https://service.drivequant.com/v3/drivekit/admin/drivers/expired`

#### Headers

| Name                                                     | Type   | Description   |
| -------------------------------------------------------- | ------ | ------------- |
| DriveKit-Admin-API-Key<mark style="color:red;">\*</mark> | String | Admin API Key |

{% tabs %}
{% tab title="200: OK OK" %}

```javascript
[
  {
    "id": "driver-id-1",
    "firstname": "driver-firstname-1",
    "lastname": "driver-lastname-1",
    "username": "driver-1@email.com",
    "registerDate": "2018-04-10T15:59:21.000+0000",
    "lastUpdateDate": "2019-11-16T11:15:18.241+0000"
  },
  {
    "id": "5c6e5a2124aa9a00072950e7",
    "firstname": "driver-firstname-2",
    "lastname": "driver-lastname-2",
    "username": "driver-2@email.com",
    "registerDate": "2019-02-21T07:58:25.000+0000",
    "lastUpdateDate": "2019-11-09T08:10:09.847+0000"
  },
  {
    "id": "5d29707936d1a00007b99851",
    "firstname": "driver-firstname-3",
    "lastname": "driver-lastname-3",
    "username": "driver-3@email.com",
    "registerDate": "2019-07-13T05:47:37.000+0000",
    "lastUpdateDate": "2019-11-09T22:14:49.189+0000"
  },
  {
    "id": "5d29c88524aa9a000791c144",
    "firstname": "driver-firstname-4",
    "lastname": "driver-lastname-4",
    "username": "driver-4@email.com",
    "registerDate": "2019-07-13T12:03:17.000+0000",
    "lastUpdateDate": "2019-11-06T09:39:04.485+0000"
  }
]
```

{% endtab %}

{% tab title="401: Unauthorized Bad credentials" %}

```javascript
{
  "message": "Invalid API key",
  "code": 1,
  "messageKey": "dk_invalid_api_key"
}
```

{% endtab %}
{% endtabs %}

## Response

<table><thead><tr><th width="182.66666666666666">Field</th><th width="127">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td><code>string</code></td><td>Driver's unique identifier</td></tr><tr><td>firstname</td><td><code>string</code></td><td>Driver's firstname</td></tr><tr><td>lastname</td><td><code>string</code></td><td>Driver's lastname</td></tr><tr><td>username</td><td><code>string</code></td><td>Driver's username</td></tr><tr><td>registerDate</td><td><code>string</code></td><td>Driver's registration date</td></tr><tr><td>lastUpdateDate</td><td><code>string</code></td><td>Date of driver's last use of the app</td></tr></tbody></table>
