Skip to content

Tank

The tank resource.

Base/tank
GET/tank

List tanks

Retrieve a paginated list of tanks. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/tank
curl --request GET \
  --url '<your-host>/tank?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "owner": "string",
    "status": "string",
    "createdBy": "string",
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-01-01T00:00:00Z",
    "customerId": "xyz789"
  }
]
GET/tank

Retrieve a tank

Fetch a single tank by filtering on `id`.

Query parameters

idstring

Match on the tank's `id`, e.g. `eq.{id}`.

GET/tank
curl --request GET \
  --url '<your-host>/tank?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "owner": "string",
  "status": "string",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "customerId": "xyz789"
}
POST/tank

Create a tank

Create a new tank.

Body parameters

companyIdstringrequired

References company.id

customerIdstring

References customer.id

customerLocationIdstring

References customerLocation.id

waterCapacityGalnumber
usableCapacityGalnumber
ownerstringrequired
serialNumberstring
installDatedate
lastInspectionDatedate
statusstringrequired
deliveryModetankDeliveryMode

Standing delivery preference for this tank. Null is unknown. Never inferred from sensor provider or an individual order.

priceCodestring

The price class this tank is priced under; fuelPriceCode carries the class's price.

optimalDeliveryGallonsnumber

The drop the business plans at this tank, in gallons.

ticketCreationThresholdPercentnumber

The tank level, in percent, at which an automatic delivery ticket is raised.

inactiveDatedate
readableIdstring
POST/tank
curl --request POST \
  --url <your-host>/tank \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789","owner":"string","status":"string"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "owner": "string",
  "status": "string",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "customerId": "xyz789"
}
PATCH/tank

Update a tank

Update an existing tank, matched on `id`.

Body parameters

companyIdstringrequired

References company.id

customerIdstring

References customer.id

customerLocationIdstring

References customerLocation.id

waterCapacityGalnumber
usableCapacityGalnumber
ownerstringrequired
serialNumberstring
installDatedate
lastInspectionDatedate
statusstringrequired
deliveryModetankDeliveryMode

Standing delivery preference for this tank. Null is unknown. Never inferred from sensor provider or an individual order.

priceCodestring

The price class this tank is priced under; fuelPriceCode carries the class's price.

optimalDeliveryGallonsnumber

The drop the business plans at this tank, in gallons.

ticketCreationThresholdPercentnumber

The tank level, in percent, at which an automatic delivery ticket is raised.

inactiveDatedate
readableIdstring
PATCH/tank
curl --request PATCH \
  --url '<your-host>/tank?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "owner": "string",
  "status": "string",
  "createdBy": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "updatedAt": "2026-01-01T00:00:00Z",
  "customerId": "xyz789"
}
DELETE/tank

Delete a tank

Delete a tank, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the tank to delete, e.g. `eq.{id}`.

DELETE/tank
curl --request DELETE \
  --url '<your-host>/tank?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content