> ## 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.

# Get a list of voucher groups

> This endpoint allows you to get a paginated list of voucher groups. It is possible to set query parameters to filter the results.

A Voucher Group unites several Vouchers



## OpenAPI

````yaml /openapi/integration-api-v2/openapi.yaml get /v2/voucher-groups
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/voucher-groups:
    get:
      tags:
        - VoucherGroups
      summary: Get a list of voucher groups
      description: >-
        This endpoint allows you to get a paginated list of voucher groups. It
        is possible to set query parameters to filter the results.


        A Voucher Group unites several Vouchers
      operationId: findAllVoucherGroups
      parameters:
        - name: createdAt
          required: false
          in: query
          description: Creation date.
          schema:
            type: string
            format: date-time
        - name: createdAtFrom
          required: false
          in: query
          description: >-
            Start date for filtering by creation date. When set, filter
            `sort_by` defaults to `createdAt`.
          schema:
            type: string
            format: date-time
        - name: createdAtTo
          required: false
          in: query
          description: >-
            End date for filtering by creation date. When set, filter `sort_by`
            defaults to `createdAt`.
          schema:
            type: string
            format: date-time
        - name: updatedAt
          required: false
          in: query
          description: Last update date.
          schema:
            type: string
            format: date-time
        - name: updatedAtFrom
          required: false
          in: query
          description: >-
            Start date for filtering by last update date. When set, filter
            `sort_by` defaults to `updatedAt`.
          schema:
            type: string
            format: date-time
        - name: updatedAtTo
          required: false
          in: query
          description: >-
            End date for filtering by last update date. When set, filter
            `sort_by` defaults to `updatedAt`.
          schema:
            type: string
            format: date-time
        - name: limit
          required: false
          in: query
          description: Filter the total amount of items returned.
          schema:
            minimum: 1
            default: 50
            type: integer
        - name: after
          required: false
          in: query
          description: The cursor to start fetching records after (forward pagination).
          schema:
            example: My0xMDAw
            type: string
        - name: before
          required: false
          in: query
          description: The cursor to start fetching records before (backward pagination).
          schema:
            example: Ny0xMDAw
            type: string
        - name: sort_by
          required: false
          in: query
          description: >-
            Which property to sort by. When used with `createdAt*` default is
            `createdAt`. When used with `updatedAt*` default is `updatedAt`.
          schema:
            default: id
            enum:
              - id
              - name
              - createdAt
              - updatedAt
            type: string
        - name: sort_direction
          required: false
          in: query
          description: Sort direction. Defaults to `asc`.
          schema:
            default: asc
            enum:
              - desc
              - asc
            type: string
        - name: search
          required: false
          in: query
          description: Search across item names and IDs.
          schema:
            type: string
        - name: types
          required: false
          in: query
          description: >-
            Types of the voucher groups to filter. Multiple types can be
            selected.
          schema:
            type: array
            items:
              type: string
              enum:
                - fixed
                - fleet
                - tariff
                - dynamic
      responses:
        '200':
          description: The returned list of voucher groups.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoucherGroupListResponseDto'
components:
  schemas:
    VoucherGroupListResponseDto:
      type: object
      properties:
        data:
          description: A list of Voucher Groups.
          type: array
          items:
            $ref: '#/components/schemas/VoucherGroupResponseDto'
        pagination:
          $ref: '#/components/schemas/PaginationResponseDto'
      required:
        - data
        - pagination
    VoucherGroupResponseDto:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier for the voucher group.
          example: 1
        name:
          type: string
          maxLength: 30
          description: The voucher group name.
          example: Premium Voucher Group
        customerId:
          type: number
          nullable: true
          description: The CRM customer ID the voucher group belongs to.
        notes:
          type: string
          maxLength: 30
          description: Optional comment about the voucher.
          example: This is a comment.
        pricing:
          oneOf:
            - $ref: '#/components/schemas/VoucherTariffPricing'
            - $ref: '#/components/schemas/VoucherFixedPricing'
            - $ref: '#/components/schemas/VoucherDynamicPricing'
            - $ref: '#/components/schemas/VoucherFleetPricing'
          description: >-
            With a voucher applied, the drivers charges at a lowered price
            overwriting the standard tariff on the location.
          example:
            type: tariff
            tariffId: 2606f342-2c3e-4f7b-9034-dbaac5e62c82
          allOf:
            - $ref: '#/components/schemas/VoucherGroupPricing'
        createdAt:
          format: date-time
          type: string
          description: The date and time when the voucher group was created.
          example: '2025-06-03T12:00:00.000Z'
        updatedAt:
          format: date-time
          type: string
          description: The date and time when the voucher group was last updated.
          example: '2025-06-03T12:00:00.000Z'
        deletedAt:
          format: date-time
          type: string
          nullable: true
      required:
        - id
        - name
        - pricing
        - createdAt
        - updatedAt
    PaginationResponseDto:
      type: object
      properties:
        endCursor:
          type: string
          nullable: true
          description: Cursor for the end of the current page.
        previousEndCursor:
          type: string
          nullable: true
          description: Cursor for the end of the previous page.
        hasNext:
          type: boolean
          description: Indicates if there are more records to fetch.
        hasPrevious:
          type: boolean
          description: Indicates if there are previous records to fetch.
        count:
          type: number
          description: Total number of records.
          example: 10
      required:
        - endCursor
        - hasNext
        - hasPrevious
        - count
    VoucherTariffPricing:
      type: object
      properties:
        type:
          enum:
            - fixed
            - fleet
            - tariff
            - dynamic
          type: string
          description: The identifier type of the voucher group.
        tariffId:
          type: string
          format: uuid
          description: >-
            Unique identifier of the tariff. It does not apply to Spirii Legacy
            Tariffs.
          example: 2606f342-2c3e-4f7b-9034-dbaac5e62c82
          nullable: true
      description: >-
        Unique identifier of the tariff. It does not apply to Spirii Legacy
        Tariffs.
      required:
        - type
    VoucherFixedPricing:
      type: object
      properties:
        type:
          enum:
            - fixed
            - fleet
            - tariff
            - dynamic
          type: string
          description: Fixed price per KWh. Deprecated, use tariff type instead.
        perKwh:
          type: number
          maximum: 9999.99
          description: Price per kWh including VAT.
          example: 0.05
          default: 0.05
          format: float
          minimum: 0
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: >-
            The currency code defines the currency of the invoices. Must be in
            ISO-4217 format.
          example: EUR
      description: Fixed price per KWh. Deprecated, use tariff type instead.
      required:
        - type
        - perKwh
        - currency
    VoucherDynamicPricing:
      type: object
      properties:
        type:
          enum:
            - fixed
            - fleet
            - tariff
            - dynamic
          type: string
          description: Dynamic price. Deprecated, use tariff type instead.
        perKwhMinimum:
          type: number
          maximum: 99.99
          description: >-
            The minimum price per kWh a customer will be charged, regardless of
            the spot price. This will also be used as a fallback price in case
            spot price data is missing. NOTE: This will be the total end-user
            price incl.VAT. Beware that markup will not be added to this.
          example: 0.05
          default: 0.05
          format: float
          minimum: 0
        spotPriceMarkup:
          nullable: true
          description: >-
            Define markup to add on top of the spot price. The spot price is the
            raw market electricity price excluding transport fees, taxes etc.
            The spot price for the next 24 hours is displayed on the right if
            country is selected. You can choose none, one or both.
          allOf:
            - $ref: '#/components/schemas/SpotPriceMarkup'
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: >-
            The currency code defines the currency of the invoices. Must be in
            ISO-4217 format.
          example: EUR
      description: Dynamic price. Deprecated, use tariff type instead.
      required:
        - type
        - perKwhMinimum
        - spotPriceMarkup
        - currency
    VoucherFleetPricing:
      type: object
      properties:
        type:
          enum:
            - fixed
            - fleet
            - tariff
            - dynamic
          type: string
          description: >-
            When set, it makes sessions free for those who use this voucher.
            Used to expense fleet sessions.
      description: Fleet pricing makes sessions free for those who use this voucher.
      required:
        - type
    VoucherGroupPricing:
      type: object
      properties:
        type:
          enum:
            - fixed
            - fleet
            - tariff
            - dynamic
          type: string
          description: The identifier type of the voucher group.
      required:
        - type
    SpotPriceMarkup:
      type: object
      properties:
        markUpPct:
          type: number
          nullable: true
          maximum: 99.99
          description: >-
            Percentage will be applied to the spot price. Eg used to secure a
            revenue.
          example: 0.3
          format: percentage
          minimum: 0
        markUpFixed:
          type: number
          nullable: true
          maximum: 99.99
          description: >-
            Fixed amount applied after markup percentage. Eg used to control
            your costs.
          example: 20
          format: float
          minimum: 0
      required:
        - markUpPct
        - markUpFixed

````