openapi: 3.1.1
info:
  version: 0.1.0
  title: Understory API
  description: >
    This is the reference documentation for the Understory API.

    Here you can find detailed information about the API endpoints, request and
    response formats, and authentication methods.


    For more general information, go to [Documentation](/docs).


    {% partial file="/_partials/preview-admonition.md" /%}
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.understory.io
tags:
  - name: Booking
    description: >
      This is an early version of the Bookings API specification.


      The API is available in production for testing.

      Breaking changes might be introduced, but the overall specification is
      close to stable.
    x-displayName: Booking
  - name: Event
    description: |
      This is a preview of the Events API specification.

      The API is not yet available in production.
    x-displayName: Event
  - name: Experience
    description: |
      This is a preview of the Experience API specification.

      The API is not yet available in production.
    x-displayName: Experience
  - name: Grow
    description: This is a collection of endpoints related to Understory Grow.
    x-displayName: Grow
  - name: Test
    description: >
      These endpoints are for testing purposes only.


      You can use them to verify that your integration authentication works as
      intended.
    x-displayName: Test
paths:
  /v1/bookings:
    get:
      tags:
        - Booking
      summary: Get Bookings
      description: Get all bookings.
      operationId: getBookings
      x-badges:
        - name: Alpha
          color: '#c36760'
      x-hideReplay: true
      security:
        - OAuth2:
            - booking.read
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: |
            The cursor for pagination.
            An empty string indicates the start of the list.
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
            format: int32
          description: The maximum number of bookings to return.
        - name: from
          in: query
          schema:
            type: string
            format: date-time
            description: Filter bookings made after the provided timestamp.
        - name: to
          in: query
          schema:
            type: string
            format: date-time
            description: Filter bookings made before the provided timestamp.
        - name: sort
          in: query
          schema:
            type: string
            default: '-created_at'
            description: >
              Field to define the sort order. To indicate sorting direction,
              fields may be prefixed with `+` (ascending) or `-` (descending).


              Ensure to URL escape the value as `+` can otherwise be interpreted
              as a space.


              Only fields `created_at` and `updated_at` are supported.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    description: |
                      The cursor for the next page.
                      An empty string indicates the end of the list.
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Booking'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: |
            Unexpected error.
            This will be 5XX error code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - Booking
      summary: Create Booking
      description: Create a new booking for an event.
      operationId: createBooking
      x-badges:
        - name: Alpha
          color: '#c36760'
      x-hideReplay: true
      security:
        - OAuth2:
            - booking.write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - event_id
                - customer
                - locale
                - items
              properties:
                event_id:
                  type: string
                  description: The unique identifier of the event.
                customer:
                  oneOf:
                    - $ref: '#/components/schemas/CompanyCustomer'
                    - $ref: '#/components/schemas/PrivateCustomer'
                  description: The customer making the booking.
                locale:
                  type: string
                  description: >
                    Combination of language and country/region.

                    The format is a lowercase ISO 639-1 language code followed
                    by an optional hyphen and an

                    uppercase ISO 3166-1 country code.
                items:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/Item'
                metadata:
                  type: object
                  description: >
                    Additional metadata for the booking.


                    This property lets you add custom data to the booking, e.g.
                    your own booking reference.

                    The key has a limit of 40 characters and the value has a
                    limit of 500 characters.
                  additionalProperties:
                    type: string
      responses:
        '201':
          description: Booking successfully created.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - status
                properties:
                  id:
                    type: string
                    description: The unique identifier of the booking.
                  status:
                    $ref: '#/components/schemas/BookingStatus'
                    description: |
                      The status of the booking.

                      This will always be "ACTIVE" when the booking is created.
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Request violates a business rule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: |
            Unexpected error.
            This will be 5XX errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/bookings/{bookingId}:
    parameters:
      - name: bookingId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the booking.
    get:
      tags:
        - Booking
      summary: Get Booking
      description: Get a booking by its ID.
      operationId: getBooking
      x-badges:
        - name: Alpha
          color: '#c36760'
      x-hideReplay: true
      security:
        - OAuth2:
            - booking.read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Booking'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: |
            Unexpected error.
            This will be 5XX error code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/bookings/{bookingId}/tickets:
    parameters:
      - name: bookingId
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier of the booking.
    get:
      tags:
        - Booking
      summary: Get Tickets
      description: Get all tickets for a booking.
      operationId: getTickets
      x-badges:
        - name: Alpha
          color: '#c36760'
      x-hideReplay: true
      security:
        - OAuth2:
            - booking.read
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Ticket'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: |
            Unexpected error.
            This will be 5XX error code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/events:
    get:
      tags:
        - Event
      summary: Get events
      description: Get all events for the company.
      operationId: getEvents
      x-badges:
        - name: Preview
          color: '#5a7f68'
      x-hideReplay: true
      security:
        - OAuth2:
            - event.read
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: |
            The cursor for pagination.
            An empty string indicates the start of the list.
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
            format: int32
          description: The maximum number of events to return.
        - name: from
          in: query
          schema:
            type: string
            format: date-time
            description: Filter events based on the provided timestamp.
        - name: to
          in: query
          schema:
            type: string
            format: date-time
            description: Filter events based on the provided timestamp.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    description: |
                      The cursor for the next page.
                      An empty string indicates the end of the list.
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
  /v1/events/{eventId}:
    get:
      tags:
        - Event
      summary: Get event
      description: Get an event by ID.
      operationId: getEvent
      x-badges:
        - name: Preview
          color: '#5a7f68'
      x-hideReplay: true
      security:
        - OAuth2:
            - event.read
      parameters:
        - name: eventId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier for the event.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/experiences:
    get:
      tags:
        - Experience
      summary: Get experiences
      description: Get all experiences for the company.
      operationId: getExperiences
      x-badges:
        - name: Preview
          color: '#5a7f68'
      x-hideReplay: true
      security:
        - OAuth2:
            - experience.read
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: |
            The cursor for pagination.
            An empty string indicates the start of the list.
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
            format: int32
          description: The maximum number of experiences to return.
        - name: Accept-Language
          in: header
          schema:
            $ref: '#/components/schemas/AcceptLanguageHeader'
          required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    description: |
                      The cursor for the next page.
                      An empty string indicates the end of the list.
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Experience'
  /v1/experiences/{experienceId}:
    parameters:
      - schema:
          type: string
        name: experienceId
        in: path
        required: true
      - name: Accept-Language
        in: header
        schema:
          $ref: '#/components/schemas/AcceptLanguageHeader'
        required: true
    get:
      tags:
        - Experience
      summary: Get experience
      description: Get an experience by its ID.
      operationId: getExperienceById
      security:
        - OAuth2:
            - experience.read
      x-badges:
        - name: Preview
          color: '#5a7f68'
      x-hideReplay: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experience'
  /v1/marketing-consents:
    get:
      tags:
        - Grow
      summary: Get marketing consents
      description: Get all marketing consents collected through Understory checkouts.
      operationId: getMarketingConsents
      security:
        - OAuth2:
            - marketing.read
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
          description: |
            The cursor for pagination.
            An empty string indicates the start of the list.
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
            format: int32
          description: The maximum number of marketing consents to return.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  next:
                    type: string
                    description: |
                      The cursor for the next page.
                      An empty string indicates the end of the list.
                  items:
                    description: The list of marketing consents.
                    type: array
                    items:
                      $ref: '#/components/schemas/MarketingConsent'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/me:
    get:
      tags:
        - Test
      summary: Who am I
      description: Get information about the current user.
      operationId: getMe
      security:
        - OAuth2: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Me'
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth2 authentication using the client credentials flow
      flows:
        clientCredentials:
          tokenUrl: https://api.auth.understory.io/oauth2/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://api.auth.understory.io/oauth2/auth
          tokenUrl: https://api.auth.understory.io/oauth2/token
          scopes: {}
  schemas:
    Booking:
      type: object
      required:
        - id
        - status
        - created_at
        - updated_at
        - company_id
        - experience_id
        - event_id
        - customer
        - locale
      properties:
        id:
          type: string
          description: The unique identifier of the booking.
        status:
          $ref: '#/components/schemas/BookingStatus'
          description: The status of the booking.
        source:
          type: string
          description: The source of the booking.
        created_at:
          type: string
          format: date-time
          description: Timestamp of when the booking was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp of when the booking was last updated.
        company_id:
          type: string
          description: The ID of the company hosting the experience.
        experience_id:
          type: string
          description: The unique identifier of the experience.
        event_id:
          type: string
          description: The unique identifier of the event.
        locale:
          type: string
          description: >
            Combination of language and country/region.

            The format is a lowercase ISO 639-1 language code followed by an
            optional hyphen and an

            uppercase ISO 3166-1 country code.
        customer:
          description: The customer that made the booking.
          discriminator:
            propertyName: customer_type
            mapping:
              PRIVATE: '#/components/schemas/PrivateCustomer'
              COMPANY: '#/components/schemas/CompanyCustomer'
          oneOf:
            - $ref: '#/components/schemas/CompanyCustomer'
            - $ref: '#/components/schemas/PrivateCustomer'
        internal_note:
          $ref: '#/components/schemas/MarkdownText'
          description: Internal note for the booking.
        metadata:
          type: object
          description: >
            Additional metadata for the booking.


            This property lets you add custom data to the booking, e.g. your own
            booking reference.

            The key has a limit of 40 characters and the value has a limit of
            500 characters.
          additionalProperties:
            type: string
    BookingStatus:
      type: string
      enum:
        - ACTIVE
        - CANCELLED
        - MOVED
        - PROCESSING
        - CHECKED_IN
        - UNKNOWN
    PrivateCustomer:
      type: object
      required:
        - customer_type
        - full_name
        - email
        - phone
        - address
      properties:
        customer_type:
          $ref: '#/components/schemas/CustomerType'
          description: For private customers, this is always "PRIVATE"
        full_name:
          type: string
          description: The name of the customer.
        email:
          type: string
          format: email
          description: The email address of the customer.
        phone:
          type: string
          description: The phone number of the customer.
        address:
          $ref: '#/components/schemas/Address'
    CompanyCustomer:
      type: object
      required:
        - customer_type
        - company_name
        - vat_number
        - email
        - phone
        - address
      properties:
        customer_type:
          $ref: '#/components/schemas/CustomerType'
          description: For company customers, this is always "COMPANY"
        company_name:
          type: string
          description: The name of the company.
        vat_number:
          type: string
          description: The VAT number of the company.
        email:
          type: string
          format: email
          description: The email address of the customer.
        name:
          type: string
          description: The name of the customer.
        phone:
          type: string
          description: The phone number of the customer.
        address:
          $ref: '#/components/schemas/Address'
    CustomerType:
      type: string
      enum:
        - PRIVATE
        - COMPANY
    Address:
      type: object
      required:
        - address_lines
        - city
        - zip_code
        - country
      properties:
        address_lines:
          type: array
          minItems: 1
          maxItems: 2
          items:
            type: string
          description: >
            Address lines.

            The first line is the primary address line, e.g. street name and
            number.

            The second line is the secondary address line, e.g. apartment
            number.
        city:
          type: string
          description: The city of the customer.
        zip_code:
          type: string
          description: The postal code of the customer.
        region:
          type: string
          description: |
            The region of the customer.
            This can be a state, province, or other administrative region.
        country:
          type: string
          description: The country of the customer.
          format: iso-3166-1-alpha-2
    Ticket:
      type: object
      required:
        - id
        - urls
        - status
        - items
      properties:
        id:
          type: string
          description: The unique identifier of the ticket.
        status:
          type: string
          enum:
            - ACTIVE
            - VOIDED
            - CHECKED_IN
            - UNKNOWN
          description: The status of the ticket.
        urls:
          type: array
          description: The URLs associated with the ticket.
          minItems: 1
          items:
            type: object
            required:
              - type
              - url
            properties:
              type:
                type: string
                description: The type of the URL.
                enum:
                  - PDF
              url:
                type: string
                format: uri
                description: URL to the ticket.
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
          description: The items associated with the ticket, e.g. variants or addons.
        check_in:
          type: object
          required:
            - check_in_time
            - checked_in_by
            - method
          properties:
            check_in_time:
              type: string
              format: date-time
              description: Timestamp of when the ticket was checked in.
            checked_in_by:
              type: string
              description: The ID of the person who checked in the ticket.
            method:
              type: string
              description: The method used to check in the ticket.
              enum:
                - MANUAL
                - QR_CODE_SCAN
                - UNKNOWN
    Item:
      type: object
      required:
        - type_id
        - item_type
        - quantity
      properties:
        type_id:
          type: string
          description: The unique identifier of the item type.
        item_type:
          type: string
          description: The type of item.
          enum:
            - VARIANT
            - ADDON
            - UNKNOWN
        quantity:
          type: integer
          minimum: 1
          description: The quantity of the item.
    MarkdownText:
      type: string
      description: |
        Markdown formatted text.
        This is a string that contains markdown syntax.
    Error:
      type: object
      required:
        - message
        - code
      properties:
        code:
          type: string
        message:
          type: string
    Event:
      type: object
      required:
        - id
        - experience_id
        - company_id
        - created_at
        - updated_at
        - start_time
        - end_time
        - duration
        - location_id
        - languages
        - status
        - assigned_guides
        - capacity
        - visibility
        - information
      properties:
        id:
          type: string
          description: The unique identifier for the event.
        experience_id:
          type: string
          description: The unique identifier for the experience.
        company_id:
          type: string
          description: The unique identifier for the company.
        created_at:
          type: string
          format: date-time
          description: The date and time when the event was created.
        updated_at:
          type: string
          format: date-time
          description: The date and time when the event was last updated.
        start_time:
          type: string
          format: date-time
          description: The start time of the event.
        end_time:
          type: string
          format: date-time
          description: The end time of the event.
        duration:
          type: string
          description: |
            The duration of the event, i.e. the time between start and end time.

            For example, PT1H45M represents 1 hours and 45 minutes.
          format: iso-8601
          example: PT1H45M
        location_id:
          type: string
          description: The unique identifier for the location.
        languages:
          type: array
          description: The languages spoken during the event.
          items:
            type: string
            format: iso-639-1
            example:
              - en
              - da
        status:
          type: string
          description: The status of the event.
          enum:
            - ACTIVE
            - INACTIVE
            - CANCELLED
            - DRAFT
        cancellation:
          $ref: '#/components/schemas/Cancellation'
          description: |
            The cancellation information for the event.

            Is only present if the event is `CANCELLED`.
        assigned_guides:
          type: array
          description: The unique identifiers for the guides assigned to the event.
          items:
            type: string
        capacity:
          description: The capacity of the event.
          $ref: '#/components/schemas/Capacity'
        visibility:
          type: string
          description: The visibility of the event.
          enum:
            - PUBLIC
            - PRIVATE
        information:
          $ref: '#/components/schemas/MarkdownText'
          description: Additional information about the event.
    Capacity:
      type: object
      required:
        - booked
        - total
        - is_full
      properties:
        booked:
          type: integer
          description: The minimum number of participants.
        total:
          type: integer
          description: The maximum number of participants.
        is_full:
          type: boolean
          description: >
            Indicates if the event is full, i.e. booked is greater than or equal
            to total.
    Cancellation:
      type: object
      required:
        - reason
        - cancelled_on
        - cancelled_by
      properties:
        reason:
          type: string
          description: The reason for the cancellation.
        cancelled_on:
          type: string
          format: date-time
          description: The date and time when the event was cancelled.
        cancelled_by:
          type: string
          description: The unique identifier for the user who cancelled the event.
    BaseExperience:
      type: object
      required:
        - id
        - company_id
        - cutoff
        - name
        - created_at
        - updated_at
        - information_requests
        - languages
        - media
        - price
        - capacity
        - tag_ids
        - visibility
      properties:
        id:
          description: The unique identifier for the experience.
          type: string
        company_id:
          type: string
        cutoff:
          type: object
          description: The cutoff time for booking an event.
          required:
            - relative_to
            - duration
          properties:
            relative_to:
              type: string
              description: Indicates the reference point of the cutoff time.
              enum:
                - BEFORE_EVENT_START
                - AFTER_EVENT_START
                - BEFORE_EVENT_END
            duration:
              type: string
              description: >
                The duration relative to the reference point.

                For example, if the reference point is `BEFORE_EVENT_START` and
                the duration is

                `PT1H30M` then the cutoff time is 1 hour and 30 minutes before
                the event start time.
              format: ISO 8601
              example: PT2H30M
        name:
          type: string
          description: The name of the experience.
        practical_info:
          $ref: '#/components/schemas/MarkdownText'
          description: |
            A descriptive text about the experience.
        what_is_included:
          $ref: '#/components/schemas/MarkdownText'
          description: >
            Information about what is included in the experience.

            In bullet point or numbered format with each point seperated by a
            new line character.
        metadata:
          type: object
          properties:
            created_by:
              type: string
              description: The user ID of the person who created the experience.
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          description: Timestamp of when the booking was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp of when the booking was last updated.
        location_ids:
          type: array
          minItems: 1
          description: All the location IDs where the experience is offered.
          items:
            type: string
        languages:
          type: array
          description: >
            Array of languages the experience is offered in.


            Elements are two-letter [ISO
            639-1](https://en.wikipedia.org/wiki/ISO_639-1) langauge code
            format.
          items:
            $ref: '#/components/schemas/LanguageCode'
        media:
          type: object
          description: Media attached to the experience.
          required:
            - cover
          properties:
            primary_image:
              $ref: '#/components/schemas/Image'
            cover:
              type: array
              items:
                $ref: '#/components/schemas/Media'
        price:
          $ref: '#/components/schemas/Price'
        information_requests:
          type: array
          description: Contain any questions to be asked to the guest during checkout.
          items:
            $ref: '#/components/schemas/InformationRequest'
        capacity:
          type: integer
          format: int
          description: The total capacity of the experience.
        capacity_unit:
          type: object
          description: >
            Indicates unit of an experience.


            Depending on the `type`, the following options are available:


            - `SINGLE` => Tickets sold individually.

            - `GROUP` => Tickets sold in a range defined by `min_participants`
            and `max_participants`.
          oneOf:
            - type: object
              title: SINGLE
              required:
                - type
              properties:
                type:
                  type: string
                  description: Tickets sold individually.
                  enum:
                    - SINGLE
                name:
                  type: string
                  description: A custom name for the slot/seat/ticket.
            - type: object
              title: GROUP
              required:
                - type
                - min_participants
              properties:
                type:
                  type: string
                  description: >-
                    Tickets sold in a range defined by `min_participants` and
                    `max_participants`.
                  enum:
                    - GROUP
                name:
                  type: string
                  description: A custom name for the slot/seat/ticket.
                min_participants:
                  type: integer
                  format: int
                  minimum: 2
                  description: >
                    Applicable only when `type` is `GROUP`.


                    This indicates the minimum number of participants required
                    for a group booking.
                max_participants:
                  type: integer
                  format: int
                  minimum: 2
                  description: >
                    Applicable only when `type` is `GROUP`.


                    This indicates the max number of participants allowed for a
                    group booking.
        tag_ids:
          type: array
          description: |
            Array of tag IDs that are associated with the experience.

            Tags are used to categorize and filter experiences.
          items:
            type: string
            format: uuid
        visibility:
          type: string
          description: >
            Describes the visibility of the experience.


            If visibility is set to `PRIVATE` it should not be listed in public
            places like pages, widgets.

            Private experiences are used to allow for booking events by hosts
            them selves, e.g. private tours.
          enum:
            - PUBLIC
            - PRIVATE
    Experience:
      type: object
      allOf:
        - type: object
          discriminator:
            propertyName: is_shared
          oneOf:
            - type: object
              title: RegularExperience
              required:
                - is_shared
                - status
              properties:
                is_shared:
                  description: >-
                    This is a regular experience, i.e., is not a shared
                    experience.
                  type: boolean
                  default: false
                status:
                  description: Indicates the status of the experience.
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
                    - ARCHIVED
                    - DRAFT
            - type: object
              title: SharedExperience
              required:
                - is_shared
                - status
              properties:
                is_shared:
                  description: >
                    This is a shared experience, i.e., it is an experience that
                    is shared with your

                    company by another company.
                  type: boolean
                  default: true
                status:
                  description: Indicates the status of the experience.
                  type: string
                  enum:
                    - ACTIVE
                    - INACTIVE
                    - ARCHIVED
                owner_company_id:
                  type: string
                  format: uuid
                  description: The ID of the company that owns the experience.
                is_shared_by_owner:
                  type: boolean
                  description: Indicates if the experience is actively shared by the owner.
                  default: false
        - $ref: '#/components/schemas/BaseExperience'
    Price:
      type: object
      description: Detailed price information for the experience.
      required:
        - display_variant_id
        - variants
      properties:
        display_variant_id:
          type: string
          format: uuid
          description: The ID of the variant that should be used for display price.
        variants:
          type: array
          description: All the variants of tickets offered for the experience.
          items:
            type: object
            required:
              - id
              - name
              - price
            properties:
              id:
                type: string
                description: Unique ID for the variant.
              name:
                type: string
                description: |
                  Name of the variant.
              min:
                type: string
              explanation:
                type: string
                description: |
                  A description of the variant.
              price:
                $ref: '#/components/schemas/PriceBreakdown'
              addons:
                type: array
                description: Addons that can be selected for the variant.
                items:
                  $ref: '#/components/schemas/Addons'
    Addons:
      type: object
      required:
        - id
        - name
        - price
      properties:
        id:
          type: string
          format: uuid
          description: A unique identifier for the addon.
        name:
          type: string
          description: The name of the addon.
        explanation:
          type: string
          description: |
            An explanation or description of the addon.
        price:
          description: The price of the addon.
          $ref: '#/components/schemas/PriceBreakdown'
    PriceBreakdown:
      type: object
      required:
        - currency
        - vat_inclusive_cents
        - vat_amount_cents
        - vat_exlusive_cents
        - vat_setting
      properties:
        currency:
          type: string
          description: The currency of the price.
          example: DKK
        vat_inclusive_cents:
          type: number
          format: int
          description: The price in cents including VAT.
          example: 100
        vat_amount_cents:
          type: number
          format: int
          description: The VAT amount in cents.
          example: 20
        vat_exlusive_cents:
          type: number
          format: int
          description: The price in cents excluding VAT.
          example: 80
        vat_setting:
          type: object
          required:
            - country
            - vat_category
            - tax_type
            - rate
            - exempt
          properties:
            country:
              type: string
              description: The country code for the VAT setting.
              example: DK
            vat_category:
              type: string
              description: The VAT category for the price.
            tax_type:
              type: string
              description: The tax type for the price.
              enum:
                - VAT
                - SALES_TAX
                - GENERIC
            rate:
              type: number
              format: double
              description: The VAT rate.
              minimum: 0
              maximum: 0.99
              example: 0.25
            exempt:
              type: boolean
              description: Indicates if the price is exempt from VAT.
              default: false
    InformationRequest:
      type: object
      required:
        - id
        - required
        - scope
        - request
      properties:
        id:
          type: string
        required:
          type: boolean
        scope:
          enum:
            - BOOKING
            - TICKET
        request:
          type: string
    LanguageCode:
      title: LanguageCode
      type: string
      pattern: ^[a-z]{2}$
      format: iso-639-1
      description: >-
        Two-letter [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language
        code.
      examples:
        - en
        - da
        - sv
    Media:
      discriminator:
        propertyName: type
        mapping:
          IMAGE: '#/components/schemas/Image'
          VIDEO: '#/components/schemas/Video'
      oneOf:
        - $ref: '#/components/schemas/Image'
        - $ref: '#/components/schemas/Video'
    Image:
      type: object
      required:
        - type
        - url
        - mime_type
      properties:
        type:
          type: string
          enum:
            - IMAGE
        url:
          type: string
          format: uri
        preview_url:
          type: string
          format: uri
        mime_type:
          type: string
    Video:
      type: object
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - VIDEO
        url:
          type: string
          format: uri
    AcceptLanguageHeader:
      type: string
      example: en-GB; q=1.0, en-US; q=0.8
      description: >
        Combination of language and country/region.

        The format is a lowercase ISO 639-1 language code followed by an
        optional hyphen and an

        uppercase ISO 3166-1 country code.


        If no value matches what is available in the host's Storefront, an error
        response is returned.


        You can optionally provide multiple language-country pairs with a
        priority, separated by commas based on [content
        negotation](https://en.wikipedia.org/wiki/Content_negotiation).
    MarketingConsent:
      type: object
      required:
        - company_id
        - full_name
        - email
        - source
      properties:
        company_id:
          type: string
          description: The company's unique ID.
        full_name:
          type: string
          description: The full name of the person who has given marketing consent.
        email:
          type: string
          description: The email of the person who has given marketing consent.
        source:
          type: string
          description: The source from which the consent was given.
    Me:
      type: object
      properties:
        company_id:
          type: string
          description: Your company's ID.
        company_name:
          type: string
          description: Your company's Name.
        user_id:
          type: string
          description: Your user ID.
        email:
          type: string
          description: Your email.
