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

# Retrieve a price

> Returns energy price, by Location ID.



## OpenAPI

````yaml api-reference/anode/flatpeak-api-spec-anode.json POST /prices/{id}
openapi: 3.0.3
info:
  description: Flatpeak API
  version: 2025-09-14.anode
  title: Flatpeak 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://api.flatpeak.com
    description: Location
security: []
tags:
  - name: Consumption
    description: Consumption operations
  - name: Customers
    description: Customer operations
  - name: Devices
    description: Device operations
  - name: Meters
    description: Meter readings operations
  - name: Events
    description: Events operations
  - name: Login
    description: Bearer auth token operations
  - name: Connect
    description: Connect operations
  - name: Locations
    description: Location operations
  - name: Rates
    description: Rates operations
  - name: Costs
    description: Consumption cost calculations
  - name: Schedules
    description: Consumption schedules
  - name: Tariffs
    description: Tariff operations
  - name: Slots
    description: Slots operations
externalDocs:
  description: Location documentation
  url: https://docs.flatpeak.com
paths:
  /prices/{id}:
    parameters:
      - schema:
          type: string
          example: loc_66879edb94bf861548cb7428
        name: id
        in: path
        required: true
        description: Flatpeak Location ID
    post:
      tags:
        - Tariffs
      summary: Retrieve a price
      description: Returns energy price, by Location ID.
      operationId: retrieve-prices
      parameters: []
      requestBody:
        $ref: '#/components/requestBodies/PriceGet'
      responses:
        '200':
          $ref: '#/components/responses/Price'
        '403':
          $ref: '#/components/responses/403'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
      security:
        - bearerAuth: []
components:
  requestBodies:
    PriceGet:
      content:
        application/json:
          schema:
            type: object
            properties:
              start_time:
                title: Start time
                type: string
                x-stoplight:
                  id: c79w6hi61kg6t
                description: >-
                  RFC 3339 timestamp marking the start of the data window, e.g.
                  2023-06-15T09:00:00Z or 2023-06-15T08:00:00+01:00; use either
                  UTC or time offset—if offsets differ, `end_time` takes
                  precedence.
                x-error-message: must be in RFC 3339 format.
                format: date-time
                example: '2023-06-15T09:00:00Z'
              end_time:
                title: End time
                type: string
                x-stoplight:
                  id: 79e6mlaxpgl80
                description: >-
                  RFC 3339 timestamp marking the end of the data window, e.g.
                  2023-06-15T13:00:00Z or 2023-06-15T12:00:00+01:00; use either
                  UTC or time offset—if offsets differ, `end_time` takes
                  precedence; max range is 90 days.
                x-error-message: must be in RFC 3339 format.
                format: date-time
                example: '2023-06-15T23:00:00Z'
              tariff_direction:
                type: string
                x-stoplight:
                  id: eov3156hw58g7
                description: >-
                  Specifies the tariff direction; set to `IMPORT`, `EXPORT`, or
                  `LOCAL`. Defaults to `IMPORT`.
                example: IMPORT
            required:
              - end_time
  responses:
    '403':
      description: 403 forbidden
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                message: Bad credentials
            properties:
              object:
                type: string
                example: error
                x-stoplight:
                  id: gria4ysjd9zhk
                default: error
              type:
                type: string
                x-stoplight:
                  id: 7mhtfljidnqcu
                example: invalid_request
                default: invalid_request
              code:
                type: string
                x-stoplight:
                  id: sy7ljpdy5wdes
                example: access_denied
                default: access_denied
              time_created:
                type: string
                x-stoplight:
                  id: 84d5biv9dfbc9
                format: date-time
                example: '2025-01-01T00:00:00Z'
            required:
              - object
              - type
              - code
          examples: {}
    '422':
      description: 422 Data not available
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example:
                object: error
                type: api_error
                live_mode: false
                time_created: '2022-01-24T14:15:22.003'
                code: country_code_missing
                message: Country code is required
            properties:
              object:
                type: string
                x-stoplight:
                  id: 8tu6jw6w7a4ds
                default: error
                example: error
              type:
                type: string
                x-stoplight:
                  id: pi73vu0gm23xz
                example: invalid_request
                default: invalid_request
              context:
                type: string
                x-stoplight:
                  id: 86mrnnt9y68p9
                example: api.price_get
              code:
                type: string
                x-stoplight:
                  id: yvmrv5mczcj3f
                example: no_tariff_connected
              message:
                type: string
                x-stoplight:
                  id: n8zx3cn5xogky
                example: No tariff connected for IMPORT direction
              time_created:
                type: string
                x-stoplight:
                  id: wffseagefabdy
                format: date-time
                example: '2025-01-01T00:00:00Z'
            required:
              - object
              - type
              - context
              - code
              - message
              - time_created
    '429':
      description: 429 Too many requests
      content:
        application/json:
          schema:
            type: object
            properties:
              object:
                type: string
                x-stoplight:
                  id: irkmp11gg6sjx
                example: error
                default: error
              type:
                type: string
                x-stoplight:
                  id: u0gq12cizam3d
                default: rate_limit
                example: rate_limit
              code:
                type: string
                x-stoplight:
                  id: uh7x9404d4w3q
                default: too_many_requests
                example: too_many_requests
              message:
                type: string
                x-stoplight:
                  id: 9z8h79l1coblc
                default: Too many requests. Please retry after a short delay.
                example: Too many requests. Please retry after a short delay.
              time_created:
                type: string
                x-stoplight:
                  id: ea7o3uvdojrtc
                format: date-time
                default: '2026-01-29T17:11:52Z'
                example: '2026-01-29T17:11:52Z'
            required:
              - object
              - type
              - code
              - message
    Price:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Price'
  schemas:
    Price:
      type: object
      x-stoplight:
        id: o22cihzirzn15
      x-examples: {}
      x-tags:
        - Rates
      title: Price
      description: This object is a container for energy rates response.
      properties:
        id:
          type: string
          description: Flatpeak unique object `id`.
          example: prs_65e42cdd73e9f861edda35d7
        object:
          type: string
          description: Represents the object's type. I.e. `price`.
          example: price
        live_mode:
          type: boolean
          description: >-
            Has the value `true` if the object exists in live mode or the value
            false if the object exists in test mode.
        location_id:
          type: string
          description: The unique Flatpeak ID of the location.
          x-stoplight:
            id: 0grw6kx1kien5
          example: loc_65e42ce4d3b813479b252160
        location_timezone:
          type: string
          description: >-
            The timezone at the location, in 'tz database format'. I.e.
            'Europe/Berlin'.
          x-stoplight:
            id: qew0bifiwrkx7
          example: Europe/London
        currency_code:
          type: string
          description: Currency at the location in ISO 4217.
          x-stoplight:
            id: aomadeld01p2u
          example: EUR
        tariff_direction:
          type: string
          description: >-
            Direction of tariff. Supported options are `IMPORT`, `EXPORT` and
            `LOCAL`.
          x-stoplight:
            id: nwrbo35d5kqyt
          example: IMPORT
        last_updated:
          type: string
          description: >-
            Time when rates were last updated. In the format of the request,
            e.g. UTC or time-offset.
          example: '2022-05-24T14:15:22Z'
        request:
          type: object
          description: Your original request.
          x-stoplight:
            id: bxgjbinmv15bk
          required:
            - start_time
            - end_time
          properties:
            tariff_direction:
              type: string
              x-stoplight:
                id: zwx7cdz34ts20
              description: Tariff direction you requested.
              example: IMPORT
            start_time:
              type: string
              x-stoplight:
                id: ibm8lnebfgtw1
              format: date-time
              example: '2022-05-24T14:15:22Z'
              description: >-
                Time when the requested period starts. In the format of the
                request, e.g. UTC or time-offset.
            end_time:
              type: string
              x-stoplight:
                id: zhv80ks3xzxx5
              format: date-time
              example: '2022-05-24T16:15:22Z'
              description: >-
                Time when the requested period ends. In the format of the
                request, e.g. UTC or time-offset.
        data:
          type: array
          description: Rates response data.
          items:
            type: object
            x-stoplight:
              id: atpz6bpok2p95
            properties:
              valid_from:
                type: string
                description: >-
                  Time from when information is valid, in timezone of the
                  original request.
                format: date-time
                example: '2022-12-28T01:00:00Z'
              valid_to:
                type: string
                description: >-
                  Time until when information is valid, in timezone of the
                  original request.
                format: date-time
                example: '2022-12-28T02:30:00Z'
              price:
                type: object
                description: The energy price object
                x-stoplight:
                  id: 088ykxbotqzyk
                properties:
                  value:
                    type: number
                    description: The price value per kWh, in *large* currency units.
                    x-stoplight:
                      id: wp9jjm45ig076
                    example: 4.998
                  confidence:
                    type: number
                    description: >-
                      Estimated confidence of data where '1' is 100% accurate
                      and 0.1 is 10% accurate.
                    example: 1
        time_created:
          type: string
          description: Time when this response was calculated. In UTC.
          format: date-time
          example: '2022-05-24T15:15:22Z'
        account_id:
          type: string
          x-stoplight:
            id: js64f97p2gpks
          example: acc_661677911f2197045e6cf1b1
          description: Flatpeak account ID.
      required:
        - id
        - object
        - live_mode
        - location_id
        - location_timezone
        - currency_code
        - last_updated
        - request
        - account_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate with `bearer` you obtained from
        [authentication](/api-reference/anode/authentication) endpoint.

````