---
title: Undo a mistaken EU DPP Registry record
description: Undo a mistaken EU DPP Registry record on a battery passport, production or acceptance test. Changes nothing in the Registry itself. Paid plans only.
canonical: "https://www.tracepass.eu/docs/undo-passport-registration"
locale: en
source: "https://www.tracepass.eu/docs/undo-passport-registration"
---

# Undo a mistaken EU DPP Registry record

> Undo a mistaken EU DPP Registry record on a battery passport, production or acceptance test. Changes nothing in the Registry itself. Paid plans only.

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

Clears a result recorded with `POST /api/v1/passports/{id}/registration`; the required `environment` query parameter says which one. This changes nothing in the EU DPP Registry itself: it corrects what TracePass holds for the passport. The undo is recorded.

**`environment=acceptance`** removes the recorded acceptance test (`registryAcceptanceTest`).

**`environment=production`** returns the passport to prepared: `placeOnMarketStatus`, `placedOnMarketAt`, `registrationId` and `registrationMode` are cleared, the frozen address (`registryUpi`) and the preparation stay, and the operator parties unlock. Only a record with `registrationMode: "website"` can be undone, never a registration an EN 18222 registry confirmed.

With no record of that kind to undo, the call answers **409** `nothing_to_undo`. **Paid plans only** (`402` on Free). OAuth callers must act for an admin or owner. Returns the passport after the undo. Counts as one v1 write.

## 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 | string (24 hex chars) | yes | Passport ID. |
| `environment` | query | "production" \| "acceptance" | yes | Which recorded result to undo. |

## Examples

```bash
curl -sS -X DELETE \
  "https://app.tracepass.eu/api/v1/passports/6650b2c3d4e5f6a7b8c9d0e1/registration?environment=production" \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
const res = await fetch(
  `https://app.tracepass.eu/api/v1/passports/${id}/registration?environment=production`,
  {
    method: "DELETE",
    headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` },
  },
);
if (res.status === 409) {
  console.warn("Nothing to undo"); // no website record of this kind
} else {
  const { passport } = await res.json();
  console.log(passport.placeOnMarketStatus ?? "prepared", passport.registryUpi);
}
```

```python
import os, requests
res = requests.delete(
    f"https://app.tracepass.eu/api/v1/passports/{passport_id}/registration",
    params={"environment": "acceptance"},
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
)
if res.status_code == 409:
    print("Nothing to undo")
else:
    res.raise_for_status()
```

## Responses

### 200 — Back to prepared

```json
{
  "passport": {
    "_id": "6650b2c3d4e5f6a7b8c9d0e1",
    "status": "published",
    "registryUpi": "https://id.tracepass.eu/01/04012345000016/21/A1B2C3",
    "registrationPreparedAt": "2027-02-26T09:12:00.000Z",
    "registrationPreparedVia": "form"
  }
}
```

### 409 — Nothing to undo

```json
{ "error": "nothing_to_undo" }
```

### 400 — Missing environment

```json
{
  "error": "Validation failed",
  "details": { "environment": ["Invalid option: expected one of \"production\"|\"acceptance\""] }
}
```

## Related

- [Record the Registry result](https://www.tracepass.eu/docs/record-passport-registration.md)
- [Get passport](https://www.tracepass.eu/docs/get-passport.md)
