Skip to content

API reference

Every operation of the published contract, with a playground and code samples.

The reference is generated from the published contract of the integration API (OpenAPI 3.0) when these pages are built. It shows exactly the operations an API key or a public call can use; the portal's own operations are not part of it (see Stability and versioning).

Basics

Base URLhttps://<your BatteryPass address>/api/v1 (see Environments)
AuthenticationAuthorization: Bearer bp_live_… with scope read, condition or import (Authentication)
FormatJSON, times in UTC, ids as UUIDs
ErrorsRFC 9457 Problem Details with a stable code (Errors)
ListsKeyset pagination with limit and cursor (Pagination)
Limits429 rate_limited with Retry-After (Rate limits)

Playground

Every operation page has a playground ("Try in Playground"). It sends the request from your browser to the BatteryPass instance these docs run on. Your key stays in this tab only (sessionStorage) and is sent without cookies; use a key with scope read for it.

Download the contract

  • openapi.json and openapi.yaml: the version these docs were built from.
  • /api/v1/openapi.json and /api/v1/openapi.yaml on your BatteryPass address: the version your instance serves right now.

All operations

Catalog

OperationRequestScope
Units (individual batteries) of the active organisationGET /batteriesread
The units as a spreadsheet with the import's columnsGET /batteries/exportread
A unitGET /batteries/{batteryId}read
List the battery models of the active organisationGET /battery-modelsread
A battery modelGET /battery-models/{modelId}read
Versions of a battery model, newest effective date firstGET /battery-models/{modelId}/versionsread
A model versionGET /model-versions/{versionId}read

Values

OperationRequestScope
Registry evaluation of the unit-level fieldsGET /batteries/{batteryId}/completenessread
Current unit-level values of a unitGET /batteries/{batteryId}/valuesread
All revisions of one unit-level value, newest firstGET /batteries/{batteryId}/values/{fieldKey}/historyread
Registry evaluation of the model-level fieldsGET /model-versions/{versionId}/completenessread
Current model-level values of a versionGET /model-versions/{versionId}/valuesread
All revisions of one model-level value, newest firstGET /model-versions/{versionId}/values/{fieldKey}/historyread

Evidence

OperationRequestScope
The evidence library, newest firstGET /evidenceread
One document with its revisions and where it is usedGET /evidence/{evidenceId}read
Download the fileGET /evidence/{evidenceId}/downloadread

Passports

OperationRequestScope
The passport of a unitGET /batteries/{batteryId}/passportread
The QR code of the unit's GS1 Digital LinkGET /batteries/{batteryId}/passport/qrread
The passport's registration with the EU registryGET /batteries/{batteryId}/passport/registrationread
The published versions of a unit's passport, newest firstGET /batteries/{batteryId}/passport/versionsread
One published version with its signed snapshot and validation reportGET /batteries/{batteryId}/passport/versions/{versionNo}read
The BatteryPass v2.0 export of a version (all tiers)GET /batteries/{batteryId}/passport/versions/{versionNo}/batterypass-v2read
What changed from an earlier version to this oneGET /batteries/{batteryId}/passport/versions/{versionNo}/diffread
A PDF of a version with every tier, restricted rows tagged, the signature and the QR codeGET /batteries/{batteryId}/passport/versions/{versionNo}/pdfread

Lifecycle

OperationRequestScope
The condition data of a unit (the registry's dynamic fields)GET /batteries/{batteryId}/conditionread
Report measured condition data (merge)PATCH /batteries/{batteryId}/conditioncondition
The lifecycle of a unit, newest firstGET /batteries/{batteryId}/lifecycle-eventsread
Record an event in the life of a unitPOST /batteries/{batteryId}/lifecycle-eventscondition

Registry

Facilities

OperationRequestScope
Manufacturing facilities of the active organisationGET /facilitiesread

Public

OperationRequestScope
The public passport of a unit, looked up by GTIN and serial numberGET /public/dpps/by-product-id/{productId}public
The public passport (current version)GET /public/passports/{passportId}public
A public document of a public passportGET /public/passports/{passportId}/documents/{documentId}public
Check the signatures of a version on the serverGET /public/passports/{passportId}/verifypublic
The public passport as it was at a point in timeGET /public/passports/{passportId}/versionpublic

Changes

OperationRequestScope
The organisation's changes, oldest first, for pollingGET /changesread

Imports

OperationRequestScope
Imports of the active organisation, newest firstGET /importsimport
Upload a spreadsheet of unitsPOST /importsimport
One import with its mapping and summaryGET /imports/{importId}import
Map the columns of an importPUT /imports/{importId}/mappingimport
Start validating every row of an importPOST /imports/{importId}/validateimport