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

> Returns the final price for a concrete visit type, room type, arrival date, and departure date. Loyalty program IDs can apply guest-level discounts. The returned `amount` includes any active discount promotions, itemized in `price_breakdown.promotions`. Every occupied night in the half-open `[date_from, date_to)` range must have a price for the requested room type in at least one supported currency. The checkout day (`date_to`) is not charged. If no single currency covers the complete stay, the endpoint returns `422` instead of a partial price. Coverage is required for per-visit price lists too: a package season must span every occupied night of the stay, not only its check-in date.



## OpenAPI

````yaml /api/v1/openapi.yaml get /price
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:
  /price:
    get:
      tags:
        - Pricing
      summary: Get price
      description: >-
        Returns the final price for a concrete visit type, room type, arrival
        date, and departure date. Loyalty program IDs can apply guest-level
        discounts. The returned `amount` includes any active discount
        promotions, itemized in `price_breakdown.promotions`. Every occupied
        night in the half-open `[date_from, date_to)` range must have a price
        for the requested room type in at least one supported currency. The
        checkout day (`date_to`) is not charged. If no single currency covers
        the complete stay, the endpoint returns `422` instead of a partial
        price. Coverage is required for per-visit price lists too: a package
        season must span every occupied night of the stay, not only its check-in
        date.
      operationId: getPrice
      parameters:
        - $ref: '#/components/parameters/AcceptLanguage'
        - name: visit_type_id
          in: query
          required: true
          schema:
            type: integer
          description: Visit type ID.
        - name: room_type_id
          in: query
          required: true
          schema:
            type: integer
          description: Room type ID.
        - name: date_from
          in: query
          required: true
          schema:
            type: string
            format: date
          description: Arrival date in `YYYY-MM-DD` format.
        - name: date_to
          in: query
          required: true
          schema:
            type: string
            format: date
          description: Departure date in `YYYY-MM-DD` format.
        - name: guest_1_loyalty_program_id
          in: query
          schema:
            type: integer
          description: Optional loyalty program ID for the first guest.
        - name: guest_2_loyalty_program_id
          in: query
          schema:
            type: integer
          description: Optional loyalty program ID for the second guest.
      responses:
        '200':
          description: Final price by language.
          headers:
            Content-Language:
              $ref: '#/components/headers/ContentLanguage'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceByLanguage'
              examples:
                default:
                  $ref: '#/components/examples/PriceResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
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.
  headers:
    ContentLanguage:
      description: Languages included in the response.
      schema:
        type: string
        example: cs_CZ,de
  schemas:
    PriceByLanguage:
      type: object
      additionalProperties:
        allOf:
          - $ref: '#/components/schemas/CurrencyAmount'
          - type: object
            properties:
              price_breakdown:
                type: object
                description: >-
                  How the top-level `amount` is composed: `base_price` minus
                  loyalty discounts and promotions.
                additionalProperties: true
                properties:
                  base_price:
                    type: number
                    description: Pre-discount total for the stay, in the response currency.
                  discounts:
                    type: array
                    description: Loyalty-program discounts (per guest).
                    items:
                      type: object
                      additionalProperties: true
                  promotions:
                    type: array
                    description: >-
                      Discount promotions applied to the stay. The top-level
                      `amount` already accounts for them.
                    items:
                      $ref: '#/components/schemas/PromotionLine'
    CurrencyAmount:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: number
          nullable: true
        currency:
          type: string
          enum:
            - CZK
            - EUR
    PromotionLine:
      type: object
      description: >-
        A discount promotion reflected in the price breakdown. The top-level
        `amount` already has it subtracted.
      properties:
        name:
          $ref: '#/components/schemas/LocalizedString'
        percentage:
          type: number
          description: Discount percentage (0-100).
        amount:
          type: number
          description: >-
            Discount amount for this promotion, for the whole room, in the
            response currency.
        nights:
          type: integer
          description: Number of stay nights the promotion applies to.
        valid_from:
          type: string
          format: date
          description: First discounted night (UTC `YYYY-MM-DD`).
        valid_to:
          type: string
          format: date
          description: >-
            Exclusive end of the discounted range (UTC `YYYY-MM-DD`); the night
            of this date is not discounted. This is the range actually applied —
            the overlap of the promotion's validity with the stay.
    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
    LocalizedString:
      type: object
      additionalProperties:
        type: string
        nullable: true
      example:
        cs_CZ: Frantiskovy Lazne
        de: Franzensbad
  examples:
    PriceResponse:
      summary: Final price
      value:
        cs_CZ:
          amount: 15936
          currency: CZK
          price_breakdown:
            base_price: 19920
            discounts:
              - price_discount: 996
                guest: 1
                loyalty_program:
                  _id: 66f16191f739705faa020007
                  id: 2
                  name:
                    cs_CZ: VIP Club Premium
                    de: VIP Club Premium
                    en: VIP Club Premium
            promotions:
              - name:
                  cs_CZ: Letní sleva
                  de: Sommerrabatt
                  en: Summer discount
                percentage: 15
                amount: 2988
                nights: 4
                valid_from: '2026-06-21'
                valid_to: '2026-06-25'
        de:
          amount: 638.3
          currency: EUR
          price_breakdown:
            base_price: 798
            discounts:
              - price_discount: 40
                guest: 1
                loyalty_program:
                  _id: 66f16191f739705faa020007
                  id: 2
                  name:
                    cs_CZ: VIP Club Premium
                    de: VIP Club Premium
                    en: VIP Club Premium
            promotions:
              - name:
                  cs_CZ: Letní sleva
                  de: Sommerrabatt
                  en: Summer discount
                percentage: 15
                amount: 119.7
                nights: 4
                valid_from: '2026-06-21'
                valid_to: '2026-06-25'
  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'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: Resource exists but cannot be used for this request.
      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.

````