# One published version with its signed snapshot and validation report

> `GET /batteries/{batteryId}/passport/versions/{versionNo}` · Scope: `read` · operationId `getPassportVersion`

Any member.

## Pfad-Parameter

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

## Antworten

### 200 (`application/json`)

The version.

- **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)
- **batterypass_v2** `SchemaReport` (erforderlich): Result of validating a BatteryPass v2.0 export against its schema (advisory, ADR-012).
  - **issues** `SchemaIssue[]` (erforderlich)
  - **schema** `string` (erforderlich): The schema file, e.g. `Stationary_Industrial_Above_2kWh_Feb27_2.0.1.json`.
  - **valid** `boolean` (erforderlich)
- **public_document** `PassportDocument` (erforderlich): A passport version projected to an access tier. The `public` projection is stored and signed at publication (ADR-013); verify it by canonicalising this object with RFC 8785 (JCS), hashing it with SHA-256 and checking the Ed25519 signature.
  - **category** `PassportCategory` (erforderlich)
  - **economic_operator** `PublicProfile`: The economic operator as shown on public passports. Every property is optional; publishing (M4) requires a complete profile.
  - **gs1_digital_link** `string` (erforderlich)
  - **gtin** `string` (erforderlich)
  - **model_name** `string` (erforderlich): The name of the battery model (the product name), for headings.
  - **passport_id** `string`: Absent only in a preview of a passport that has no identifier yet.
  - **predecessor_passport_id** `string`: Second life: the passport identifier of the battery this one was repurposed, reused or remanufactured from.
  - **restricted_fields_present** `string[]` (erforderlich): Keys of fields with a value above this tier. Keys only, never values.
  - **sections** `PassportSection[]` (erforderlich)
  - **serial_number** `string` (erforderlich)
  - **tier** `string` (erforderlich, einer von: `public`, `legitimate_interest`, `authority`): The access tier a passport document is projected to; each includes the tiers before it.
  - **version** `PassportDocumentVersion` (erforderlich)
- **public_signature** `string` (erforderlich): Ed25519 signature of the canonical public document bytes (base64url, no padding).
- **registry_hash** `string` (erforderlich)
- **signature** `string` (erforderlich): Ed25519 signature of the canonical snapshot bytes (base64url, no padding).
- **snapshot** `JSONDocument` (erforderlich): A JSON document whose shape is described elsewhere (snapshot, BatteryPass v2.0 export).

### 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/versions/{versionNo}" \
  -H "Authorization: Bearer $BATTERYPASS_API_KEY"
```
