Catalog
Units (individual batteries) of the active organisation
GET
Any member. Ordered by serial number, then id; filter by model, version, passport status, serial number prefix or the import that created the units.
apiKeyheader
AuthorizationBearer <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.
limit?integerMaximum number of items to return.
Range
1 <= value <= 200Default
50cursor?stringOpaque cursor from a previous page's next_cursor.
Length
1 <= length <= 512battery_model_id?stringFormat
uuidmodel_version_id?stringFormat
uuidpassport_status?stringStatus of a unit's passport (docs/domain-model.md §7).
Value in
"draft""qr_locked""published""update_needed""suspended""withdrawn""deleted_recycled"serial_prefix?stringLength
1 <= length <= 50import_id?stringFormat
uuidOne page of units.
application/json- response
items*array<>next_cursor*|Cursor for the next page, or null when this is the last page.
Example Request
curl -X GET 'https://example.com/api/v1/batteries'Example Response
{ "items": [ { "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" } ], "next_cursor": "string"}