# Account

The account service provides a full list of drivers registered to your company.

For each driver, you will find useful information such as the registration date, the account details or the smartphone model.

{% 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/be7911fd13e40-get-drivers-account-information).
{% endhint %}

{% openapi src="<https://2525923625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXYIG5U3AO65YYFWJRK%2Fuploads%2FU7cDbX0F33kTSYpzaYKG%2Fdrivekit-admin-drivers-account.yaml?alt=media&token=828dd509-8fb1-4b50-939f-cd894d3a26ee>" path="/drivekit/admin/drivers/account/page" method="get" %}
[drivekit-admin-drivers-account.yaml](https://2525923625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXYIG5U3AO65YYFWJRK%2Fuploads%2FU7cDbX0F33kTSYpzaYKG%2Fdrivekit-admin-drivers-account.yaml?alt=media\&token=828dd509-8fb1-4b50-939f-cd894d3a26ee)
{% endopenapi %}

## Query parameters

<table><thead><tr><th width="153.66666666666666">Field</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td>pageSize</td><td><code>int</code></td><td><p>Number of elements to return (default: <code>1000</code>).</p><p><em>Min: <code>1000</code></em><br><em>Max: <code>20000</code></em></p></td></tr><tr><td>pageNumber</td><td><code>int</code></td><td>Position of the page to return, the first page has the position : 0 (default: <code>0</code>)<br>Min: <code>0</code></td></tr><tr><td>startDate</td><td><code>int</code></td><td>Minimum date of the driver data's last update (timestamp)</td></tr><tr><td>endDate</td><td><code>int</code></td><td>Maximum date of the driver data's last update</td></tr><tr><td>groupLabel</td><td><code>string</code></td><td>Group name (default: <code>All</code>)</td></tr><tr><td>status</td><td><code>string</code></td><td>Status of the drivers (default: <code>ALL</code>).<br><em>Possible values: <code>ALL</code>, <code>NO_TRIP</code>, <code>EXPIRED</code>, <code>ACTIVE</code></em></td></tr></tbody></table>

{% hint style="info" %}
The `startDate` and `endDate` parameters can be used to filter the drivers based on their most recent interaction with the application. This date reflects the driver's last activity and is updated according to several criteria: last trip recorded, account or smartphone information updates.
{% endhint %}

## Response

The table below summarizes the list of elements included in the response.

<table><thead><tr><th width="170">Field</th><th width="171.66666666666666">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td><code>array[object]</code></td><td>List of requested driver's accounts <em>(see</em> <a href="#data-array"><em>below</em></a><em>)</em></td></tr><tr><td>totalElements</td><td><code>int</code></td><td>Total number of accounts that can be retrieved</td></tr><tr><td>pageNumber</td><td><code>int</code></td><td>Position of the requested page (0 for the first page)</td></tr><tr><td>pageSize</td><td><code>int</code></td><td>Requested page size (between 1000 and 20000)</td></tr><tr><td>hasNext</td><td><code>boolean</code></td><td>Indicates whether there are more results to fetch</td></tr></tbody></table>

### Data array

The `data` array contains a list of driver's account.

<table><thead><tr><th width="186">Field</th><th width="174.66666666666666">Type </th><th>Description</th></tr></thead><tbody><tr><td>userId</td><td><code>string</code></td><td>Driver's unique identifier set to initialize the DriveKit SDK</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>pseudo</td><td><code>string</code></td><td>Driver's pseudo</td></tr><tr><td>registerDate</td><td><code>string</code></td><td><p>Driver's registration date</p><p><em>Date format: <code>YYYY-MM-dd’T’HH:mm:ss.SSSZ</code></em></p></td></tr><tr><td>pushDataStatus</td><td><code>string</code></td><td><p>Driver preference for data sharing </p><p><em>Possible values: <code>UNKNOWN</code>, <code>DENY</code> or <code>ACCEPT</code></em></p></td></tr><tr><td>groups</td><td><code>array[string]</code></td><td>List of groups to which the driver belongs</td></tr><tr><td>smartphoneData</td><td><a href="#smartphone-data">SmartphoneData</a></td><td>Technical information on the driver's smartphone</td></tr><tr><td>clientData</td><td><a href="#client-data">ClientData</a></td><td>Client related metadata</td></tr><tr><td>admin</td><td><code>boolean</code></td><td>Indicates if the user is an administrator on the web dashboard</td></tr><tr><td>betaTester</td><td><code>boolean</code></td><td>Indicates if the account is a beta tester account</td></tr></tbody></table>

### Smartphone data

The smartphoneData object includes details about the driver's smartphone.

<table><thead><tr><th width="198.66666666666666">Field</th><th width="113">Type </th><th>Description</th></tr></thead><tbody><tr><td>phoneModel</td><td><code>string</code></td><td>Smartphone manufacturer codename</td></tr><tr><td>appBuildNumber</td><td><code>string</code></td><td>Mobile app build number</td></tr><tr><td>appVersion</td><td><code>string</code></td><td>Version of the mobile app</td></tr><tr><td>osVersion</td><td><code>string</code></td><td>Version of the operating system</td></tr><tr><td>osType</td><td><code>string</code></td><td>Operating system</td></tr><tr><td>sdkVersion</td><td><code>string</code></td><td>DriveKit SDK version</td></tr><tr><td>phoneLanguage</td><td><code>string</code></td><td>Detected phone lanquage</td></tr><tr><td>rawPhoneLanguage</td><td><code>string</code></td><td>Raw phone language</td></tr><tr><td>lastUpdate</td><td><code>string</code></td><td><p>Date of last update</p><p><em>Date format: <code>YYYY-MM-dd’T’HH:mm:ss.SSSZ</code></em></p></td></tr></tbody></table>

### Client data

Client data consists of customer-specific metadata such as: license plate number, commercial email opt-in, contract number (formatted as a map of key-value).

## Error response

### Unauthorized

If the request does not contain a valid authentication token, the service will answer with a http code 401.

### Bad request

If the request cannot be processed, the service will answer with a http code 400. The response body will contain more details about the error:&#x20;

| Message Key                  | Message                                 | Description                                                          |
| ---------------------------- | --------------------------------------- | -------------------------------------------------------------------- |
| `dk_invalid_parameter_value` | Invalid value for parameter 'status'    | The requested status does not exist                                  |
| `dk_invalid_parameter_value` | Invalid value for parameter(s) '\[...]' | The page size or the page number are not within the authorized range |
| `invalid_group_label`        | Invalid group label                     | The requested group does not exist                                   |
| `invalid_start_date`         | Invalid start date                      | The start date is not valid, or is after the end date                |
| `invalid_end_date`           | Invalid end date                        | The end date is not valid                                            |
