For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GithubSign up
DocsCouriersShippersForwardersTrackersAppAPI ReferenceSDKsFAQ
DocsCouriersShippersForwardersTrackersAppAPI ReferenceSDKsFAQ
  • API Reference
          • GETLast seen
          • GETData points
          • POSTMark outliers
          • GETLast seen (public)
          • GETData points (public)
LogoLogo
GithubSign up
API ReferenceTrackingTimeseriesCargo by Device

Last seen (public)

GET
/tracking/timeseries/cargo_by_device/last_seen_public/v1
GET
/tracking/timeseries/cargo_by_device/last_seen_public/v1
1import { ChrtClient } from "@chrt-inc/typescript-sdk";
2
3async function main() {
4 const client = new ChrtClient({
5 token: "YOUR_TOKEN_HERE",
6 });
7 await client.tracking.timeseries.cargoByDevice.lastSeenPublicV1({
8 cargo_id: "cargo_id",
9 task_group_id: "task_group_id",
10 });
11}
12main();
1{
2 "schema_version": 1,
3 "timestamp": "2024-01-15T09:30:00Z",
4 "metadata": {
5 "task_group_id": "tg-987654321",
6 "cargo_id": "cargo-123456789",
7 "device_id": "device-abc123xyz",
8 "outlier": true,
9 "outlier_labeller": "movingpandas",
10 "paused": true,
11 "pytest": true
12 },
13 "location": {
14 "type": "Feature",
15 "geometry": {
16 "type": "GeometryCollection",
17 "geometries": [
18 {
19 "type": "LineString",
20 "coordinates": [
21 [
22 -122.4194,
23 37.7749
24 ],
25 [
26 -122.418,
27 37.776
28 ]
29 ]
30 }
31 ]
32 },
33 "bbox": [
34 -122.42,
35 37.77,
36 -122.41,
37 37.78
38 ],
39 "properties": {
40 "address": "1 Market St, San Francisco, CA 94105",
41 "name": "San Francisco Warehouse"
42 },
43 "id": 101
44 },
45 "_id": "63b1f9e7a1c4d2f5e8a9b123",
46 "temperature": 4.7
47}

Returns the most recent device location data point for a cargo within a public task group. No authentication required if cargo has public visibility enabled via sharing settings. | () -> (CargoByDeviceDataPoint1 | None)

Was this page helpful?
Previous

Data points (public)

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

cargo_idstringRequired
task_group_idstringRequired

Response

Successful Response
schema_versioninteger
timestampdatetime
metadataobject
locationobject

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.

_idstring
temperaturedouble

Errors

422
Cargo by Device Last Seen Public V1request Unprocessable Entity Error