# Synthesis

The group synthesis service provides a group’s scores and driving statistics. The data are obtained by averaging scores and aggregating trip data over the group's entire activity, the current month, and the current week.

The group synthesis is updated each time a new trip is analyzed.

{% 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/3b7e22d62865e-get-group-synthesis)
{% endhint %}

## Synthesis of group's scores

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

Get a synthesis of DriveQuant scores and statistics for a specified group.

#### Query Parameters

| Name  | Type   | Description |
| ----- | ------ | ----------- |
| label | string | Group name  |

#### Headers

| Name                   | Type   | Description   |
| ---------------------- | ------ | ------------- |
| DriveKit-Admin-API-Key | string | Admin API Key |

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

```javascript
{
  "groupInfos": {
    "id": "GROUP_ID",
    "label": "GROUP_NAME",
    "numberDrivers": 10,
    "owner": "OWNER_USERNAME",
    "managers": [
      "MANAGER1_USERNAME",
      "MANAGER2_USERNAME"
    ],
    "visitors": [
      "VISITOR_USERNAME"
    ],
    "creationDate": "2020-07-01T12:27:41.707+0000",
    "active": true
  },
  "scoresTimeRange": {
    "efficiency": {
      "overall": 7.9,
      "currentWeek": 7.8,
      "currentMonth": 8.36
    },
    "safety": {
      "overall": 8.98,
      "currentWeek": 10,
      "currentMonth": 9.11
    },
    "phoneDistraction": {
      "overall": 8.67,
      "currentWeek": 5.93,
      "currentMonth": 7.42
    },
    "speeding": {
      "overall": 6.7,
      "currentWeek": 6.98,
      "currentMonth": 5.61
    },
    "distance": {
      "overall": 34183.9,
      "currentWeek": 3.8,
      "currentMonth": 2427.3
    },
    "acceleration": {
      "overall": 816,
      "currentWeek": 0,
      "currentMonth": 39
    },
    "braking": {
      "overall": 2883,
      "currentWeek": 0,
      "currentMonth": 213
    },
    "adherence": {
      "overall": 1459,
      "currentWeek": 1,
      "currentMonth": 79
    },
    "fuelVolume": {
      "overall": 2177.474,
      "currentWeek": 0.302,
      "currentMonth": 158.443
    },
    "co2Mass": {
      "overall": 5326.308,
      "currentWeek": 1,
      "currentMonth": 79
    },
    "duration": {
      "overall": 35914,
      "currentWeek": 14,
      "currentMonth": 2560
    },
    "numberTrip": {
      "overall": 1493,
      "currentWeek": 2,
      "currentMonth": 86
    }
  },
  "scoresRoadContext": [
    {
      "roadContext": "TRAFFIC_JAM",
      "distance": 1485.1,
      "duration": 148,
      "efficiencyScore": 11,
      "safetyScore": 11
    },
    {
      "roadContext": "HEAVY_URBAN_TRAFFIC",
      "distance": 867,
      "duration": 57,
      "efficiencyScore": 7.93,
      "safetyScore": 9.89
    },
    {
      "roadContext": "CITY",
      "distance": 9936.4,
      "duration": 377.8,
      "efficiencyScore": 7.17,
      "safetyScore": 8.75
    },
    {
      "roadContext": "SUBURBAN",
      "distance": 8434.4,
      "duration": 131.6,
      "efficiencyScore": 8.15,
      "safetyScore": 9.12
    },
    {
      "roadContext": "EXPRESSWAYS",
      "distance": 24990.5,
      "duration": 229.7,
      "efficiencyScore": 9.2,
      "safetyScore": 9.41
    }
  ]
}
```

{% endtab %}

{% tab title="401 " %}

```
```

{% endtab %}

{% tab title="404 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you do not enter a label in the query, the service will return information from a group composed of all the drivers belonging to your organisation.
{% endhint %}

## Response

The table below summarizes the list of synthesis data.

<table><thead><tr><th width="206">Field</th><th width="200.66666666666666">Type</th><th>Description</th></tr></thead><tbody><tr><td>groupInfos</td><td><a href="#groupinfos">GroupInfos</a></td><td>Group information</td></tr><tr><td>scoresTimeRange</td><td><a href="#scorestimerange">ScoresTimeRange</a></td><td>Driving statistics and average scores per period</td></tr><tr><td>scoresRoadContext</td><td><a href="#scoresroadcontext">ScoresRoadContext</a></td><td>Driving statistics and average scores per road context</td></tr></tbody></table>

### GroupInfos

<table><thead><tr><th width="187.66666666666666">Field</th><th width="188">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td><code>string</code></td><td>Unique identifier of the group</td></tr><tr><td>label</td><td><code>string</code></td><td>Group name</td></tr><tr><td>numberDrivers</td><td><code>int</code></td><td>Number of driver registered in this group</td></tr><tr><td>owner</td><td><code>string</code></td><td>Unique identifier of the group owner</td></tr><tr><td>managers</td><td><code>array[string]</code></td><td>Vector of unique identifiers of group managers</td></tr><tr><td>visitors</td><td><code>array[string]</code></td><td>Vector of unique identifiers of group visitors</td></tr><tr><td>creationDate</td><td><code>string</code></td><td>Group creation date</td></tr><tr><td>isActive</td><td><code>boolean</code></td><td>If the group is active or not</td></tr></tbody></table>

### ScoresTimeRange

For each theme (efficiency, safety, phoneDistraction, speeding, distance, acceleration, braking, adherence, fuelVolume, co2Mass):

<table><thead><tr><th width="162.66666666666666">Field</th><th width="131">Type</th><th>Description</th></tr></thead><tbody><tr><td>overall</td><td><code>double</code></td><td>Average score based on all trips</td></tr><tr><td>currentWeek</td><td><code>double</code></td><td>Average score based on trips performed during the current week</td></tr><tr><td>currentMonth</td><td><code>double</code></td><td>Average score based on trips performed during the current month</td></tr></tbody></table>

### **ScoresRoadContext**

<table><thead><tr><th width="181.66666666666666">Field</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td>roadContext</td><td><code>string</code></td><td>Road context (see <a href="#road-context">below</a>)</td></tr><tr><td>distance</td><td><code>double</code></td><td>Total driving distance (in km)</td></tr><tr><td>duration</td><td><code>double</code></td><td>Total driving duration (in min)</td></tr><tr><td>efficiencyScore</td><td><code>double</code></td><td>Average ecodriving score</td></tr><tr><td>safetyScore</td><td><code>double</code></td><td>Average safety score</td></tr></tbody></table>

### Road context

Driving contexts are calculated from **the GPS velocity.** They are not based on map data.

<table><thead><tr><th width="242">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>TRAFFIC_JAM</code></td><td>Speed below 10 km/h and distance between two stops greater than 100m</td></tr><tr><td><code>HEAVY_URBAN_TRAFFIC</code></td><td>Speed below 30 km/h and distance between two stops greater than 100m</td></tr><tr><td><code>CITY</code></td><td>30 km/h &#x3C; Speed &#x3C; 65 km/h</td></tr><tr><td><code>SUBURBAN</code></td><td>65 km/h &#x3C; Speed &#x3C; 96 km/h</td></tr><tr><td><code>EXPRESSWAYS</code></td><td>Speed > 96 km/h</td></tr></tbody></table>
