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

# List all tariffs

> Returns active tariffs, most recent first. Filter by `location_id`, or by `device_id` for the tariffs at the device's current location.



## OpenAPI

````yaml fleet-api/reference/flatpeak-api-spec-fleet.json GET /tariffs
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:
  /tariffs:
    parameters: []
    get:
      tags:
        - Tariffs
      summary: List all tariffs
      description: >-
        Returns active tariffs, most recent first. Filter by `location_id`, or
        by `device_id` for the tariffs at the device's current location.
      operationId: list-tariffs
      parameters:
        - schema:
            type: string
          name: location_id
          in: query
          required: false
          description: Only tariffs at this location.
        - schema:
            type: string
            example: dev_63a6087272941ef077a8fd3e
          in: query
          name: device_id
          description: Only tariffs at the device's current location, resolved for you.
          required: false
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/TariffList'
        '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:
  parameters:
    cursor:
      name: cursor
      in: query
      required: false
      schema:
        type: string
      description: >-
        Pagination cursor. Pass `next_cursor` from the previous response
        unchanged; omit for the first page. A cursor used with different
        parameters returns `400 cursor_invalid`.
    limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 30
      description: >-
        Maximum number of objects to return per page. Between 1 and 100, default
        30. Values above 100 are clamped to 100.
  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'
    TariffList:
      description: Tariff list response.
      content:
        application/json:
          schema:
            type: object
            properties:
              object:
                type: string
                description: Object type, `list`.
                example: list
                enum:
                  - list
              url:
                type: string
                description: URL slug for the object.
                example: /tariffs
              next_cursor:
                type: string
                nullable: true
                description: >-
                  Cursor for the next page. Pass it as `cursor`. `null` on the
                  last page. Page until it is `null`, even if `data` is short or
                  empty.
                example: djF8ZXZ0fGE5ZjN8NjYxNjc3ODdjMTY1MmIzZmJlYmE1ZjAx
              data:
                type: array
                items:
                  $ref: '#/components/schemas/Tariff'
            required:
              - object
              - url
              - next_cursor
              - data
          example:
            object: list
            url: /tariffs
            next_cursor: null
            data:
              - id: trf_66ba584eb6923d7c3b942ef6
                object: tariff
                live_mode: true
                fallback: false
                location_id: loc_641b90b758fb8e6293716e40
                device_id: null
                connection_type: MANUAL
                connection_status: CONNECTED
                meter_records_required: false
                tariff_type: COMMODITY
                direction: IMPORT
                display_name: Two-rate home tariff
                timezone: America/Los_Angeles
                contract_start_date: '2026-07-01T00:00:00Z'
                contract_end_date: '2027-06-30T23:59:59Z'
                supplier:
                  id: sup_63a6087272921ef075a8fd3e
                  display_name: Phase Energy
                  logo_url: https://static.flatpeak.com/suppliers/phase-energy.png
                schedule:
                  - months:
                      - All
                    dates: []
                    days_and_hours:
                      - days:
                          - All
                        hours:
                          - valid_from: '00:00:00'
                            valid_to: '07:00:00'
                            rate:
                              vat_included: 'YES'
                              vat_percentage: 0.05
                              variables:
                                price: 0.12
                              expression: $price
                          - valid_from: '07:00:00'
                            valid_to: '00:00:00'
                            rate:
                              vat_included: 'YES'
                              vat_percentage: 0.05
                              variables:
                                price: 0.29
                              expression: $price
                time_created: '2026-07-01T09:12:00Z'
                oem_id: oem_6a3a8dada72cd0a249ff9528
  schemas:
    Tariff:
      type: object
      title: Tariff
      x-examples:
        Example 1:
          id: trf_66ba584eb6923d7c3b942ef6
          object: tariff
          live_mode: true
          fallback: false
          connection_type: DIRECT
          connection_status: CONNECTED
          tariff_type: COMMODITY
          direction: IMPORT
          display_name: Agile Octopus v3 2024
          timezone: Europe/London
          contract_start_date: '2026-01-24T00:00:00Z'
          contract_end_date: '2027-01-24T00:00:00Z'
          supplier:
            id: sup_63a6087272921ef075a8fd3e
            display_name: Octopus Energy
            logo_url: https://s.flatpeak.com/83b06a60e38c2.png
          schedule:
            - months:
                - All
              dates:
                - 24
              days_and_hours:
                - days:
                    - All
                  hours:
                    - valid_from: '05:00:00'
                      valid_to: '23:30:00'
                      rate:
                        vat_included: 'YES'
                        vat_percentage: 0.12
                        variables:
                          index: BELPEX
                          spread: 1.25
                          fees: 2.1
                          unit_scale: 0.01
                        expression: (($index + $spread + $fees) * $unit_scale)
          time_created: '2026-05-05T05:37:27Z'
          account_id: acc_661677911f2197045e6cf1b1
          location_id: loc_641b90b758fb8e6293716e40
      properties:
        id:
          type: string
          example: trf_66ba584eb6923d7c3b942ef6
          description: Flatpeak Tariff ID.
          pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
        object:
          type: string
          example: tariff
          description: Object type.
          enum:
            - tariff
          default: tariff
        live_mode:
          type: boolean
          description: '`true` for live data, `false` for test data.'
        fallback:
          type: boolean
          default: false
          description: '`true` when an estimated tariff is in use.'
        location_id:
          type: string
          example: loc_641b90b758fb8e6293716e40
          pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
          description: >-
            Flatpeak Location ID the tariff is connected at. Locations are
            scoped to the account that registered the device.
        device_id:
          type: string
          example: dev_63a6087272941ef077a8fd3e
          pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
          description: >-
            Flatpeak Device ID when this is a device tariff: a tariff that
            applies to one device only, while that device is at `location_id`.
            Absent on location tariffs.
        connection_type:
          type: string
          example: MANUAL
          description: >-
            How the tariff was connected: `MANUAL`, `LIBRARY`, `MARKET` or
            `DIRECT`. Set by Flatpeak.
          enum:
            - DIRECT
            - LIBRARY
            - MARKET
            - MANUAL
        connection_status:
          type: string
          example: CONNECTED
          description: >-
            Tariff connection status, as on the Connect tariffs summary.


            | Value | Meaning |

            | :--- | :--- |

            | `CONNECTED` | Live. A fallback tariff also reports `CONNECTED`,
            with `fallback` `true` |

            | `NOT_CONNECTED` | No tariff connected |

            | `ERROR_REPORTED` | The user reported an incorrect tariff; the
            report is open |

            | `ERROR` | The tariff could not be retrieved, for example a failing
            supplier connection |

            | `EXPIRED` | The connection expired; the user must reconnect |

            | `UPGRADE` | A better connection is available, usually a direct
            integration. Live until the user reconnects through Connect |
          enum:
            - CONNECTED
            - NOT_CONNECTED
            - ERROR_REPORTED
            - ERROR
            - EXPIRED
            - UPGRADE
        meter_records_required:
          type: boolean
          readOnly: true
          description: >-
            `true` when prices depend on how much energy was used, for example a
            tiered tariff. Costs and prices for the devices it applies to then
            need meter records.
          example: false
        tariff_type:
          type: string
          example: COMMODITY
          description: 'Tariff type: `COMMODITY` or `NON_COMMODITY`.'
          enum:
            - COMMODITY
            - NON_COMMODITY
        direction:
          type: string
          example: IMPORT
          description: >-
            Direction of energy flow: `IMPORT` (from grid) or `EXPORT` (to
            grid).
          enum:
            - IMPORT
            - EXPORT
        display_name:
          type: string
          example: Agile Octopus v3 2024
          description: Tariff display name.
        timezone:
          type: string
          description: Timezone at the location, tz database name such as `Europe/Berlin`.
          example: Europe/London
        contract_start_date:
          type: string
          example: '2026-01-24T00:00:00Z'
          format: date-time
          description: Start date of the energy supply contract.
        contract_end_date:
          type: string
          example: '2026-01-24T00:00:00Z'
          format: date-time
          description: End date of the energy supply contract.
        supplier:
          type: object
          description: >-
            The energy supplier of the supply contract, resolved from the
            creating account's supplier binding, or from the user's selection in
            Connect.
          required:
            - id
            - display_name
            - logo_url
          properties:
            id:
              type: string
              example: sup_63a6087272921ef075a8fd3e
              description: Flatpeak Supplier ID.
              pattern: ^[a-z]{2,4}_[A-Za-z0-9]+$
            display_name:
              type: string
              example: Octopus Energy
              description: Supplier display name.
            logo_url:
              type: string
              example: https://s.flatpeak.com/83b06a60e38c2.png
              description: Supplier logo URL.
          readOnly: true
        schedule:
          description: Tariff rate schedule defining rates by time of day and season.
          allOf:
            - $ref: '#/components/schemas/TariffSchedule'
        time_created:
          type: string
          format: date-time
          example: '2026-05-05T05:37:27Z'
          description: Time when the tariff was created.
        oem_id:
          type: string
          pattern: ^oem_[A-Za-z0-9]+$
          example: oem_6a3a8dada72cd0a249ff9528
          description: >-
            Flatpeak OEM ID: the OEM whose account holds the tariff, including a
            tariff you create.
      required:
        - id
        - object
        - live_mode
        - fallback
        - location_id
        - connection_type
        - connection_status
        - tariff_type
        - direction
        - display_name
        - timezone
        - contract_start_date
        - contract_end_date
        - supplier
        - schedule
        - time_created
        - oem_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'
    TariffSchedule:
      type: array
      title: TariffSchedule
      description: >-
        Rate schedule: an array of plans, each stating when it applies (months,
        dates, days, hours, in local time) and the rate for each period. Rates
        are expressions over declared variables.
      items:
        type: object
        properties:
          months:
            type: array
            description: Months the plan applies to, as 3-letter abbreviations, or `All`.
            items:
              type: string
              enum:
                - Jan
                - Feb
                - Mar
                - Apr
                - May
                - Jun
                - Jul
                - Aug
                - Sep
                - Oct
                - Nov
                - Dec
                - All
              example: All
              default: All
            minItems: 1
          dates:
            type: array
            description: >-
              Days of the month the plan applies to, as day numbers, for example
              `[1, 4, 12, 30]`. Leave empty (`[]`) to apply the plan to every
              day of the month.
            items:
              type: integer
              minimum: 1
              maximum: 31
              example: 24
          days_and_hours:
            type: array
            description: >-
              Days of the week and hours of the day when the plan applies. Each
              entry pairs a set of days with the hourly periods and the rate
              that applies in each period on those days.
            items:
              type: object
              properties:
                days:
                  type: array
                  description: >-
                    Days of the week the entry applies to: `Weekdays`,
                    `Weekend`, individual days as 3-letter abbreviations, or
                    `All`.
                  items:
                    type: string
                    enum:
                      - Weekdays
                      - Weekend
                      - Mon
                      - Tue
                      - Wed
                      - Thu
                      - Fri
                      - Sat
                      - Sun
                      - All
                    example: All
                    default: All
                  minItems: 1
                hours:
                  type: array
                  description: >-
                    Periods of the day and the rate that applies in each.
                    Periods must not overlap; a period whose `valid_to` equals
                    its `valid_from` (for example `00:00:00` to `00:00:00`)
                    covers the whole day.
                  items:
                    type: object
                    properties:
                      valid_from:
                        type: string
                        format: time
                        description: >-
                          Period start, local time of the location, formatted as
                          `HH:MM:SS`.
                        example: '05:00:00'
                        default: '00:00:00'
                      valid_to:
                        type: string
                        format: time
                        description: >-
                          Period end, local time of the location, formatted as
                          `HH:MM:SS`. Equal to `valid_from` for a period that
                          covers the whole day.
                        example: '23:30:00'
                        default: '00:00:00'
                      rate:
                        type: object
                        description: Rate that applies in the period.
                        properties:
                          vat_included:
                            type: string
                            enum:
                              - 'YES'
                              - 'NO'
                              - UNKNOWN
                            example: 'YES'
                            description: >-
                              Whether VAT is included in the price the
                              expression produces. `UNKNOWN` means the tariff
                              source did not state it.
                          vat_percentage:
                            type: number
                            example: 0.12
                            description: >-
                              VAT rate as a decimal fraction, where 1 = 100% and
                              0.1 = 10%. Required when `vat_included` is `NO` so
                              that Flatpeak can add VAT when pricing.
                          variables:
                            type: object
                            description: >-
                              Variables referenced by `expression`. Any variable
                              name is allowed. A numeric value is used as is; a
                              string value names a market index (see [market
                              indexes](https://flatpeak.com/coverage)) and
                              resolves to the wholesale price for each interval,
                              or `AUTO_WHOLESALE` to have Flatpeak pick the
                              index from the location's address. For example:
                              `{"index":"EPEX_FR","spread":1.25,"fees":2.10,"unit_scale":0.01}`.
                            additionalProperties:
                              oneOf:
                                - type: number
                                - type: string
                            example:
                              index: BELPEX
                              spread: 1.25
                              fees: 2.1
                              unit_scale: 0.01
                          expression:
                            type: string
                            example: (($index + $spread + $fees) * $unit_scale)
                            description: >-
                              Formula that produces the price for the period, in
                              the tariff's currency per kWh. Variables are
                              referenced with a `$` prefix and must be declared
                              in `variables`. A constant price is a number, for
                              example `0.24`. Arithmetic operators and
                              parentheses are supported. Other constructs are
                              restricted; contact [support](/support) for
                              details.
                        title: TariffScheduleRate
                        required:
                          - vat_included
                          - variables
                          - expression
                    title: TariffSchedulePeriod
                    required:
                      - valid_from
                      - valid_to
                      - rate
                  minItems: 1
              title: TariffScheduleDaysAndHours
              required:
                - days
                - hours
            minItems: 1
        title: TariffSchedulePlan
        required:
          - months
          - dates
          - days_and_hours
  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.