# The passport of a unit

> `GET /batteries/{batteryId}/passport` · Scope: `read` · operationId `getPassport`

Any member. A unit whose identifiers are not locked and that was never published has a passport
in status `draft` without `passport_id`.

## Pfad-Parameter

- **batteryId** `string (uuid)` (erforderlich)

## Antworten

### 200 (`application/json`)

The passport.

- **battery_id** `string (uuid)` (erforderlich)
- **current_version** `PassportVersionSummary`
  - **batterypass_v2_issue_count** `integer` (erforderlich)
  - **batterypass_v2_valid** `boolean` (erforderlich): Whether the BatteryPass v2.0 export passed its schema (advisory, ADR-012).
  - **canonical_hash** `string` (erforderlich): `sha256:<hex>` of the JCS-canonical snapshot (ADR-004).
  - **key_id** `string` (erforderlich)
  - **public_hash** `string` (erforderlich): `sha256:<hex>` of the JCS-canonical public document (ADR-013).
  - **published_at** `string (date-time)` (erforderlich)
  - **published_by** `string (uuid)`
  - **published_by_name** `string`
  - **reason** `string` (erforderlich)
  - **registry_version** `string` (erforderlich)
  - **valid_until** `string (date-time)`: When a later version replaced this one.
  - **version_no** `integer` (erforderlich)
- **first_published_at** `string (date-time)`
- **gs1_digital_link** `string`: `{RESOLVER_BASE_URL}/01/{gtin}/21/{serial}`; fixed once the identifiers are locked, a preview before.
- **gtin** `string`: The model's GTIN-14.
- **identifiers_locked_at** `string (date-time)`
- **passport_id** `string`: Permanent passport identifier `urn:dpp:{uuid}`, assigned when the identifiers are locked or at the first publication.
- **public_url** `string`: The public passport page, once published.
- **row_version** `integer (int64)`: Optimistic-concurrency version; send it back as `If-Match` when updating.
- **serial_number** `string` (erforderlich)
- **status** `string` (erforderlich, einer von: `draft`, `qr_locked`, `published`, `update_needed`, `suspended`, `withdrawn`, `deleted_recycled`): Status of a unit's passport (`docs/domain-model.md` §7).
- **withdrawn_at** `string (date-time)`
- **withdrawn_reason** `string`

### 400 (`application/problem+json`)

The request is malformed or failed validation (`validation_error`), or a token is invalid or expired (`invalid_token`).

### 401 (`application/problem+json`)

The API key is missing, unknown or revoked (`unauthenticated`).

### 403 (`application/problem+json`)

The API key may not perform this action (`forbidden`): it lacks the operation's scope, or the action needs more than a viewer's rights.

### 404 (`application/problem+json`)

The resource does not exist in the organisation of the API key, or the public passport is unknown (`not_found`).

### default (`application/problem+json`)

Any other problem, e.g. `internal_error`.

## Beispiel

```bash title="cURL"
curl -X GET "https://passport.kabin.sh/api/v1/batteries/{batteryId}/passport" \
  -H "Authorization: Bearer $BATTERYPASS_API_KEY"
```
