/api/v1/passports/{id}/fields/{key}Update one field on a passport
Patch a single field on a passport. The value is validated against the field key (must exist on the passport's template) and persisted with an audit trail entry tagged `via API key <prefix>`. Use this in preference to writing the whole `fields` map when you only need to update one number — it's a smaller write and the per-field audit entry is what dashboard reviewers see.
Writes default to `status: "approved"` — API-key-driven integrations are trusted by convention (unlike dashboard editors, where non-admins write `pending_review`). Override with `source: "ai_suggested"` or `source: "supplier"` if you want the value to land in the review queue instead.
An alternate addressing form exists at PATCH /api/v1/passports/by-serial/{serial}/fields/{key} — same body, same response, useful when your ERP only knows the customer-side serial. Counts as one v1 write. Honours `Idempotency-Key`.
Path parameters
- idrequired
ObjectId
Passport ID. To address by serial instead, use PATCH /api/v1/passports/by-serial/{serial}/fields/{key}.
e.g. 6650b2c3d4e5f6a7b8c9d0e1
- keyrequired
string
Field key (snake_case) as defined on the passport's template — e.g. `nominal_voltage`, `recycled_content_pct`, `country_of_origin`. 400 if the key isn't on the template.
e.g. rated_capacity_kwh
Headers
- Authorizationrequired
string
`Bearer <api-key>`.
e.g. Bearer tp_REDACTED_xxxxxxxxxxxx
- Idempotency-Key
string
UUID v4 per logical operation.
Body fields
- valuerequired
string | number | boolean | array | object
New value. The platform doesn't reformat strings into numbers — send the value in the type the template field expects.
e.g. 5.24
- source
enum
Tag the origin of the value. One of: `manual`, `ai_suggested`, `ai_approved`, `reference_db`, `supplier`, `system`. Default `manual`. `ai_suggested` and `supplier` land in the review queue; everything else writes as approved.
- sourceLocale
string (ISO 639-1)
Locale of the value (one of the 24 EU locales). Drives translation direction + the public viewer's language resolution. Defaults to the passport's `sourceLocale` when omitted.
Request
curl -sS -X PATCH \
https://app.tracepass.eu/api/v1/passports/6650b2c3d4e5f6a7b8c9d0e1/fields/rated_capacity_kwh \
-H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "value": 5.24 }'Response
{
"field": {
"value": 5.24,
"source": "manual",
"status": "approved",
"accessLevel": "public",
"sourceLocale": "en",
"lastUpdatedAt": "2026-05-09T10:30:00.000Z",
"lastUpdatedBy": "api_key:tp_89b2482d"
},
"version": 4
}