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

# Retrieve a list of vouchers



## OpenAPI

````yaml /openapi/integrations-api/openapi.yml get /vouchers
openapi: 3.0.0
info:
  title: Spirii Legacy API
  description: >-
    API for integration to Spirii CPO backend for charge point owners and charge
    point operators with access to whitelabel user data.
  version: 1.1.25
servers:
  - url: https://api.spirii.com/
    description: Production Environment
security: []
paths:
  /vouchers:
    get:
      tags:
        - Vouchers
      summary: Retrieve a list of vouchers
      parameters:
        - $ref: '#/components/parameters/groupId'
        - $ref: '#/components/parameters/code'
        - $ref: '#/components/parameters/updatedAfter'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/voucherList'
        '400':
          $ref: '#/components/responses/badRequest'
        '500':
          $ref: '#/components/responses/badImplementation'
components:
  parameters:
    groupId:
      in: query
      name: groupId
      schema:
        type: integer
    code:
      in: query
      name: code
      schema:
        type: string
    updatedAfter:
      in: query
      name: updatedAfter
      schema:
        description: Expiration date in ISO timestamp (UTC)
        type: string
        example: '2022-01-20T08:08:24.878Z'
    offset:
      in: query
      name: offset
      description: The number of items to skip before starting to collect the result set
      schema:
        type: integer
        example: 250
    limit:
      in: query
      name: limit
      description: Number of record to collect
      schema:
        type: integer
        maximum: 2000
        default: 250
        example: 250
  responses:
    voucherList:
      description: Voucher list
      content:
        application/json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                description: Voucher list
                type: array
                items:
                  type: object
                  required:
                    - id
                    - groupId
                    - code
                    - maxUsers
                    - createdAt
                    - updatedAt
                    - expiresAt
                  properties:
                    id:
                      $ref: '#/components/schemas/id'
                    groupId:
                      $ref: '#/components/schemas/groupId'
                    code:
                      $ref: '#/components/schemas/code'
                    maxUsers:
                      $ref: '#/components/schemas/maxUsers'
                    createdAt:
                      $ref: '#/components/schemas/createdAt'
                    updatedAt:
                      $ref: '#/components/schemas/updatedAt'
                    expiresAt:
                      $ref: '#/components/schemas/expiresAt'
          example:
            data:
              - id: 1
                groupId: 141
                code: sp1r112020
                maxUsers: 6
                createdAt: '2020-10-20T04:19:03.000Z'
                updatedAt: '2022-09-29T03:57:50.000Z'
                expiresAt: '2024-07-22T05:26:16.000Z'
              - id: 2
                groupId: 121
                code: RH37491
                maxUsers: null
                createdAt: '2020-10-26T08:41:12.000Z'
                updatedAt: '2022-01-18T12:13:57.000Z'
                expiresAt: null
            totalElements: 4158
            offset: 0
            limit: 2
    badRequest:
      description: Bad Request, invalid request or missing request parameter
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: Error object
                type: object
                properties:
                  message:
                    description: Error message
                    type: string
                    example: >-
                      No fields to update. Please provide at least one of the
                      valid fields
          example:
            error:
              message: Querystring parameter `id` is not allowed
              statusCode: 400
              code: QueryParamNotAllowed
    badImplementation:
      description: Something went wroing, try again later
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                description: Error object
                type: object
                properties:
                  message:
                    description: Error message
                    type: string
                    example: Something went wroing, try again later
          example:
            error:
              message: Something went wroing, try again later
              statusCode: 500
  schemas:
    id:
      description: id
      type: integer
      example: 1
    groupId:
      type: integer
      example: 5
    code:
      type: string
      example: code123
    maxUsers:
      type: integer
      example: 5
      nullable: true
    createdAt:
      description: Created date
      format: timestamp
      type: string
      example: '2021-04-20T14:38:20.000Z'
    updatedAt:
      description: Updated date
      format: timestamp
      type: string
      example: '2021-04-20T14:38:20.000Z'
    expiresAt:
      description: Updated date
      type: string
      format: timestamp
      example: '2021-04-20T14:38:20.000Z'
      nullable: true

````