> This page is for version Dev.
> For other versions, use one of these documentation indexes:
> - Prod (default): https://docs.chrt.com/prod/llms.txt
> - Staging: https://docs.chrt.com/staging/llms.txt
> - Dev: https://docs.chrt.com/dev/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chrt.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chrt.com/_mcp/server.

# Data points

GET https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1

Returns sampled driver location data points and the unique drivers for a task group. Excludes outliers. | auth: api_key | authz_personas=[coordinator_org_operators, shipper_org_operators, executor_org_operators, driver_for_executor] | () -> (TaskGroupByDriverDataPointsRes)

Reference: https://docs.chrt.com/api-reference/api-reference/tracking/timeseries/task-group-by-driver/data-points-v-1

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.dev.chrt.com` (Development, default)
- `https://localhost:8000` (Local)
- `https://api.staging.chrt.com` (Staging)
- `https://api.chrt.com` (Production)

## Request

### Query parameters

- `task_group_id` (string, required)
- `limit` (integer, optional, nullable, default: 100)

## Response

### 200

Successful Response

- `data_points` (list of TaskGroupByDriverDataPoint1, required)
- `drivers` (list of DriversItem, optional)

## Errors

### 422 Task Group by Driver Data Points V1request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### TaskGroupByDriverDataPoint1

- `_id` (string, required)
- `location` (LocationFeature, required) — GeoJSON Feature with typed properties for locations The geometry field is strongly typed as Geometry (union of all geometry types) but remains optional to match the base Feature class specification. To ensure geometry is always present, validate it at runtime or make it required.
- `metadata` (TaskGroupByDriverDataPointMetadata1, required)
- `schema_version` (integer, required)
- `timestamp` (datetime, required)

### DriversItem

- Driver1: Driver1
- Driver Limited1: DriverLimited1

### ValidationError

- `loc` (list of LocationItem, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (map from string to any, optional)
- `input` (any, optional)

### LocationFeature

GeoJSON Feature with typed properties for locations The geometry field is strongly typed as Geometry (union of all geometry types) but remains optional to match the base Feature class specification. To ensure geometry is always present, validate it at runtime or make it required.

- `geometry` (Geometry, required)
- `type` ("Feature", required)
- `bbox` (list of any, optional, nullable)
- `id` (Id, optional, nullable)
- `properties` (LocationProperties, optional, nullable) — Properties for GeoJSON Feature objects

### TaskGroupByDriverDataPointMetadata1

- `driver_id` (string, required)
- `task_group_id` (string, required)
- `outlier` (boolean, optional, nullable)
- `outlier_labeller` (enum, optional, nullable)
  - Allowed values: `movingpandas`, `user`
- `pytest` (boolean, optional, nullable)

### Driver1

- `_id` (string, required)
- `org_id` (string, required) — Must be a string starting with `org_`
- `schema_version` (integer, required)
- `user_id` (string, required) — Must be a string starting with `user_`
- `archived_at_timestamp` (datetime, optional, nullable)
- `auto_assign_enabled` (boolean, optional, default: true)
- `available_according_to_driver` (boolean, optional, default: true)
- `available_according_to_operators` (boolean, optional, default: true)
- `email_address_primary` (string, optional, nullable)
- `email_address_secondary` (string, optional, nullable)
- `first_name` (string, optional, nullable)
- `last_name` (string, optional, nullable)
- `last_seen_at_location` (LocationFeature, optional, nullable) — GeoJSON Feature with typed properties for locations The geometry field is strongly typed as Geometry (union of all geometry types) but remains optional to match the base Feature class specification. To ensure geometry is always present, validate it at runtime or make it required.
- `last_seen_at_location_city` (string, optional, nullable)
- `last_seen_at_location_large_city` (string, optional, nullable)
- `last_seen_at_timestamp` (datetime, optional, nullable)
- `phone_number_primary` (string, optional, nullable)
- `phone_number_secondary` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `unassigned`, `assigned`, `in_progress`
- `vehicle_types` (list of enum, optional)
  - Allowed values: `sedan`, `suv`, `cargo_van`, `box_truck`, `flatbed`, `semi_truck`, `airplane`
- `waiting` (boolean, optional, default: false)

### DriverLimited1

- `_id` (string, required)
- `org_id` (string, required) — Must be a string starting with `org_`
- `schema_version` (integer, required)
- `first_name` (string, optional, nullable)
- `last_name` (string, optional, nullable)
- `vehicle_types` (list of enum, optional)
  - Allowed values: `sedan`, `suv`, `cargo_van`, `box_truck`, `flatbed`, `semi_truck`, `airplane`

### LocationItem

- string
- integer

### Geometry

- `type`: `GeometryCollection`
  - `geometries` (list of GeometriesItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `LineString`
  - `coordinates` (list of CoordinatesItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `MultiLineString`
  - `coordinates` (list of list of CoordinatesItemItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `MultiPoint`
  - `coordinates` (list of CoordinatesItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `MultiPolygon`
  - `coordinates` (list of list of list of CoordinatesItemItemItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `Point`
  - `coordinates` (Coordinates, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `Polygon`
  - `coordinates` (list of list of CoordinatesItemItem, required)
  - `bbox` (list of any, optional, nullable)

### Id

- integer
- string

### LocationProperties

Properties for GeoJSON Feature objects

- `address` (string, optional, nullable)
- `name` (string, optional, nullable)

### GeometriesItem

- `type`: `GeometryCollection`
  - `geometries` (list of GeometriesItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `LineString`
  - `coordinates` (list of CoordinatesItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `MultiLineString`
  - `coordinates` (list of list of CoordinatesItemItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `MultiPoint`
  - `coordinates` (list of CoordinatesItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `MultiPolygon`
  - `coordinates` (list of list of list of CoordinatesItemItemItem, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `Point`
  - `coordinates` (Coordinates, required)
  - `bbox` (list of any, optional, nullable)
- `type`: `Polygon`
  - `coordinates` (list of list of CoordinatesItemItem, required)
  - `bbox` (list of any, optional, nullable)

### CoordinatesItem

- Position2d: list of any
- Position3d: list of any

### CoordinatesItemItem

- Position2d: list of any
- Position3d: list of any

### CoordinatesItemItemItem

- Position2d: list of any
- Position3d: list of any

### Coordinates

- Position2d: list of any
- Position3d: list of any

## Examples

**Response**

```json
{
  "data_points": [
    {
      "_id": "_id",
      "location": {
        "geometry": {
          "type": "GeometryCollection",
          "geometries": [
            {
              "type": "LineString",
              "coordinates": [
                []
              ]
            }
          ]
        },
        "type": "Feature"
      },
      "metadata": {
        "driver_id": "driver_id",
        "task_group_id": "task_group_id"
      },
      "schema_version": 1,
      "timestamp": "2024-01-15T09:30:00Z"
    }
  ],
  "drivers": [
    {
      "_id": "_id",
      "archived_at_timestamp": "2024-01-15T09:30:00Z",
      "auto_assign_enabled": true,
      "available_according_to_driver": true,
      "available_according_to_operators": true,
      "email_address_primary": "email_address_primary",
      "email_address_secondary": "email_address_secondary",
      "first_name": "first_name",
      "last_name": "last_name",
      "last_seen_at_location": {
        "geometry": {
          "geometries": [
            {
              "coordinates": [
                []
              ],
              "type": "LineString"
            }
          ],
          "type": "GeometryCollection"
        },
        "type": "Feature"
      },
      "last_seen_at_location_city": "last_seen_at_location_city",
      "last_seen_at_location_large_city": "last_seen_at_location_large_city",
      "last_seen_at_timestamp": "2024-01-15T09:30:00Z",
      "org_id": "org_id",
      "phone_number_primary": "phone_number_primary",
      "phone_number_secondary": "phone_number_secondary",
      "schema_version": 1,
      "status": "unassigned",
      "user_id": "user_id",
      "vehicle_types": [
        "sedan"
      ],
      "waiting": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1"

querystring = {"limit":"1","task_group_id":"task_group_id"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.dev.chrt.com/tracking/timeseries/task_group_by_driver/data_points/v1?limit=1&task_group_id=task_group_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```