Recipes
Short, runnable programs for common integration jobs, each in cURL, TypeScript, Python and Go.
A recipe is one small program that does one job end to end. Copy it, set BATTERYPASS_URL and
BATTERYPASS_API_KEY (see the Quickstart), replace the placeholder where it reads your
own data, and run it. Each recipe comes as a shell script with curl and jq, and in TypeScript (Node 20+),
Python 3 with requests and Go with the standard library.
Nightly condition push
Send last night's measurements of every unit with updateCondition, with backoff on 429.
QR labels for a batch
Download an SVG QR code for every published unit of a production batch.
Data warehouse sync
Write every unit with its current values to a JSON Lines file.
Verify signatures
Check the signatures of a list of public passports offline.
Published passports of a model
List passport id, version and public link of every published unit of a model as CSV.
The Guides explain the operations behind these recipes in more depth, including the errors to expect.