> ## Documentation Index
> Fetch the complete documentation index at: https://developer.energy-hub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Prices

> Returns prices of a tariff.



## OpenAPI

````yaml get /v1.0.0/tariffs/{tariffId}/prices
openapi: 3.0.1
info:
  description: A service used for smart energy players
  title: smart-energy-service
  version: 1.0.0
servers:
  - description: Generated server url
    url: https://api.energy-hub.io
security: []
paths:
  /v1.0.0/tariffs/{tariffId}/prices:
    get:
      tags:
        - Tariff Controller
      summary: Prices
      description: Returns prices of a tariff.
      operationId: getPricesByTariffUuid
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: tariffId
          description: Tariff id
          required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PriceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorMessageDto'
              examples:
                BAD_REQUEST:
                  $ref: '#/components/examples/BAD_REQUEST'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                UNAUTHORIZED:
                  $ref: '#/components/examples/UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                TARIFF_NOT_FOUND:
                  $ref: '#/components/examples/TARIFF_NOT_FOUND'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessageDto'
              examples:
                VENDOR_ACCOUNT_IS_DISCONNECTED:
                  $ref: '#/components/examples/VENDOR_ACCOUNT_IS_DISCONNECTED'
                VENDOR_COMMUNICATION_ERROR:
                  $ref: '#/components/examples/VENDOR_COMMUNICATION_ERROR'
                VENDOR_AUTHENTICATION_ERROR:
                  $ref: '#/components/examples/VENDOR_AUTHENTICATION_ERROR'
                VENDOR_CONNECTION_ERROR:
                  $ref: '#/components/examples/VENDOR_CONNECTION_ERROR'
      security:
        - API_Key: []
components:
  schemas:
    PriceResponse:
      type: object
      required:
        - startDate
        - taxAndLevies
        - totalPrice
      properties:
        totalPrice:
          description: >-
            The total price consisting of energy purchasing costs and taxes and
            levies.
          type: number
          example: 0.74
        energyPrice:
          description: The day ahead spot price of the electricity purchased.
          type: number
          example: 0.52
        taxAndLevies:
          description: The taxes and levies of the purchased energy.
          type: number
          example: 0.22
        startDate:
          format: date-time
          description: The timestamp of the start of price interval.
          type: string
      example:
        - totalPrice: 0.22
          energyPrice: 0.05
          taxAndLevies: 0.17
          startDate: '2024-07-03T10:26:21.452Z'
        - totalPrice: 0.23
          energyPrice: 0.06
          taxAndLevies: 0.17
          startDate: '2024-07-03T11:26:21.452Z'
        - totalPrice: 0.24
          energyPrice: 0.07
          taxAndLevies: 0.17
          startDate: '2024-07-03T12:26:21.452Z'
        - totalPrice: 0.25
          energyPrice: 0.08
          taxAndLevies: 0.17
          startDate: '2024-07-03T13:26:21.452Z'
        - totalPrice: 0.26
          energyPrice: 0.09
          taxAndLevies: 0.17
          startDate: '2024-07-03T14:26:21.452Z'
        - totalPrice: 0.27
          energyPrice: 0.1
          taxAndLevies: 0.17
          startDate: '2024-07-03T15:26:21.452Z'
        - totalPrice: 0.28
          energyPrice: 0.11
          taxAndLevies: 0.17
          startDate: '2024-07-03T16:26:21.452Z'
        - totalPrice: 0.29
          energyPrice: 0.12
          taxAndLevies: 0.17
          startDate: '2024-07-03T17:26:21.452Z'
        - totalPrice: 0.3
          energyPrice: 0.13
          taxAndLevies: 0.17
          startDate: '2024-07-03T18:26:21.452Z'
        - totalPrice: 0.31
          energyPrice: 0.14
          taxAndLevies: 0.17
          startDate: '2024-07-03T19:26:21.452Z'
        - totalPrice: 0.32
          energyPrice: 0.15
          taxAndLevies: 0.17
          startDate: '2024-07-03T20:26:21.452Z'
        - totalPrice: 0.33
          energyPrice: 0.16
          taxAndLevies: 0.17
          startDate: '2024-07-03T21:26:21.452Z'
        - totalPrice: 0.34
          energyPrice: 0.17
          taxAndLevies: 0.17
          startDate: '2024-07-03T22:26:21.452Z'
        - totalPrice: 0.35
          energyPrice: 0.18
          taxAndLevies: 0.17
          startDate: '2024-07-03T23:26:21.452Z'
        - totalPrice: 0.36
          energyPrice: 0.19
          taxAndLevies: 0.17
          startDate: '2024-07-04T00:26:21.452Z'
        - totalPrice: 0.37
          energyPrice: 0.2
          taxAndLevies: 0.17
          startDate: '2024-07-04T01:26:21.452Z'
        - totalPrice: 0.38
          energyPrice: 0.21
          taxAndLevies: 0.17
          startDate: '2024-07-04T02:26:21.452Z'
        - totalPrice: 0.39
          energyPrice: 0.22
          taxAndLevies: 0.17
          startDate: '2024-07-04T03:26:21.452Z'
        - totalPrice: 0.4
          energyPrice: 0.23
          taxAndLevies: 0.17
          startDate: '2024-07-04T04:26:21.452Z'
        - totalPrice: 0.41
          energyPrice: 0.24
          taxAndLevies: 0.17
          startDate: '2024-07-04T05:26:21.452Z'
        - totalPrice: 0.42
          energyPrice: 0.25
          taxAndLevies: 0.17
          startDate: '2024-07-04T06:26:21.452Z'
        - totalPrice: 0.43
          energyPrice: 0.26
          taxAndLevies: 0.17
          startDate: '2024-07-04T07:26:21.452Z'
        - totalPrice: 0.44
          energyPrice: 0.27
          taxAndLevies: 0.17
          startDate: '2024-07-04T08:26:21.452Z'
        - totalPrice: 0.45
          energyPrice: 0.28
          taxAndLevies: 0.17
          startDate: '2024-07-04T09:26:21.452Z'
    ValidationErrorMessageDto:
      allOf:
        - $ref: '#/components/schemas/ErrorMessageDto'
        - type: object
          properties:
            errorCode:
              description: The error code
              type: string
              example: EXAMPLE_ERROR_CODE
            validationErrors:
              description: List of validation errors
              type: array
              items:
                $ref: '#/components/schemas/ValidationError'
            id:
              format: uuid
              description: The error identifier
              type: string
              example: 7958818d-64d2-4ede-b12b-4786dd2f348b
            message:
              description: The error message
              type: string
              example: Example error message
      type: object
      required:
        - errorCode
        - id
        - message
    ErrorMessageDto:
      type: object
      required:
        - errorCode
        - id
        - message
      properties:
        errorCode:
          description: The error code
          type: string
          example: EXAMPLE_ERROR_CODE
        id:
          format: uuid
          description: The error identifier
          type: string
          example: 7958818d-64d2-4ede-b12b-4786dd2f348b
        message:
          description: The error message
          type: string
          example: Example error message
    ValidationError:
      type: object
      properties:
        field:
          description: Affected field
          type: string
        message:
          description: Validation message
          type: string
  examples:
    BAD_REQUEST:
      value:
        errorCode: BAD_REQUEST
        validationErrors:
          - field: Affected field
            message: Validation message
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: Bad request
    UNAUTHORIZED:
      value:
        errorCode: UNAUTHORIZED
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: Unauthorized
    TARIFF_NOT_FOUND:
      value:
        errorCode: TARIFF_NOT_FOUND
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: '[TARIFF] Tariff not found.'
    VENDOR_ACCOUNT_IS_DISCONNECTED:
      value:
        errorCode: VENDOR_ACCOUNT_IS_DISCONNECTED
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: '[VENDOR_ACCOUNT] Vendor account is disconnected'
    VENDOR_COMMUNICATION_ERROR:
      value:
        errorCode: VENDOR_COMMUNICATION_ERROR
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: '[VENDOR API] Communication error with Vendor API'
    VENDOR_AUTHENTICATION_ERROR:
      value:
        errorCode: VENDOR_AUTHENTICATION_ERROR
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: '[VENDOR API] Authentication error with Vendor API'
    VENDOR_CONNECTION_ERROR:
      value:
        errorCode: VENDOR_CONNECTION_ERROR
        id: 1068eb9d-7814-491b-8219-25bad554bef7
        message: '[VENDOR API] Connection cannot be established with Vendor API'
  securitySchemes:
    API_Key:
      in: header
      name: X-API-KEY
      description: API key used for authorization and authentication.
      type: apiKey

````