---
title: List measurement history
description: List measurement history for a battery passport — filter by field key and date range, cursor-paginate up to 200 per page. Battery passports only.
canonical: "https://www.tracepass.eu/docs/list-measurements"
locale: en
source: "https://www.tracepass.eu/docs/list-measurements"
---

# List measurement history

> List measurement history for a battery passport — filter by field key and date range, cursor-paginate up to 200 per page. Battery passports only.

```http
GET /api/v1/passports/{id}/measurements
```

Returns the full measurement history for a battery passport, newest first (by `measuredAt`). Each entry is a `PassportMeasurement` object with `_id`, `passportId`, `fieldKey`, `value`, `measuredAt`, `receivedAt`, `externalId?`, `unit?`, `materialized` (whether this entry became the passport's current value), and `source`. **Battery passports only** — a non-battery passport returns 422 `not_a_battery`.

Filter with `?fieldKey=<key>` to restrict to one field, `?from=<ISO 8601>` and `?to=<ISO 8601>` to constrain the `measuredAt` window. Page size is controlled by `?limit` (1–200, default 50). Paginate with `?cursor=<nextCursor>` — pass the `nextCursor` value from the previous page's response exactly as returned; it is opaque and its internal format must not be relied upon. The response carries `hasMore: true` and a non-null `nextCursor` when additional results exist; `hasMore: false` means you have reached the last page.

An alternate addressing form exists at `GET /api/v1/passports/by-serial/{serial}/measurements` with the same query parameters and response shape. If a serial is not unique within your account, add `?gtin=<gtin>` to disambiguate. Read-only; OAuth scope: `passports:read`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `Bearer <token>` — either a `tp_` API key (Developer → API Keys; simplest, for server-to-server) or an OAuth 2.0 access token (Developer → OAuth Apps; for user-authorized apps, scoped + revocable). The Authentication page has the full OAuth flow and scope list. |
| `id` | path | ObjectId | yes | Passport ID. |
| `fieldKey` | query | string | no | Filter to a single field key (e.g. `stateOfHealth`). |
| `from` | query | string (ISO 8601) | no | Return measurements with `measuredAt` ≥ this value. |
| `to` | query | string (ISO 8601) | no | Return measurements with `measuredAt` ≤ this value. |
| `limit` | query | integer | no | Page size (1–200, default 50). |
| `cursor` | query | string | no | The `nextCursor` value from the previous page's response. Opaque — pass it as-is; do not parse or construct it. |

## Examples

```bash
curl -sS \
  "https://app.tracepass.eu/api/v1/passports/6650b2c3d4e5f6a7b8c9d0e1/measurements?fieldKey=stateOfHealth&limit=50" \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
let cursor: string | null = null;
do {
  const url = new URL(
    `https://app.tracepass.eu/api/v1/passports/${id}/measurements`,
  );
  url.searchParams.set("fieldKey", "stateOfHealth");
  url.searchParams.set("limit", "50");
  if (cursor) url.searchParams.set("cursor", cursor);

  const res = await fetch(url.toString(), {
    headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` },
  });
  const { data, hasMore, nextCursor } = await res.json();
  for (const m of data) {
    console.log(m.measuredAt, m.value, m.materialized ? "(current)" : "");
  }
  cursor = nextCursor;
} while (cursor);
```

```python
import os, requests

cursor = None
while True:
    params = {"fieldKey": "stateOfHealth", "limit": 50}
    if cursor:
        params["cursor"] = cursor
    res = requests.get(
        f"https://app.tracepass.eu/api/v1/passports/{passport_id}/measurements",
        headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
        params=params,
    )
    res.raise_for_status()
    body = res.json()
    for m in body["data"]:
        print(m["measuredAt"], m["value"], "(current)" if m["materialized"] else "")
    if not body["hasMore"]:
        break
    cursor = body["nextCursor"]
```

## Responses

### 200 — First page of history

```json
{
  "data": [
    {
      "_id": "6750a1b2c3d4e5f6a7b8c9d0",
      "passportId": "6650b2c3d4e5f6a7b8c9d0e1",
      "fieldKey": "stateOfHealth",
      "value": 96.4,
      "measuredAt": "2027-03-01T06:00:00Z",
      "receivedAt": "2027-03-01T06:01:12Z",
      "externalId": "bms-7781-2027-03-01",
      "materialized": true,
      "source": "api:tp_abc123"
    },
    {
      "_id": "6740a1b2c3d4e5f6a7b8c9d0",
      "passportId": "6650b2c3d4e5f6a7b8c9d0e1",
      "fieldKey": "stateOfHealth",
      "value": 97.1,
      "measuredAt": "2027-02-01T06:00:00Z",
      "receivedAt": "2027-02-01T06:00:55Z",
      "materialized": false,
      "source": "api:tp_abc123"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

### 422 — Not a battery passport

```json
{ "error": "not_a_battery" }
```

### 404 — Not found

```json
{ "error": "Passport not found" }
```

## Related

- [Capture measurements](https://www.tracepass.eu/docs/capture-measurements.md)
- [Get latest measurements](https://www.tracepass.eu/docs/latest-measurements.md)
