Casey's TankLevelApi
Fuel tank telemetry. Reads the most recent tank level readings and accepts new tank level readings for Casey's fuel sites, with a v1 heartbeat health check.
Fuel tank telemetry. Reads the most recent tank level readings and accepts new tank level readings for Casey's fuel sites, with a v1 heartbeat health check.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/caseys-tanklevelapi"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.0.1
info:
title: TankLevelApi
description: This is the OpenAPI Document on Azure Functions
version: '1.0'
servers:
- url: https://esl.caseys.io/tanklevelapi
paths:
/v1/heartbeat:
get:
tags:
- v1
summary: v1 Gets the health of the API
description: Interrogates the state of the API and its dependencies to return the API health.
operationId: getHeartbeatV1
responses:
'200':
description: The status of the APIs health. Healthy if all dependency health checks pass. Unhealthy if
any dependency's health check fails, or if an exception occurs.
content:
application/json:
schema:
$ref: '#/components/schemas/heartbeatReportV1'
example:
status: string
'500':
description: An error occurred while processing the request.
content:
application/json:
schema:
$ref: '#/components/schemas/heartbeatReportV1'
example:
status: string
/v1/tanklevel/getmostrecentreadings:
get:
tags:
- tankLevels
summary: Get the most recent tank levels.
description: Gets the most recent tank level data.
operationId: getMostRecentTankLevels
parameters:
- name: limit
in: query
description: Format - int32. Limits the number of results returned in the list. The default value is 10,000.
schema:
type: integer
- name: lastSeenIndex
in: query
description: Format - int32. The last index returned from a previous result. Used to page through results
via the seek method. The default value is 0.
schema:
type: integer
- name: readingDate
in: query
description: Format - date-time (as date-time in RFC3339). The date to query tank level readings for. By
default the most recent readings available will be returned.
schema:
type: string
- name: readingHour
in: query
description: Format - int32. The hour to query tank level readings for. Uses 24 hour format. By default
the most recent readings available will be returned.
schema:
type: integer
- name: addedBy
in: query
description: The source to query tank level readings for by name. By default readings for all available
sources will be returned.
schema:
type: string
responses:
'200':
description: This resource represents the most recent tank level data.
content:
application/json:
schema:
$ref: '#/components/schemas/tankLevelGetEndpointPaginatedResultsV1'
example:
limit: 10
lastIndex: 1086
count: 10
hasMorePages: true
data:
- storeNumber: 1
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5572491+00:00'
fuelLevel: 50
waterLevel: 0
fuelVolume: 2000
temperature: 10
addedBy: TLSTank
errors: null
- storeNumber: 1
tankNumber: 2
readingDate: '2024-12-10T16:13:59.5572540+00:00'
fuelLevel: 60
waterLevel: 1
fuelVolume: 1000
temperature: 20
addedBy: TLSTank
errors: null
- storeNumber: 1
tankNumber: 3
readingDate: '2024-12-10T16:13:59.5572564+00:00'
fuelLevel: 70
waterLevel: 0
fuelVolume: 500
temperature: 30
addedBy: TLSTank
errors: null
- storeNumber: 2
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5572571+00:00'
fuelLevel: 90
waterLevel: 0
fuelVolume: 4000
temperature: 40
addedBy: TLSTank
errors: null
- storeNumber: 2
tankNumber: 2
readingDate: '2024-12-10T16:13:59.5572587+00:00'
fuelLevel: 100
waterLevel: 0
fuelVolume: 5000
temperature: 50
addedBy: TLSTank
errors: null
- storeNumber: 3
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5572593+00:00'
fuelLevel: 200
waterLevel: 0
fuelVolume: 1000
temperature: 10
addedBy: Insite360
errors: null
- storeNumber: 4
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5572598+00:00'
fuelLevel: 300
waterLevel: 0
fuelVolume: 1000
temperature: 0
addedBy: TLSTank
errors: null
- storeNumber: 4
tankNumber: 2
readingDate: '2024-12-10T16:13:59.5572602+00:00'
fuelLevel: 500
waterLevel: 0
fuelVolume: 1000
temperature: 0
addedBy: TLSTank
errors: null
- storeNumber: 4
tankNumber: 3
readingDate: '2024-12-10T16:13:59.5572621+00:00'
fuelLevel: 600
waterLevel: 2
fuelVolume: 1000
temperature: 0
addedBy: TLSTank
errors: null
- storeNumber: 4
tankNumber: 4
readingDate: '2024-12-10T16:13:59.5572633+00:00'
fuelLevel: 700
waterLevel: 0
fuelVolume: 1000
temperature: 0
addedBy: TLSTank
errors: null
'400':
description: The request received was in an invalid state or format.
content:
application/json:
schema:
$ref: '#/components/schemas/apiError'
example:
code: 0
message: string
'404':
description: No resource was found for the given identifier.
content:
application/json:
schema:
$ref: '#/components/schemas/apiError'
example:
code: 0
message: string
'500':
description: An error occurred while processing the request.
content:
application/json:
schema:
$ref: '#/components/schemas/apiError'
example:
code: 0
message: string
/v1/tanklevel/addlevels:
post:
tags:
- tankLevels
summary: Add tank levels.
description: Adds new tank level data.
operationId: postTankLevels
requestBody:
description: Tank level data to be added.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/tankLevelViewModelV1'
example:
- '{"storeNumber":63,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5309244+00:00","fuelLevel":9999.99,"waterLevel":999.99,"fuelVolume":9999,"temperature":9.0,"addedBy":"TLSTank","errors":null}'
responses:
'200':
description: This resource represents the result of tank level data insertion.
content:
application/json:
schema:
$ref: '#/components/schemas/tankLevelPostResponseV1'
example:
success:
- storeNumber: 1
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5662610+00:00'
fuelLevel: 50
waterLevel: 0
fuelVolume: 2000
temperature: 10
addedBy: TLSTank
errors: null
- storeNumber: 1
tankNumber: 2
readingDate: '2024-12-10T16:13:59.5662644+00:00'
fuelLevel: 60
waterLevel: 1
fuelVolume: 1000
temperature: 20
addedBy: TLSTank
errors: null
- storeNumber: 1
tankNumber: 3
readingDate: '2024-12-10T16:13:59.5662672+00:00'
fuelLevel: 70
waterLevel: 0
fuelVolume: 500
temperature: 30
addedBy: TLSTank
errors: null
- storeNumber: 2
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5662678+00:00'
fuelLevel: 90
waterLevel: 0
fuelVolume: 4000
temperature: 40
addedBy: TLSTank
errors: null
- storeNumber: 3
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5662686+00:00'
fuelLevel: 200
waterLevel: 0
fuelVolume: 1000
temperature: 10
addedBy: Insite360
errors: null
rejected:
- storeNumber: 1
tankNumber: 1
readingDate: '2024-12-10T16:13:59.5662694+00:00'
fuelLevel: 50
waterLevel: 0
fuelVolume: 2000
temperature: 10
addedBy: TLSTank
errors:
- Sample error message
'400':
description: The request received was in an invalid state or format.
content:
application/json:
schema:
$ref: '#/components/schemas/apiError'
example:
code: 0
message: string
'404':
description: No resource was found for the given identifier.
content:
application/json:
schema:
$ref: '#/components/schemas/apiError'
example:
code: 0
message: string
'500':
description: An error occurred while processing the request.
content:
application/json:
schema:
$ref: '#/components/schemas/apiError'
example:
code: 0
message: string
/openapi/V3.json:
get:
summary: Get OpenApi Specification
description: Gets the OpenApi specification in V3.json format with the parameters .
operationId: getOpenApiSpec
responses:
'200':
description: ''
components:
schemas:
apiError:
type: object
properties:
code:
type: integer
description: Status code of the error.
format: int32
message:
type: string
description: Message that describes the error.
heartbeatReportV1:
type: object
properties:
status:
type: string
tankLevelGetEndpointPaginatedResultsV1:
type: object
properties:
limit:
type: integer
description: Numerical limit of the queried tank level data.
format: int32
lastIndex:
type: integer
description: Last index of the tank level data in this result set.
format: int32
count:
type: integer
description: Numerical count of the tank level data in this result set.
format: int32
hasMorePages:
type: boolean
description: Flag indicating whether there are more results after the last index in this result set.
data:
type: array
items:
$ref: '#/components/schemas/tankLevelViewModelV1'
description: List of queried tank levels.
nullable: true
example: '{"limit":10,"lastIndex":1086,"count":10,"hasMorePages":true,"data":[{"storeNumber":1,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5572491+00:00","fuelLevel":50.0,"waterLevel":0.0,"fuelVolume":2000,"temperature":10.0,"addedBy":"TLSTank","errors":null},{"storeNumber":1,"tankNumber":2,"readingDate":"2024-12-10T16:13:59.557254+00:00","fuelLevel":60.0,"waterLevel":1.0,"fuelVolume":1000,"temperature":20.0,"addedBy":"TLSTank","errors":null},{"storeNumber":1,"tankNumber":3,"readingDate":"2024-12-10T16:13:59.5572564+00:00","fuelLevel":70.0,"waterLevel":0.0,"fuelVolume":500,"temperature":30.0,"addedBy":"TLSTank","errors":null},{"storeNumber":2,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5572571+00:00","fuelLevel":90.0,"waterLevel":0.0,"fuelVolume":4000,"temperature":40.0,"addedBy":"TLSTank","errors":null},{"storeNumber":2,"tankNumber":2,"readingDate":"2024-12-10T16:13:59.5572587+00:00","fuelLevel":100.0,"waterLevel":0.0,"fuelVolume":5000,"temperature":50.0,"addedBy":"TLSTank","errors":null},{"storeNumber":3,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5572593+00:00","fuelLevel":200.0,"waterLevel":0.0,"fuelVolume":1000,"temperature":10.0,"addedBy":"Insite360","errors":null},{"storeNumber":4,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5572598+00:00","fuelLevel":300.0,"waterLevel":0.0,"fuelVolume":1000,"temperature":0.0,"addedBy":"TLSTank","errors":null},{"storeNumber":4,"tankNumber":2,"readingDate":"2024-12-10T16:13:59.5572602+00:00","fuelLevel":500.0,"waterLevel":0.0,"fuelVolume":1000,"temperature":0.0,"addedBy":"TLSTank","errors":null},{"storeNumber":4,"tankNumber":3,"readingDate":"2024-12-10T16:13:59.5572621+00:00","fuelLevel":600.0,"waterLevel":2.0,"fuelVolume":1000,"temperature":0.0,"addedBy":"TLSTank","errors":null},{"storeNumber":4,"tankNumber":4,"readingDate":"2024-12-10T16:13:59.5572633+00:00","fuelLevel":700.0,"waterLevel":0.0,"fuelVolume":1000,"temperature":0.0,"addedBy":"TLSTank","errors":null}]}'
tankLevelPostResponseV1:
type: object
properties:
success:
type: array
items:
$ref: '#/components/schemas/tankLevelViewModelV1'
description: List of tank levels that were successfully inserted into the system.
rejected:
type: array
items:
$ref: '#/components/schemas/tankLevelViewModelV1'
description: List of tank levels that failed validation checks.
example: '{"success":[{"storeNumber":1,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.566261+00:00","fuelLevel":50.0,"waterLevel":0.0,"fuelVolume":2000,"temperature":10.0,"addedBy":"TLSTank","errors":null},{"storeNumber":1,"tankNumber":2,"readingDate":"2024-12-10T16:13:59.5662644+00:00","fuelLevel":60.0,"waterLevel":1.0,"fuelVolume":1000,"temperature":20.0,"addedBy":"TLSTank","errors":null},{"storeNumber":1,"tankNumber":3,"readingDate":"2024-12-10T16:13:59.5662672+00:00","fuelLevel":70.0,"waterLevel":0.0,"fuelVolume":500,"temperature":30.0,"addedBy":"TLSTank","errors":null},{"storeNumber":2,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5662678+00:00","fuelLevel":90.0,"waterLevel":0.0,"fuelVolume":4000,"temperature":40.0,"addedBy":"TLSTank","errors":null},{"storeNumber":3,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5662686+00:00","fuelLevel":200.0,"waterLevel":0.0,"fuelVolume":1000,"temperature":10.0,"addedBy":"Insite360","errors":null}],"rejected":[{"storeNumber":1,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5662694+00:00","fuelLevel":50.0,"waterLevel":0.0,"fuelVolume":2000,"temperature":10.0,"addedBy":"TLSTank","errors":["Sample
error message"]}]}'
tankLevelViewModelV1:
required:
- storeNumber
- tankNumber
- readingDate
- fuelLevel
- waterLevel
- fuelVolume
- addedBy
type: object
properties:
storeNumber:
type: integer
description: The number of the store this tank level reading was taken at.
format: int32
nullable: true
tankNumber:
type: integer
description: The number of the tank this reading was taken at.
format: int32
nullable: true
readingDate:
minLength: 1
type: string
description: The time this tank level reading was taken.
format: date-time
nullable: true
fuelLevel:
type: number
description: The fuel level (in inches) as of the time of this reading.
format: double
nullable: true
waterLevel:
type: number
description: The water level (in inches) as of the time of this reading.
format: double
nullable: true
fuelVolume:
type: integer
description: The fuel volume as of the time of this reading.
format: int32
nullable: true
temperature:
type: number
description: Tank temperature as of the time of this reading.
format: double
nullable: true
addedBy:
minLength: 1
type: string
description: Source of this tank level reading.
nullable: true
errors:
type: array
items:
type: string
description: List of validation errors encountered while processing incoming tank level readings.
nullable: true
example: '{"storeNumber":63,"tankNumber":1,"readingDate":"2024-12-10T16:13:59.5309244+00:00","fuelLevel":9999.99,"waterLevel":999.99,"fuelVolume":9999,"temperature":9.0,"addedBy":"TLSTank","errors":null}'
securitySchemes:
apiKeyHeader:
type: apiKey
name: Ocp-Apim-Subscription-Key
in: header
apiKeyQuery:
type: apiKey
name: subscription-key
in: query
security:
- apiKeyHeader: []
- apiKeyQuery: []