Fleetkeep Imports API

Preview and explicitly confirm fleet spreadsheet imports.

GitHub OpenAPI

Operations 4

POST /api/v1/imports/vehicles/preview Preview a fleet spreadsheet without writing data #
POST /api/v1/imports/vehicles/apply Apply the exact previously previewed spreadsheet #
POST /api/v1/tolls/imports/preview Preview a bounded fleet toll statement without writing #
POST /api/v1/tolls/imports/apply Apply the exact previously previewed toll statement #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/fleetkeep-co-uk:fleetkeep-co-uk-imports-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

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 Specification

fleetkeep-co-uk-imports-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fleetkeep Co Uk Imports API
  version: 0.8.0
  contact:
    name: Fleetkeep partner integration
    url: https://fleetkeep.co.uk/contact
    email: hello@fleetkeep.co.uk
  license:
    name: Proprietary
    url: https://fleetkeep.co.uk/legal/terms
  description: 'Operations tagged Imports across 2 of this provider''s published API definitions: openapi.json, fleetkeep-co-uk-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://fleetkeep.co.uk
  description: Production
security:
- oauth2:
  - vehicles:read
tags:
- name: Imports
  description: Preview and explicitly confirm fleet spreadsheet imports.
paths:
  /api/v1/imports/vehicles/preview:
    post:
      tags:
      - Imports
      summary: Preview a fleet spreadsheet without writing data
      operationId: previewVehicleImport
      security:
      - oauth2:
        - vehicles:read
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpreadsheetPayload'
      responses:
        '200':
          description: Read-only preview with a content digest required for apply.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleImportPreview'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://fleetkeep.co.uk
      description: Production
  /api/v1/imports/vehicles/apply:
    post:
      tags:
      - Imports
      summary: Apply the exact previously previewed spreadsheet
      description: Requires identical spreadsheet bytes and file digest, the same selectedRows and selection digest, and a stable 8-128 character idempotency key bound to the file, selection and offset. Bounded requests save at most five rows and return nextOffset; no server loop. Legacy requests without offset support at most 50 selected rows. Account allowance applies to unique new registrations across the whole selection. Existing vehicle dates and current equipment are not overwritten.
      operationId: applyVehicleImport
      security:
      - oauth2:
        - vehicles:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplySpreadsheetPayload'
      responses:
        '200':
          description: Import outcomes. A repeated idempotency key returns the recorded result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VehicleImportResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: The confirmation digest does not match the uploaded bytes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://fleetkeep.co.uk
      description: Production
  /api/v1/tolls/imports/preview:
    post:
      tags:
      - Imports
      summary: Preview a bounded fleet toll statement without writing
      operationId: previewTollImport
      security:
      - oauth2:
        - tolls:read
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TollImportPayload'
      responses:
        '200':
          description: Read-only preview bound to the exact CSV bytes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TollImportPreview'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://fleetkeep.co.uk
      description: Production
  /api/v1/tolls/imports/apply:
    post:
      tags:
      - Imports
      summary: Apply the exact previously previewed toll statement
      description: Requires the same CSV bytes, the preview digest and an Idempotency-Key. At most 500 charge rows are accepted.
      operationId: applyTollImport
      security:
      - oauth2:
        - tolls:write
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TollImportApplyPayload'
      responses:
        '200':
          description: Idempotent replay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TollImportResult'
        '201':
          description: Applied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TollImportResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
    servers:
    - url: https://fleetkeep.co.uk
      description: Production
components:
  schemas:
    TollImportRow:
      type: object
      additionalProperties: false
      required:
      - rowNumber
      - registration
      - providerName
      - chargedOn
      - amountPence
      - chargeType
      - location
      - outcome
      properties:
        rowNumber:
          type: integer
          minimum: 2
          maximum: 501
        registration:
          type: string
        providerName:
          type: string
        chargedOn:
          type: string
          format: date
        amountPence:
          type: integer
          minimum: 0
        chargeType:
          type: string
        location:
          type:
          - string
          - 'null'
        outcome:
          type: string
          enum:
          - importable
          - duplicate
          - unknown_vehicle
    Error:
      type: object
      additionalProperties: false
      required:
      - error
      properties:
        error:
          type: string
          example: registration_required
    TollImportPayload:
      type: object
      additionalProperties: false
      required:
      - sourceName
      - csv
      properties:
        sourceName:
          type: string
          pattern: \.[cC][sS][vV]$
          maxLength: 160
        csv:
          type: string
          description: UTF-8 CSV content, limited to 262,144 bytes.
          x-maxBytes: 262144
    ActionConfirmationRequired:
      type: object
      required:
      - error
      - confirmationToken
      - expiresAt
      properties:
        error:
          type: string
          const: confirmation_required
        confirmationToken:
          type: string
        expiresAt:
          type: string
          format: date-time
      additionalProperties: false
    TollImportPreview:
      type: object
      additionalProperties: false
      required:
      - sourceName
      - digest
      - rowCount
      - importableCount
      - duplicateCount
      - unknownCount
      - detectedProviderName
      - rows
      - rowsTruncated
      - confirmationRequired
      properties:
        sourceName:
          type: string
        digest:
          type: string
          pattern: ^[a-f0-9]{64}$
        rowCount:
          type: integer
          minimum: 1
          maximum: 500
        importableCount:
          type: integer
          minimum: 0
          maximum: 500
        duplicateCount:
          type: integer
          minimum: 0
          maximum: 500
        unknownCount:
          type: integer
          minimum: 0
          maximum: 500
        detectedProviderName:
          type:
          - string
          - 'null'
        rows:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/TollImportRow'
        rowsTruncated:
          type: boolean
        confirmationRequired:
          type: boolean
          const: true
    TollImportApplyPayload:
      type: object
      additionalProperties: false
      required:
      - sourceName
      - csv
      - confirmDigest
      properties:
        sourceName:
          type: string
          pattern: \.[cC][sS][vV]$
          maxLength: 160
        csv:
          type: string
          description: UTF-8 CSV content, limited to 262,144 bytes.
          x-maxBytes: 262144
        confirmDigest:
          type: string
          pattern: ^[a-f0-9]{64}$
    ApplySpreadsheetPayload:
      allOf:
      - $ref: '#/components/schemas/SpreadsheetPayload'
      - type: object
        required:
        - confirmDigest
        - idempotencyKey
        properties:
          confirmDigest:
            type: string
            pattern: ^[a-f0-9]{64}$
          idempotencyKey:
            type: string
            minLength: 8
            maxLength: 128
            pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$
          offset:
            type: integer
            minimum: 0
            maximum: 999
            description: Position within the sorted selected rows. Required for batches; each request applies at most five rows.
          confirmSelectionDigest:
            type: string
            pattern: ^[a-f0-9]{64}$
            description: Exact selectionDigest from preview. Required when offset is supplied.
    TollImportResult:
      type: object
      additionalProperties: false
      required:
      - batchId
      - imported
      - duplicates
      - unknown
      - detectedProviderName
      - replay
      properties:
        batchId:
          type: string
          format: uuid
        imported:
          type: integer
          minimum: 0
          maximum: 500
        duplicates:
          type: integer
          minimum: 0
          maximum: 500
        unknown:
          type: integer
          minimum: 0
          maximum: 500
        detectedProviderName:
          type:
          - string
          - 'null'
        replay:
          type: boolean
    VehicleImportResult:
      type: object
      required:
      - summary
      - outcomes
      properties:
        replayed:
          type: boolean
        summary:
          type: object
        outcomes:
          type: array
          items:
            type: object
        batch:
          type: object
          description: Present for bounded requests. Every requested sourceLine has exactly one outcome; stop if the envelope or summary is incomplete.
          required:
          - batchSize
          - totalRows
          - sourceRows
          - sourceLines
          - offset
          - selectionDigest
          - nextOffset
          properties:
            batchSize:
              type: integer
              const: 5
            totalRows:
              type: integer
              minimum: 1
              maximum: 1000
            sourceRows:
              type: array
              minItems: 1
              maxItems: 5
              uniqueItems: true
              items:
                type: integer
                minimum: 0
                maximum: 999
            sourceLines:
              type: array
              minItems: 1
              maxItems: 5
              uniqueItems: true
              items:
                type: integer
                minimum: 1
            offset:
              type: integer
              minimum: 0
              maximum: 999
            selectionDigest:
              type: string
              pattern: ^[a-f0-9]{64}$
            nextOffset:
              type:
              - integer
              - 'null'
              minimum: 1
              maximum: 999
    SpreadsheetPayload:
      oneOf:
      - type: object
        required:
        - sourceName
        - csv
        properties:
          sourceName:
            type: string
            pattern: ^.*\.[cC][sS][vV]$
            maxLength: 160
          csv:
            type: string
            maxLength: 262144
          selectedRows:
            type: array
            minItems: 1
            maxItems: 1000
            uniqueItems: true
            items:
              type: integer
              minimum: 0
              maximum: 999
            description: Original zero-based data-row indices, excluding the header. Omission selects all rows. Repeat the same selection on preview and apply.
      - type: object
        required:
        - sourceName
        - contentBase64
        properties:
          sourceName:
            type: string
            pattern: ^.*\.[xX][lL][sS][xX]$
            maxLength: 160
          contentBase64:
            type: string
            contentEncoding: base64
          selectedRows:
            type: array
            minItems: 1
            maxItems: 1000
            uniqueItems: true
            items:
              type: integer
              minimum: 0
              maximum: 999
            description: Original zero-based data-row indices, excluding the header. Omission selects all rows. Repeat the same selection on preview and apply.
    VehicleImportPreview:
      type: object
      required:
      - sourceName
      - digest
      - preview
      - rows
      - confirmationRequired
      - selectionDigest
      - batching
      - capacity
      properties:
        sourceName:
          type: string
        digest:
          type: string
          pattern: ^[a-f0-9]{64}$
        confirmationRequired:
          type: boolean
          const: true
        preview:
          type: object
        rows:
          type: array
          items:
            type: object
        selectionDigest:
          type: string
          pattern: ^[a-f0-9]{64}$
        batching:
          type: object
          required:
          - batchSize
          - totalRows
          - sourceRows
          - sourceLines
          properties:
            batchSize:
              type: integer
              const: 5
            totalRows:
              type: integer
              minimum: 1
              maximum: 1000
            sourceRows:
              type: array
              minItems: 1
              maxItems: 1000
              uniqueItems: true
              items:
                type: integer
                minimum: 0
                maximum: 999
            sourceLines:
              type: array
              minItems: 1
              maxItems: 1000
              uniqueItems: true
              items:
                type: integer
                minimum: 1
        capacity:
          type: object
          required:
          - canImport
          - currentVehicleCount
          - vehicleLimit
          - newVehicleCount
          - requiredVehicleCount
          properties:
            canImport:
              type: boolean
            currentVehicleCount:
              type: integer
              minimum: 0
            vehicleLimit:
              type:
              - integer
              - 'null'
              minimum: 0
            newVehicleCount:
              type: integer
              minimum: 0
            requiredVehicleCount:
              type: integer
              minimum: 0
            error:
              type: string
  responses:
    Unauthorized:
      description: Missing or invalid Bearer access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Per-token rate limit exceeded (60 requests per minute).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Confirmation is required or the supplied confirmation is invalid, stale, replayed or bound to different content.
      content:
        application/json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/ActionConfirmationRequired'
            - $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request body or query was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Token does not include the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 120
        pattern: ^[A-Za-z0-9._:-]+$
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.1 authorisation-code flow with PKCE (S256). End-user delegates per-vehicle access to a partner client. Access tokens expire after 1 hour; refresh tokens (granted with the offline_access scope) live for 30 days.
      flows:
        authorizationCode:
          authorizationUrl: https://fleetkeep.co.uk/auth/oauth2/authorize
          tokenUrl: https://fleetkeep.co.uk/auth/oauth2/token
          refreshUrl: https://fleetkeep.co.uk/auth/oauth2/token
          scopes:
            vehicles:read: Read the authorised user's vehicles and compliance dates.
            vehicles:write: Add, update, delete and bulk-add vehicles on the authorised user's behalf.
            maintenance:read: Read the authorised user's maintenance tasks and completed history.
            maintenance:write: Create, update, complete and cancel the authorised user's maintenance tasks.
            operations:read: Read the authorised user's tracking snapshots, Wex route data and operational defect records.
            operations:write: Report and complete defects on the authorised user's behalf.
            tolls:read: Read the authorised user's toll and clean-air account records, charges and statement previews.
            tolls:write: Create toll and clean-air records and apply confirmed statement imports on the authorised user's behalf.
            documents:read: List and download the authorised user's private vehicle documents.
            documents:write: Create private vehicle document records and uploads on the authorised user's behalf.
            reminders:read: Read reminder settings and contacts.
            reminders:write: Manage reminder settings and contacts, and explicitly confirm verification sends.
            profile:read: Read the authorised user's Fleetkeep account profile.
            guidance:read: Read the authorised user's approved driver guidance and private guidance document.
            exports:read: Download the authorised user's private account and fleet spreadsheet exports.
            offline_access: Issue a refresh token so the partner can refresh access without re-prompting the user.
x-refined-from:
- openapi.json
- fleetkeep-co-uk-openapi.json
x-provenance:
  method: harvested
  publisher: Fleetkeep
  source: https://fleetkeep.co.uk/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)