---
title: Record the EU DPP Registry result for a battery passport
description: "Record what the EU DPP Registry answered for a battery passport: a production registration or an acceptance test. The operator's statement. Paid plans."
canonical: "https://www.tracepass.eu/docs/record-passport-registration"
locale: en
source: "https://www.tracepass.eu/docs/record-passport-registration"
---

# Record the EU DPP Registry result for a battery passport

> Record what the EU DPP Registry answered for a battery passport: a production registration or an acceptance test. The operator's statement. Paid plans.

```http
POST /api/v1/passports/{id}/registration
```

Records what the economic operator reports from the EU DPP Registry website for one published **battery** passport. TracePass records the operator's statement and does not verify it with the Registry. The body takes one of two shapes, chosen by `environment`.

**`environment: "production"`** — the passport is registered in the production Registry. Sets `placeOnMarketStatus: "placed"`, `registrationMode: "website"`, `placedOnMarketAt` and, if you send it, `registrationId` (the Registry's registration identifier, at most 200 characters). `placedOnMarketAt` is the date of placing on the market as `YYYY-MM-DD`: today by default, not in the future and not before the passport was first published. The operator and facility parties lock (a party write that would change a stored identifier answers 409 `operator_locked`), the passport's backup copy is queued and the `passport.placed_on_market` webhook fires.

**`environment: "acceptance"`** — a test in the Registry's acceptance environment: `result` is `passed` or `failed`, with the Registry's `errorCode` for a failure (at most 100 characters, e.g. `SEMANTIC_VALIDATION_UNAVAILABLE`). A test has no legal effect and changes nothing on the passport but `registryAcceptanceTest`.

**Refusals:** `400` for a body that fails validation or a refused date (`invalid_date` when it is not `YYYY-MM-DD`, `date_in_future`, `date_before_publication`, `registration_id_too_long`); `409` for `not_a_battery`, `not_published` or, for production, `already_registered` (the passport is already placed or being sent to an EN 18222 registry). A mistaken record is undone with `DELETE /api/v1/passports/{id}/registration`.

**Paid plans only** (`402` on Free). OAuth callers must act for an admin or owner. Returns the passport after the record. Counts as one v1 write, and only when the call succeeds. Honours `Idempotency-Key`.

## 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. |
| `Idempotency-Key` | header | string | no | UUID v4. |
| `id` | path | string (24 hex chars) | yes | Passport ID of a published battery passport. |
| `environment` | body | "production" \| "acceptance" | yes | Which Registry environment the result comes from. `acceptance` is a test with no legal effect. |
| `placedOnMarketAt` | body | string (YYYY-MM-DD) | no | Production only. The date of placing on the market. Defaults to today; not in the future, not before the passport was first published. |
| `registrationId` | body | string (≤ 200 chars) | no | Production only. The Registry's registration identifier, if you have it. |
| `result` | body | "passed" \| "failed" | no | Acceptance only, and required there. The outcome of the test. |
| `errorCode` | body | string (≤ 100 chars) | no | Acceptance only. The Registry's error code for a failed test. |

## Examples

```bash
curl -sS -X POST \
  https://app.tracepass.eu/api/v1/passports/6650b2c3d4e5f6a7b8c9d0e1/registration \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 9e3b6c28-1f7a-4d52-b0e4-6a8c2d1f5b97" \
  -d '{ "environment": "production", "placedOnMarketAt": "2027-03-01", "registrationId": "URI-000-00-000" }'
```

```typescript
// What the operator saw on the EU DPP Registry website.
const res = await fetch(
  `https://app.tracepass.eu/api/v1/passports/${id}/registration`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": crypto.randomUUID(),
    },
    body: JSON.stringify({
      environment: "production",
      placedOnMarketAt: "2027-03-01",
      registrationId: "URI-000-00-000",
    }),
  },
);
if (!res.ok) {
  const { error } = await res.json();
  console.log(error); // e.g. date_in_future, already_registered
} else {
  const { passport } = await res.json();
  console.log(passport.placeOnMarketStatus, passport.registrationMode); // "placed" "website"
}
```

```python
import os, uuid, requests
# A test in the Registry's acceptance environment: no legal effect.
res = requests.post(
    f"https://app.tracepass.eu/api/v1/passports/{passport_id}/registration",
    headers={
        "Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "environment": "acceptance",
        "result": "failed",
        "errorCode": "SEMANTIC_VALIDATION_UNAVAILABLE",
    },
)
res.raise_for_status()
print(res.json()["passport"]["registryAcceptanceTest"])
```

## Responses

### 200 — Production recorded

```json
{
  "passport": {
    "_id": "6650b2c3d4e5f6a7b8c9d0e1",
    "status": "published",
    "placeOnMarketStatus": "placed",
    "registrationMode": "website",
    "placedOnMarketAt": "2027-03-01T00:00:00.000Z",
    "registrationId": "URI-000-00-000",
    "registryUpi": "https://id.tracepass.eu/01/04012345000016/21/A1B2C3",
    "registrationPreparedAt": "2027-02-26T09:12:00.000Z",
    "registrationPreparedVia": "form"
  }
}
```

### 200 — Acceptance test recorded

```json
{
  "passport": {
    "_id": "6650b2c3d4e5f6a7b8c9d0e1",
    "status": "published",
    "registryAcceptanceTest": {
      "result": "failed",
      "errorCode": "SEMANTIC_VALIDATION_UNAVAILABLE",
      "at": "2026-11-06T10:05:00.000Z"
    }
  }
}
```

### 400 — Date refused

```json
{ "error": "date_in_future" }
```

### 409 — Already registered

```json
{ "error": "already_registered" }
```

## Related

- [Undo a mistaken record](https://www.tracepass.eu/docs/undo-passport-registration.md)
- [Get the Registry address](https://www.tracepass.eu/docs/passport-registry-upi.md)
- [Build an upload file](https://www.tracepass.eu/docs/registry-upload-file.md)
- [Get passport](https://www.tracepass.eu/docs/get-passport.md)
