Fleetio Fuel Entries API

The Fuel Entries API from Fleetio — 2 operation(s) for fuel entries.

OpenAPI Specification

fleetio-fuel-entries-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Fleetio Developer Contacts Fuel Entries API
  description: JSON REST API for the Fleetio fleet management platform. Manage vehicles, contacts, fuel entries, service entries, work orders, service reminders, parts and inventory, inspections, and issues, and register webhooks for event notifications. All access is over HTTPS and all data is sent and received as JSON.
  termsOfService: https://www.fleetio.com/legal/terms
  contact:
    name: Fleetio Developer Support
    url: https://developer.fleetio.com/
  version: '2025-05-05'
servers:
- url: https://secure.fleetio.com/api
  description: Fleetio production API
security:
- AuthorizationToken: []
  AccountToken: []
tags:
- name: Fuel Entries
paths:
  /v1/fuel_entries:
    get:
      operationId: listFuelEntries
      tags:
      - Fuel Entries
      summary: List fuel entries
      parameters:
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/StartCursor'
      responses:
        '200':
          description: A list of fuel entries.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FuelEntry'
    post:
      operationId: createFuelEntry
      tags:
      - Fuel Entries
      summary: Create a fuel entry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FuelEntry'
      responses:
        '201':
          description: The created fuel entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FuelEntry'
  /v1/fuel_entries/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getFuelEntry
      tags:
      - Fuel Entries
      summary: Get a fuel entry
      responses:
        '200':
          description: The requested fuel entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FuelEntry'
    patch:
      operationId: updateFuelEntry
      tags:
      - Fuel Entries
      summary: Update a fuel entry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FuelEntry'
      responses:
        '200':
          description: The updated fuel entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FuelEntry'
    delete:
      operationId: deleteFuelEntry
      tags:
      - Fuel Entries
      summary: Delete a fuel entry
      responses:
        '204':
          description: The fuel entry was deleted.
components:
  parameters:
    PerPage:
      name: per_page
      in: query
      required: false
      description: Number of records to return per page.
      schema:
        type: integer
        default: 50
        maximum: 100
    StartCursor:
      name: start_cursor
      in: query
      required: false
      description: Cursor for cursor-based pagination of list results.
      schema:
        type: string
    ResourceId:
      name: id
      in: path
      required: true
      description: The unique identifier of the resource.
      schema:
        type: integer
        format: int64
  schemas:
    FuelEntry:
      type: object
      properties:
        id:
          type: integer
          format: int64
          readOnly: true
        vehicle_id:
          type: integer
          format: int64
        date:
          type: string
          format: date-time
        us_gallons:
          type: number
        cost:
          type: number
        price_per_volume_unit:
          type: number
        total_amount:
          type: number
        usage_in_mi:
          type: number
        meter_value:
          type: number
        is_full:
          type: boolean
        personal:
          type: boolean
        vendor_id:
          type: integer
          format: int64
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
  securitySchemes:
    AuthorizationToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key associated with a Fleetio user, prefixed with the word "Token" (e.g. "Authorization: Token YOUR_API_KEY"). Generate keys at https://secure.fleetio.com/api_keys.'
    AccountToken:
      type: apiKey
      in: header
      name: Account-Token
      description: Account token identifying the Fleetio account.