---
title: Get latest measurements
description: Get the latest measurement per field for a battery passport — every accepted Annex XIII use-data key in one response; null when not yet received.
canonical: "https://www.tracepass.eu/docs/latest-measurements"
locale: en
source: "https://www.tracepass.eu/docs/latest-measurements"
---

# Get latest measurements

> Get the latest measurement per field for a battery passport — every accepted Annex XIII use-data key in one response; null when not yet received.

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

Returns the most recent measurement for each accepted Annex XIII point 4 use-data field. The response is `{ data: { <fieldKey>: LatestMeasurement | null } }` — every accepted key is always present; a key is `null` when no measurement has been received for that field yet. A `LatestMeasurement` carries `value`, `measuredAt`, and optionally `unit` and `externalId`. **Battery passports only** — a non-battery passport returns 422 `not_a_battery`.

This endpoint reflects the same values the passport viewer shows for the dynamic data section. `dynamicDataAsOf` on the passport is the `measuredAt` of the newest measurement across all fields — this endpoint lets you retrieve each field's latest value and when it was taken. An alternate addressing form exists at `GET /api/v1/passports/by-serial/{serial}/measurements/latest` with the same 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. |

## Examples

```bash
curl -sS \
  https://app.tracepass.eu/api/v1/passports/6650b2c3d4e5f6a7b8c9d0e1/measurements/latest \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
const res = await fetch(
  `https://app.tracepass.eu/api/v1/passports/${id}/measurements/latest`,
  { headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` } },
);
const { data } = await res.json();
// data is Record<fieldKey, { value, measuredAt, unit?, externalId? } | null>
for (const [field, m] of Object.entries(data)) {
  if (m) console.log(field, "→", m.value, "at", m.measuredAt);
  else console.log(field, "→ not yet measured");
}
```

```python
import os, requests
res = requests.get(
    f"https://app.tracepass.eu/api/v1/passports/{passport_id}/measurements/latest",
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
)
res.raise_for_status()
for field, m in res.json()["data"].items():
    if m:
        print(field, "→", m["value"], "at", m["measuredAt"])
    else:
        print(field, "→ not yet measured")
```

## Responses

### 200 — Latest values (partial — some fields not yet measured)

```json
{
  "data": {
    "stateOfHealth": {
      "value": 96.4,
      "measuredAt": "2027-03-01T06:00:00Z",
      "externalId": "bms-7781-2027-03-01"
    },
    "numberOfFullEquivalentChargingCycles": {
      "value": 112,
      "measuredAt": "2027-03-01T06:00:00Z"
    },
    "currentStateOfCharge": null,
    "capacityFade": null,
    "powerFade": null,
    "stateOfCertifiedEnergy": null,
    "remainingCapacity": null,
    "remainingPowerCapability": null,
    "remainingRoundTripEfficiency": null,
    "evolutionOfSelfDischargeRate": null,
    "currentInternalResistancePack": null,
    "internalResistanceIncrease": null,
    "dynamicRatedCapacity": null,
    "dynamicPowerCapability": null,
    "dynamicInternalResistance": null,
    "dynamicEnergyRoundTripEfficiency": null,
    "dynamicExpectedLifetimeCycles": null,
    "numberOfChargingEvents": null,
    "negativeEvents": null,
    "temperatureConditionsHistorical": 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)
- [List measurement history](https://www.tracepass.eu/docs/list-measurements.md)
