Integration Tank Readings All
POST/v1/tank_readings/all
Fetch Latest Tank Readings
Retrieves the most recent inventory reading for each requested tank across one or more sites. For every site you may either list specific tank identifiers or omit them to fetch readings for all tanks on that site. Readings are pulled from the inventory management system (IMS) within a configurable lookback window, and only the latest reading per tank is returned.
When the caller's token is scoped to a carrier, only tanks belonging to that carrier are included.
Request
store_tank_readings_reqs: list[StoreTankReadingsRequest] = []
One entry per site to fetch readings for. A site may not appear more than once. Omit or leave empty to fetch readings for every tank on every site (subject to carrier scope).
store_tank_readings_reqs[].store_number: str
Number of the site the readings are for.
store_tank_readings_reqs[].tank_ids: list[int]
Tank identifiers to fetch readings for. Leave empty to fetch readings for every tank on the site.
lookback_window_hours: int = 48
How far back, in hours, to search for readings.
Response Structure
readings: list[TankReadingsResponse]
The latest reading for each requested tank. Tanks with no reading inside the lookback window are omitted.
readings[].store_number: str
Number of the site the reading is for.
readings[].tank_id: int
Identifier of the tank the reading is for.
readings[].measured_time: datetime
Time the reading was measured at the tank (UTC).
readings[].received_time: datetime
Time the reading was received/processed by IMS (UTC).
readings[].product: str | None
Product configured on the tank.
readings[].volume: float
Volume measured in the reading.
errors: list[str]
One message per unknown site or tank in the request. Readings for the valid sites/tanks are still returned in readings.
Errors
400 — A site is listed more than once in the request.
Responses
- 200
- 422
Successful Response
- application/json
- Example (from schema)
{
"readings": [
{
"store_number": "string",
"tank_id": 0,
"measured_time": "2026-08-12T21:46:34.425Z",
"received_time": "2026-08-12T21:46:34.425Z",
"product": "string",
"volume": 0
}
],
"errors": [
"string"
]
}
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}