Zum Inhalt springen
Pässe

The passport of a unit

Scope: readSiehe auch:Authentifizierung ·Fehler ·Paginierung ·Ratenlimits
GET
/batteries/{batteryId}/passport

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

Autorisierung

apiKey
headerAutorisierungBearer <Token>

Organisation API key sent as Authorization: Bearer bp_live_… (ADR-017). Accepted only by the operations that list this scheme, with the scope in their x-api-key-scope.

Pfad-Parameter

batteryId*string
Formatuuid

Antwort-Body

The passport.

application/json
  1. response

The passport of one unit (one per unit, ADR-002).

battery_id*string
Formatuuid
current_version?
first_published_at?string
Formatdate-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
Formatdate-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?RowVersion

Optimistic-concurrency version; send it back as If-Match when updating.

Formatint64
Bereich1 <= value
serial_number*string
status*PassportStatus

Status of a unit's passport (docs/domain-model.md §7).

Wert in"draft""qr_locked""published""update_needed""suspended""withdrawn""deleted_recycled"
withdrawn_at?string
Formatdate-time
withdrawn_reason?string
Beispielanfrage
curl -X GET 'https://example.com/api/v1/batteries/497f6eca-6276-4993-bfeb-53cbbbba6f08/passport'
Beispielantwort
{  "battery_id": "bf9efcd2-a647-473f-b459-71d521ebe1ad",  "current_version": {    "batterypass_v2_issue_count": 0,    "batterypass_v2_valid": true,    "canonical_hash": "string",    "key_id": "string",    "public_hash": "string",    "published_at": "2019-08-24T14:15:22Z",    "published_by": "9ac9eee7-2153-423d-b22d-04e12679154a",    "published_by_name": "string",    "reason": "string",    "registry_version": "string",    "valid_until": "2019-08-24T14:15:22Z",    "version_no": 1  },  "first_published_at": "2019-08-24T14:15:22Z",  "gs1_digital_link": "string",  "gtin": "string",  "identifiers_locked_at": "2019-08-24T14:15:22Z",  "passport_id": "string",  "public_url": "string",  "row_version": 1,  "serial_number": "string",  "status": "draft",  "withdrawn_at": "2019-08-24T14:15:22Z",  "withdrawn_reason": "string"}