> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve an export

> Retrieves an export. While `status` is `COMPLETE`, `download_url` carries the download link, which works until `time_expiry`: 24 hours after the export completed. After that the export is `EXPIRED` and the file is gone, so create the export again.



## OpenAPI

````yaml fleet-api/reference/flatpeak-api-spec-fleet.json GET /exports/{export_id}
openapi: 3.0.3
info:
  description: >-
    The Flatpeak Fleet API. VPP operators use it to enroll, dispatch and settle
    OEM device fleets.


    ## Authentication

    Exchange your `account_id` and `secret_key` for a bearer token at `POST
    /auth/tokens` with basic auth. Send it as `Authorization: Bearer <token>` on
    every request.


    ## Base URL

    `https://fleet-api.flatpeak.com`


    ## Pagination

    Lists return `data`, `next_cursor` and `url`. Pass `next_cursor` as `cursor`
    until it is `null`. A cursor is opaque and bound to the endpoint and query
    parameters that issued it.


    ## Errors

    Every non-2xx response carries `object`, `type`, `code` and `message`.
    Branch on `code`.


    ## Money and energy

    Money is a decimal number paired with a `currency_code` (ISO 4217). Power is
    in kW and energy in kWh. Positive is import, negative is export.


    ## Live and test

    `live_mode` marks live or test data.
  version: 2027-01-01.busbar
  title: Flatpeak Fleet API
  termsOfService: https://flatpeak.com/legal
  contact:
    name: Technical Support
    email: support@flatpeak.com
    url: https://flatpeak.com/contact
  license:
    name: Apache 2.0
    url: https://flatpeak.com/legal
servers:
  - url: https://fleet-api.flatpeak.com
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: >-
      Exchange your account credentials for a bearer token to authenticate API
      requests.
  - name: Connect
    description: >-
      Create and retrieve Connect sessions for onboarding customers through your
      own app.
  - name: OEMs
    description: List and retrieve the OEMs whose devices your fleet can reach.
  - name: Devices
    description: >-
      Retrieve, list and update the devices connected to your account, and read
      their consent history and shared settings.
  - name: Locations
    description: >-
      Read the location a device sits behind: its timezone, currency, metering
      and your devices there.
  - name: Dispatch
    description: Submit plans to devices on managed tariffs and read the dispatch timeline.
  - name: Telemetry
    description: Read device state, device meter records and location meter records.
  - name: Tariffs
    description: Create, retrieve, delete, and list tariffs.
  - name: Events
    description: Retrieve and list account events.
  - name: VPP Programs
    description: >-
      Define and manage VPP programs: the commercial terms devices enroll under,
      and their live state.
  - name: Groups
    description: >-
      Named collections of devices for bulk dispatch and aggregated reads. OEMs
      see them read-only as [groups](/energy-api/reference/groups/list) on the
      Energy API.
  - name: Zones
    description: >-
      Network areas resolved to devices by Flatpeak, for locational eligibility
      and grouping without handling addresses.
  - name: Exports
    description: >-
      Package settlement evidence, consent records and enrollment registers as
      downloadable files.
  - name: Rewards
    description: >-
      The reward ledger: entries accrue from delivery, you approve them, pay the
      customers and mark them paid.
  - name: VPP Enrollments
    description: Track and act on device enrollments across your programs.
  - name: VPP Events
    description: >-
      Commit market activations: create an event for a group, then read its
      state and its devices' results.
externalDocs:
  description: Documentation
  url: https://docs.flatpeak.com
paths:
  /exports/{export_id}:
    parameters:
      - schema:
          type: string
        name: export_id
        in: path
        required: true
        description: Flatpeak Export ID.
    get:
      tags:
        - Exports
      summary: Retrieve an export
      description: >-
        Retrieves an export. While `status` is `COMPLETE`, `download_url`
        carries the download link, which works until `time_expiry`: 24 hours
        after the export completed. After that the export is `EXPIRED` and the
        file is gone, so create the export again.
      operationId: retrieve-an-export
      parameters: []
      responses:
        '200':
          $ref: '#/components/responses/Export'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
components:
  responses:
    '401':
      description: '401 Unauthorized: authentication credentials are missing or invalid.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '403':
      description: '403 Forbidden: you do not have permission to access this resource.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: '404 Not Found: the requested resource does not exist.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '429':
      description: '429 Too Many Requests: the rate limit has been exceeded.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: >-
        500 Internal Server Error: an unexpected error occurred. Safe to retry
        with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '503':
      description: >-
        503 Service Unavailable: the service is temporarily down for
        maintenance. Retry after the indicated delay.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Export:
      description: Export response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Export'
          example:
            id: exp_4d8e2f6a0b1c3d5e7f9a1b3c
            object: export
            live_mode: true
            type: SETTLEMENT_EVIDENCE
            program_id: vpr_5c8d1f2a7b3e4d6c9a0f1b2c
            group_id: null
            start_time: '2026-08-01T00:00:00Z'
            end_time: '2026-09-01T00:00:00Z'
            format: JSON
            status: COMPLETE
            failure_reason: null
            download_url: >-
              https://exports.flatpeak.com/exp_4d8e2f6a0b1c3d5e7f9a1b3c.json?token=4f6c1e9a7b2d
            time_expiry: '2026-09-03T09:34:10Z'
            time_created: '2026-09-02T09:30:00Z'
            account_id: acc_6a5e504c3b98d0d6739b5f72
  schemas:
    Export:
      title: Export
      type: object
      description: >-
        An asynchronous export. See `type` for what each packages. The file can
        be downloaded for 24 hours after the export completes.
      properties:
        id:
          type: string
          description: Flatpeak Export ID.
          example: exp_4d8e2f6a0b1c3d5e7f9a1b3c
        object:
          type: string
          example: export
          description: Object type, `export`.
          enum:
            - export
        live_mode:
          type: boolean
          description: '`true` for live data, `false` for test data.'
          example: true
        type:
          type: string
          enum:
            - SETTLEMENT_EVIDENCE
            - CONSENT_RECORDS
          description: >-
            `SETTLEMENT_EVIDENCE`: one row per commitment, with the device meter
            records behind each delivery. `CONSENT_RECORDS`: one row per consent
            grant or revocation.
          example: SETTLEMENT_EVIDENCE
        program_id:
          type: string
          nullable: true
          description: >-
            The program the export is scoped to. `null` when it is scoped to a
            group.
          example: vpr_5c8d1f2a7b3e4d6c9a0f1b2c
        group_id:
          type: string
          nullable: true
          description: >-
            The group the export is scoped to. `null` when it is scoped to a
            program.
          example: null
        start_time:
          type: string
          format: date-time
          description: Start of the exported period, in UTC.
          example: '2026-08-01T00:00:00Z'
        end_time:
          type: string
          format: date-time
          description: End of the exported period, in UTC.
          example: '2026-09-01T00:00:00Z'
        format:
          type: string
          enum:
            - CSV
            - JSON
          description: File format of the download.
          example: CSV
        status:
          type: string
          enum:
            - PROCESSING
            - COMPLETE
            - EXPIRED
            - FAILED
          example: COMPLETE
          description: >-
            | Value | Meaning |

            | :--- | :--- |

            | `PROCESSING` | The file is being built. `export.complete` fires
            when it is ready |

            | `COMPLETE` | The file is ready at `download_url` |

            | `EXPIRED` | The file was deleted, 24 hours after the export
            completed. Create the export again |

            | `FAILED` | The file could not be built. See `failure_reason` |
        failure_reason:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Why the export failed. `null` unless `status` is `FAILED`. Recreate
            the export to retry.
          example: null
        download_url:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Download URL of the file. Set while `status` is `COMPLETE`, and
            valid until `time_expiry`; `null` in every other status.
        time_expiry:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          example: '2026-09-03T09:34:10Z'
          description: >-
            Time when `download_url` stops working and the file is deleted, in
            UTC: 24 hours after the export completed. `null` until `status` is
            `COMPLETE`.
        time_created:
          type: string
          format: date-time
          description: Time when the object was created, in UTC.
          example: '2026-08-12T09:30:00Z'
        account_id:
          type: string
          description: Flatpeak Account ID of the operator that owns the export.
          example: acc_649d465ede6a785d2fa5f905
      required:
        - id
        - object
        - live_mode
        - type
        - program_id
        - group_id
        - start_time
        - end_time
        - format
        - status
        - failure_reason
        - download_url
        - time_expiry
        - time_created
        - account_id
    Error:
      type: object
      description: Standard error envelope returned by every non-2xx response.
      required:
        - object
        - type
        - code
        - message
      properties:
        object:
          type: string
          enum:
            - error
          default: error
          description: Object type.
        type:
          type: string
          description: High-level error category.
          example: invalid_request
        code:
          type: string
          description: Machine-readable error code, safe to branch on.
          example: access_denied
        message:
          type: string
          description: Human-readable description of the error.
          example: The requested resource could not be found.
        context:
          type: string
          description: Optional originating context, for example `api.price_get`.
          example: api.price_get
        live_mode:
          type: boolean
          description: Whether the error occurred against live or test data.
        time_created:
          type: string
          format: date-time
          description: Time the error was generated (RFC 3339).
          example: '2026-01-01T00:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with the `bearer_token` obtained from the
        [authentication](/fleet-api/reference/authentication) endpoint.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.