Skip to content
Catalog

A unit

Scope: readSee also:Authentication ·Errors ·Pagination ·Rate limits
GET
/batteries/{batteryId}

Any member.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

batteryId*string
Formatuuid

Response Body

The unit.

application/json
  1. response
battery_model_id*string
Formatuuid
battery_status*BatteryStatus
Value in"original""repurposed""reused""remanufactured""waste"
created_at*string
Formatdate-time
facility_id?string
Formatuuid
id*string
Formatuuid
identifiers_locked_at?string

Set when the identifiers were locked (pre-print) or first published; serial and model are fixed afterwards.

Formatdate-time
import_id?string

The import that created the unit.

Formatuuid
manufacturing_date?string
Formatdate
model_version_id*string
Formatuuid
passport_status*PassportStatus

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

Value in"draft""qr_locked""published""update_needed""suspended""withdrawn""deleted_recycled"
predecessor_battery_id?string

Second life: the unit this battery was repurposed, reused or remanufactured from.

Formatuuid
putting_into_service?string
Formatdate
row_version*RowVersion

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

Formatint64
Range1 <= value
serial_number*string
successor_battery_ids?array<>

Second life: the units made from this battery.

updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://example.com/api/v1/batteries/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "battery_model_id": "6a002912-62a3-4058-99d0-53cbf87e9e1c",  "battery_status": "original",  "created_at": "2019-08-24T14:15:22Z",  "facility_id": "82d24387-b696-4928-8926-f6f7f16d3353",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "identifiers_locked_at": "2019-08-24T14:15:22Z",  "import_id": "13230382-dadc-41f2-963d-e123bd5c0585",  "manufacturing_date": "2019-08-24",  "model_version_id": "337b5de9-de8e-4f60-90b9-4857763aa5cd",  "passport_status": "draft",  "predecessor_battery_id": "2d846581-4798-4b11-872b-c08d9dbbd2f8",  "putting_into_service": "2019-08-24",  "row_version": 1,  "serial_number": "string",  "successor_battery_ids": [    "5baa088d-7bb3-4e66-8627-37644733d9aa"  ],  "updated_at": "2019-08-24T14:15:22Z"}