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

# Fetches a single, existing tariff.



## OpenAPI

````yaml /openapi/integration-api-v2/openapi.yaml get /v2/tariffs/{id}
openapi: 3.0.0
info:
  title: Spirii API
  description: Spirii API
  version: 2.10.0
  contact: {}
servers:
  - url: https://api.spirii.com
security: []
tags: []
paths:
  /v2/tariffs/{id}:
    get:
      tags:
        - Tariffs v2
      summary: Fetches a single, existing tariff.
      operationId: TariffController_getTariffById_v2
      parameters:
        - name: id
          required: true
          in: path
          description: ID that Uniquely identifies the tariff
          schema:
            example: 21C92A17-A793-4ABE-B903-90BE983D413E
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTariffResponseBodyDto'
        '400':
          description: Bad Request provided. A message will describe the issue.
        '422':
          description: ''
        '500':
          description: Internal Server Error.
        '501':
          description: ''
      security:
        - Authorization: []
components:
  schemas:
    GetTariffResponseBodyDto:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the tariff within the CPO’s platform
          example: 58652fe8-d840-4aa4-bb4f-3ebd944df9d6
        currency:
          type: string
          description: ISO-4217 code of the currency of this tariff
          example: DKK
        type:
          type: string
          description: Tariff type
          enum:
            - AD_HOC_PAYMENT
            - PROFILE_CHEAP
            - PROFILE_FAST
            - PROFILE_GREEN
            - REGULAR
          example: AD_HOC_PAYMENT
        tariff_alt_text:
          description: >-
            List of multi-language alternative tariff info texts. Deprecated,
            use tariffAltText instead
          example:
            - language: en
              text: Text to be displayed to a end user
          deprecated: true
          type: array
          items:
            type: object
        tariffAltText:
          description: List of multi-language alternative tariff info texts
          example:
            - language: en
              text: Text to be displayed to a end user
          type: array
          items:
            type: object
        minPrice:
          type: number
          description: Charging Sessions with this tariff will at least cost this amount
          example: 123456
        maxPrice:
          type: number
          description: Charging Sessions with this tariff will at most cost this amount
          example: 123456
        elements:
          description: List of Tariff Elements
          type: array
          items:
            $ref: '#/components/schemas/TariffElementDto'
      required:
        - id
        - currency
        - elements
    TariffElementDto:
      type: object
      properties:
        priceComponents:
          description: >-
            List of Price Components that each describe how a certain dimension
            is priced
          type: array
          items:
            $ref: '#/components/schemas/PriceComponentDto'
        restrictions:
          description: >-
            Restrictions that describe under which circumstances the Price
            Components of this Tariff Element apply.
          allOf:
            - $ref: '#/components/schemas/RestrictionDto'
      required:
        - priceComponents
    PriceComponentDto:
      type: object
      properties:
        type:
          type: string
          description: The dimension that is being priced
          enum:
            - ENERGY
            - FLAT
            - PARKING_TIME
            - TIME
          example: ENERGY
        price:
          type: number
          description: Price per unit for this dimension
          example: 12.34
        vat:
          type: number
          description: >-
            Applicable VAT percentage for this tariff dimension. If omitted, no
            VAT is applicable.
          example: 0.15
        stepSize:
          type: number
          description: >-
            Minimum amount to be billed. That is, the dimension will be billed
            in this step_size blocks
          example: 1
      required:
        - type
        - price
        - stepSize
    RestrictionDto:
      type: object
      properties:
        startTime:
          type: string
          description: >-
            Start time of day in local time. Must be in 24h format with leading
            zeros. Hour/Minute separator: ":"
          example: '09:00'
        endTime:
          type: string
          description: >-
            End time of day in local time. Must be in 24h format with leading
            zeros. Hour/Minute separator: ":"
          example: '17:35'
        startDate:
          type: string
          description: Start date in local time. Valid from this day (inclusive)
          example: '2024-12-27'
        endDate:
          type: string
          description: End date in local time. Valid until this day (exclusive)
          example: '2025-01-31'
        minKwh:
          type: number
          description: >-
            Minimum consumed energy in kWh. Valid from this amount of energy
            (inclusive) being used.
          example: 1
        maxKwh:
          type: number
          description: >-
            Maximum consumed energy in kWh. Valid until this amount of energy
            (exclusive) being used
          example: 1
        minDuration:
          type: number
          description: >-
            Minimum duration in seconds the Charging Session MUST last
            (inclusive). When the duration of a Charging Session is longer than
            the defined value, this TariffElement is or becomes active
          example: 1
        maxDuration:
          type: number
          description: >-
            Maximum duration in seconds the Charging Session MUST last
            (exclusive). When the duration of a Charging Session is shorter than
            the defined value, this TariffElement is or becomes active. After
            that moment, this TariffElement is no longer active.
          example: 1
        dayOfWeek:
          type: array
          description: Which day(s) of the week this TariffElement is active
          example:
            - TUESDAY
          items:
            type: string
            enum:
              - MONDAY
              - TUESDAY
              - WEDNESDAY
              - THURSDAY
              - FRIDAY
              - SATURDAY
              - SUNDAY
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization
      description: '`Authorization: Bearer <SPIRII_API_KEY>`'

````