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

# Get loyalty programs

> Returns loyalty programs available to the authenticated API key.

For shared API keys spanning multiple companies, duplicate programs with the same `id` and localized `name` are deduplicated.




## OpenAPI

````yaml /api/v1/openapi.yaml get /loyalty-programs
openapi: 3.0.3
info:
  title: SpaPortal API v1
  version: '1.0'
  description: Public API for booking clients that integrate with SpaPortal.
servers:
  - url: https://spaportal.cz/api/v1
    description: Production
security:
  - bearerAuth: []
  - accessTokenQuery: []
tags:
  - name: System
  - name: Catalog
  - name: Availability
  - name: Pricing
  - name: Booking
paths:
  /loyalty-programs:
    get:
      tags:
        - Catalog
      summary: Get loyalty programs
      description: >
        Returns loyalty programs available to the authenticated API key.


        For shared API keys spanning multiple companies, duplicate programs with
        the same `id` and localized `name` are deduplicated.
      operationId: getLoyaltyPrograms
      parameters:
        - $ref: '#/components/parameters/AcceptLanguage'
        - $ref: '#/components/parameters/Max'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: Loyalty programs available to the API key.
          headers:
            X-Total-Count:
              $ref: '#/components/headers/XTotalCount'
            Content-Language:
              $ref: '#/components/headers/ContentLanguage'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LoyaltyProgram'
              examples:
                default:
                  $ref: '#/components/examples/LoyaltyProgramsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    AcceptLanguage:
      name: Accept-Language
      in: header
      schema:
        type: string
        example: cs_CZ,de
      description: >-
        Comma-separated list of languages to include. See
        [Localization](/api/v1/localization) for details.
    Max:
      name: max
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
      description: Number of records to return.
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
        default: 0
      description: Number of records to skip.
  headers:
    XTotalCount:
      description: Total number of matching records.
      schema:
        type: integer
    ContentLanguage:
      description: Languages included in the response.
      schema:
        type: string
        example: cs_CZ,de
  schemas:
    LoyaltyProgram:
      type: object
      additionalProperties: true
      properties:
        _id:
          $ref: '#/components/schemas/ObjectId'
        id:
          oneOf:
            - type: integer
            - type: string
        name:
          $ref: '#/components/schemas/LocalizedString'
    ObjectId:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: Object id (24-character hex string) for the same entity.
      example: 66f16191f739705faa020001
    LocalizedString:
      type: object
      additionalProperties:
        type: string
        nullable: true
      example:
        cs_CZ: Frantiskovy Lazne
        de: Franzensbad
    ErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
    ValidationErrorResponse:
      type: object
      required:
        - success
        - message
        - errors
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        errors:
          type: array
          items:
            type: object
            additionalProperties: true
  examples:
    LoyaltyProgramsResponse:
      summary: Loyalty program list
      value:
        - _id: 66f16191f739705faa020007
          id: 1
          name:
            cs_CZ: VIP Club Gold
            de: VIP Club Gold
            en: VIP Club Gold
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ErrorResponse'
              - $ref: '#/components/schemas/ValidationErrorResponse'
    Unauthorized:
      description: Invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        See [Authentication](/api/v1/authentication) for how to obtain and send
        your API key.
    accessTokenQuery:
      type: apiKey
      in: query
      name: access_token
      description: >-
        See [Authentication](/api/v1/authentication) for how to obtain and send
        your API key.

````