openapi: 3.1.0
info:
  title: MeetingPackage Distribution API
  description: >-
    The MeetingPackage Distribution API enables partners to search availability,
    create and manage bookings, issue RFPs, and receive real-time updates from
    MeetingPackage.
  version: 1.0.0
  termsOfService: https://meetingpackage.com/data-processing-and-general-terms
  license:
    name: Proprietary
    identifier: Internal
  contact:
    email: integrations@meetingpackage.com
servers:
  - url: https://api.meetingpackage.co
    description: Production
  - url: https://sandbox.meetingpackage.co
    description: Sandbox
security:
  - ApiKeyAuth: []
tags:
  - name: Configuration
    description: >-
      Operations related to system configuration, including fetching the list of
      all supported venues, and setting up event notification webhooks.
  - name: Bookings
    description: >-
      Operations related to orders/bookings, including viewing, creating,
      modifying and cancelling.
  - name: RFP
    description: >-
      Operations related to **RFPs (Requests For Proposal)**. Note RFPs are also
      called **leads**, i.e. group sales leads.
  - name: Webhooks
    description: >-
      Event notifications sent by MeetingPackage to partner endpoints. Use these
      to receive real-time updates rather than polling.
paths:
  /v1/rfp/lead_data:
    post:
      tags:
        - RFP
      operationId: sendRfpLead
      summary: Send RFP (lead data)
      description: >-
        Submit **RFP (Request For Proposal)**, also called a **lead** (group
        sales lead).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadDetails'
      responses:
        '200':
          description: Identifiers for the created RFP and for each targeted venue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendLeadDataResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/rfp/{group_id}:
    get:
      tags:
        - RFP
      operationId: getRfpGroupOrders
      summary: Get RFP group orders
      description: >
        Retrieve orders associated with an RFP parent (group) request. Use this
        after webhook events that reference an RFP ID / group ID, or to list all
        orders created for an RFP.
      parameters:
        - name: group_id
          in: path
          required: true
          description: >
            RFP group identifier. This value may appear as `group_booking_id` or
            `rfp_parent_id` in other responses.
          schema:
            type: string
          example: string
      responses:
        '200':
          description: List of orders associated with the given RFP group.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRfpOrdersResponse'
              examples:
                example:
                  summary: Example response
                  value:
                    orders:
                      - order_id: 123456
                        venue_id: 25465
                        external_venue_id: VENUE-HELSINKI-001
                        status: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v2/bookings/{booking_id}:
    get:
      tags:
        - Bookings
      operationId: getBookingDetails
      summary: Get booking details
      description: >-
        Retrieve an order/booking by ID and return extended order/booking
        information.
      parameters:
        - name: booking_id
          in: path
          description: Unique identifier of the booking
          required: true
          schema:
            $ref: '#/components/schemas/id'
      responses:
        '200':
          description: Booking details
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        $ref: '#/components/schemas/id'
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      contents:
                        type: array
                        items:
                          type: object
                          description: >-
                            Discount is 0 unless some discounts applied by
                            discount code or for some other reason.
                          properties:
                            price_without_tax:
                              type: integer
                              description: >-
                                A positive integer representing how much to
                                charge in the smallest currency unit (e.g., 100
                                cents to charge $1.00 or 100 to charge ¥100, a
                                zero-decimal currency).
                              example: 115
                              exclusiveMinimum: 0
                            price_with_tax:
                              type: integer
                              description: >-
                                A positive integer representing how much to
                                charge in the smallest currency unit (e.g., 100
                                cents to charge $1.00 or 100 to charge ¥100, a
                                zero-decimal currency).
                              example: 134
                              exclusiveMinimum: 0
                            negotiated_rate:
                              type: object
                              properties:
                                original_price_without_tax:
                                  type: integer
                                  description: >-
                                    A positive integer representing how much to
                                    charge in the smallest currency unit (e.g.,
                                    100 cents to charge $1.00 or 100 to charge
                                    ¥100, a zero-decimal currency).
                                  example: 150
                                  exclusiveMinimum: 0
                                original_price_with_tax:
                                  type: integer
                                  description: >-
                                    A positive integer representing how much to
                                    charge in the smallest currency unit (e.g.,
                                    100 cents to charge $1.00 or 100 to charge
                                    ¥100, a zero-decimal currency).
                                  example: 135
                                  exclusiveMinimum: 0
                                discounts:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - discountCode
                                          - campaign
                                          - custom
                                      description:
                                        type: string
                                        example: Discount code HELLO10
                                      amount:
                                        type: integer
                                        description: >-
                                          amount discounted from
                                          `originalPriceWithoutTax` in original
                                          price units.
                                        exclusiveMinimum: 0
                                    required:
                                      - amount
                                      - description
                                      - type
                              required:
                                - discounts
                                - original_price_with_tax
                                - original_price_without_tax
                            name:
                              type: string
                            revenue_details:
                              type: array
                              example:
                                - title: Room Rental
                                  price_without_tax: 100
                                  price_with_tax: 118
                                  negotiated_rate:
                                    discounts:
                                      - amount: 100
                                        description: >-
                                          50% discount for room hire when drinks
                                          ordered for 10 people.
                                        type: campaign
                                    original_price_without_tax: 200
                                    original_price_with_tax: 236
                                - title: Service Fee
                                  price_without_tax: 10
                                  price_with_tax: 13
                                - title: Tourist tax
                                  price_without_tax: 15
                                  price_with_tax: 15
                              items:
                                type: object
                                description: >-
                                  Discount is 0 unless some discounts applied by
                                  discount code or for some other reason.
                                properties:
                                  price_without_tax:
                                    type: integer
                                    description: >-
                                      A positive integer representing how much
                                      to charge in the smallest currency unit
                                      (e.g., 100 cents to charge $1.00 or 100 to
                                      charge ¥100, a zero-decimal currency).
                                    example: 115
                                    exclusiveMinimum: 0
                                  price_with_tax:
                                    type: integer
                                    description: >-
                                      A positive integer representing how much
                                      to charge in the smallest currency unit
                                      (e.g., 100 cents to charge $1.00 or 100 to
                                      charge ¥100, a zero-decimal currency).
                                    example: 134
                                    exclusiveMinimum: 0
                                  negotiated_rate:
                                    type: object
                                    properties:
                                      original_price_without_tax:
                                        type: integer
                                        description: >-
                                          A positive integer representing how much
                                          to charge in the smallest currency unit
                                          (e.g., 100 cents to charge $1.00 or 100
                                          to charge ¥100, a zero-decimal
                                          currency).
                                        example: 150
                                        exclusiveMinimum: 0
                                      original_price_with_tax:
                                        type: integer
                                        description: >-
                                          A positive integer representing how much
                                          to charge in the smallest currency unit
                                          (e.g., 100 cents to charge $1.00 or 100
                                          to charge ¥100, a zero-decimal
                                          currency).
                                        example: 135
                                        exclusiveMinimum: 0
                                      discounts:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              enum:
                                                - discountCode
                                                - campaign
                                                - custom
                                            description:
                                              type: string
                                              example: Discount code HELLO10
                                            amount:
                                              type: integer
                                              description: >-
                                                amount discounted from
                                                `originalPriceWithoutTax` in original
                                                price units.
                                              exclusiveMinimum: 0
                                          required:
                                            - amount
                                            - description
                                            - type
                                    required:
                                      - discounts
                                      - original_price_with_tax
                                      - original_price_without_tax
                                  title:
                                    type: string
                                required:
                                  - price_without_tax
                                  - title
                            includes:
                              type: array
                              description: >-
                                For DDR packages, will be array of package
                                items. For addons, will be array of addon items.
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                required:
                                  - name
                            category:
                              type: string
                              enum:
                                - menu
                                - service
                                - misc
                                - accommodation
                                - function-room
                          required:
                            - category
                            - includes
                            - name
                            - price_without_tax
                            - revenue_details
                      total_price_without_tax:
                        $ref: '#/components/schemas/PriceValue'
                      total_price_with_tax:
                        $ref: '#/components/schemas/PriceValue'
                      total_discount_without_tax:
                        $ref: '#/components/schemas/PriceValue'
                      status:
                        type: string
                        description: Order/booking status; May vary by configuration.
                      status_updated_at:
                        type: string
                        format: date-time
                      currency:
                        $ref: '#/components/schemas/Currency'
                      customer_id:
                        type: integer
                    required:
                      - contents
                      - created_at
                      - currency
                      - customer_id
                      - id
                      - status
                      - status_updated_at
                      - total_discount_without_tax
                      - total_price_without_tax
                      - updated_at
                required:
                  - data
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ResourceNotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v2/bookings:
    get:
      tags:
        - Bookings
      operationId: searchBookings
      summary: Search bookings
      description: |
        Search for orders/bookings by customer email.
      parameters:
        - name: email_id
          in: query
          required: true
          description: Customer email address to search by.
          schema:
            type: string
            format: email
          example: customer@example.com
      responses:
        '200':
          description: List of orders/bookings associated with the provided customer email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBookingsByEmailResponse'
              examples:
                example:
                  summary: Example response
                  value:
                    orders:
                      - order_id: 123456
                        rfp_parent_id: string
                        venue_id: 25465
                        status: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v2/configuration/venues:
    get:
      tags:
        - Configuration
      operationId: getVenueConfigurations
      summary: Get venue configurations
      description: >-
        Returns venue configurations for all venues active for your integration.
        Configuration includes the MeetingPackage venue ID, the external venue
        ID, the booking type, and the market segment.
      responses:
        '200':
          description: Venue configurations for all venues active for your integration.
          content:
            application/json:
              schema:
                type: object
                required:
                  - venues
                properties:
                  venues:
                    type: array
                    description: List of venues and their configuration metadata.
                    items:
                      $ref: '#/components/schemas/VenueConfiguration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-API-KEY
      in: header
  schemas:
    LeadVenueTarget:
      type: object
      properties:
        id:
          type: string
          description: >
            Stable partner-supplied venue identifier (_not_ a MeetingPackage
            venue ID). Mapped internally via partner configuration.
      required:
        - id
    PostalAddress:
      type: object
      properties:
        address:
          type: string
          description: Street address (combine multiple lines if needed).
        city:
          type: string
          description: City or locality.
        postal_code:
          type: string
          maxLength: 10
          description: Postal/ZIP code (<= 10 characters).
        state:
          type: string
          description: State / province.
        country_code:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO 3166-1 alpha-2 country code (e.g. US).
    AccountDetails:
      type: object
      properties:
        name:
          type: string
          description: >-
            Legal or trading name. Stable value that may be stored and reused
            for deduplication.
        email:
          type: string
          format: email
          description: General booking email.
        phone:
          type: string
          description: Phone number (E.164 preferred but not required).
        address:
          description: Postal address (or null when not provided).
          oneOf:
            - $ref: '#/components/schemas/PostalAddress'
            - type: 'null'
      required:
        - name
    LeadAccounts:
      type: object
      description: |
        Details of the end customer's company and/or the forwarding agency.
      properties:
        companyAccount:
          description: Company account details (or null when not provided).
          oneOf:
            - $ref: '#/components/schemas/AccountDetails'
            - type: 'null'
        agencyAccount:
          description: Agency account details (or null when not provided).
          oneOf:
            - $ref: '#/components/schemas/AccountDetails'
            - type: 'null'
    ContactDetails:
      type: object
      properties:
        firstName:
          type: string
          description: First name of the on-site contact.
        lastName:
          type: string
          description: Last name of the on-site contact.
        contactEmail:
          type: string
          format: email
          description: Email address for the contact.
        contactPhone:
          type: string
          description: Defaults to empty string when unavailable.
      required:
        - firstName
        - lastName
        - contactEmail
    LeadContacts:
      type: object
      description: >
        Primary human contacts associated with the company and/or agency
        accounts.

        Conditional requirements (not enforced by schema): - If companyAccount
        is provided, companyContact is required. - If agencyAccount is provided,
        agencyContact is required. - If neither account is provided,
        companyContact is required.
      properties:
        companyContact:
          description: Company contact details (or null when not provided).
          oneOf:
            - $ref: '#/components/schemas/ContactDetails'
            - type: 'null'
        agencyContact:
          description: Agency contact details (or null when not provided).
          oneOf:
            - $ref: '#/components/schemas/ContactDetails'
            - type: 'null'
    EventDetails:
      type: object
      properties:
        startDate:
          type: string
          format: date
          description: ISO date of the first event day.
        endDate:
          type: string
          format: date
          description: ISO date of the last event day.
        dateFlexibility:
          type: string
          enum:
            - strict
            - flexible
          description: Date flexibility for the event.
        bookingType:
          type: integer
          description: Booking type ID (see `Get all venue configurations`).
        bookingName:
          type: string
          description: Event or opportunity name/title.
        attendees:
          type: integer
          format: int32
          description: Total expected attendees.
      required:
        - startDate
        - endDate
        - dateFlexibility
        - bookingType
        - bookingName
        - attendees
    Opportunity:
      type: object
      properties:
        marketSegment:
          type: integer
          format: int64
          description: Market segment ID (see `Get all venue configurations`).
        commissionPercentage:
          type: number
          minimum: 0
          maximum: 100
          description: >
            Value between 0 and 100. Used to indicate agency commission when a
            booking is made through an agency.
      required:
        - marketSegment
    BedroomDayEntry:
      type: object
      properties:
        day:
          type: integer
          minimum: 1
          description: Integer >= 1 counting from eventDetails.startDate.
        quantity:
          type: integer
          minimum: 0
          description: Number of rooms required that day.
        breakfast:
          type: boolean
          description: Breakfast included flag.
        occupancy:
          type: string
          description: Optional room occupancy (free text).
      required:
        - day
        - quantity
        - breakfast
    BedroomsRequirements:
      type: object
      description: >-
        Object keyed by free-text room type name. Each value is an array of day
        entries.
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/BedroomDayEntry'
    TimeHHMM:
      type: string
      description: 24h time in hh:mm format.
      pattern: ^([01]\d|2[0-3]):[0-5]\d$
      example: '15:30'
    MeetingRoomDayEntry:
      type: object
      properties:
        day:
          type: integer
          minimum: 1
          description: Integer >= 1 counting from eventDetails.startDate.
        attendees:
          type: integer
          minimum: 0
          description: Delegate count for the slot.
        startTime:
          $ref: '#/components/schemas/TimeHHMM'
        endTime:
          $ref: '#/components/schemas/TimeHHMM'
        layout:
          type: string
          enum:
            - anything_goes
            - cocktail
            - ushape
            - boardroom
            - theater
            - classroom
            - banquet
            - cabaret
          description: Room layout style.
      required:
        - day
        - attendees
        - startTime
        - endTime
        - layout
    MeetingRoomsRequirements:
      type: object
      description: >-
        Object keyed by free-text meeting room name. Each value is an array of
        day slots.
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/MeetingRoomDayEntry'
    FoodAndBeverageDayEntry:
      type: object
      properties:
        day:
          type: integer
          minimum: 1
          description: Integer >= 1 counting from eventDetails.startDate.
        attendees:
          type: integer
          minimum: 0
          description: >-
            Headcount the catering covers (optional when same as meeting room
            attendees).
        startTime:
          $ref: '#/components/schemas/TimeHHMM'
      required:
        - day
        - startTime
    FoodAndBeverageRequirements:
      type: object
      description: >-
        Object keyed by free-text catering item name. Each value is an array of
        day entries.
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/FoodAndBeverageDayEntry'
    EquipmentDayEntry:
      type: object
      properties:
        day:
          type: integer
          minimum: 1
          description: Integer >= 1 counting from eventDetails.startDate.
        quantity:
          type: integer
          minimum: 0
          default: 1
          description: Quantity required (defaults to 1 if omitted).
        startTime:
          description: hh:mm or null when unknown.
          oneOf:
            - $ref: '#/components/schemas/TimeHHMM'
            - type: 'null'
        endTime:
          description: hh:mm or null when unknown.
          oneOf:
            - $ref: '#/components/schemas/TimeHHMM'
            - type: 'null'
      required:
        - day
    EquipmentRequirements:
      type: object
      description: >-
        Object keyed by free-text equipment name. Each value is an array of
        entries.
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/EquipmentDayEntry'
    GroupRequest:
      type: object
      properties:
        eventDetails:
          $ref: '#/components/schemas/EventDetails'
        opportunity:
          $ref: '#/components/schemas/Opportunity'
        bedrooms:
          description: >
            Accommodation requirements keyed by free-text room type name. May be
            null; treated the same as an empty object.
          oneOf:
            - $ref: '#/components/schemas/BedroomsRequirements'
            - type: 'null'
        meetingRooms:
          description: >
            Meeting room requirements keyed by free-text room name. May be null;
            treated the same as an empty object.
          oneOf:
            - $ref: '#/components/schemas/MeetingRoomsRequirements'
            - type: 'null'
        fAndB:
          description: >
            Catering requirements keyed by free-text item name. May be null;
            treated the same as an empty object.
          oneOf:
            - $ref: '#/components/schemas/FoodAndBeverageRequirements'
            - type: 'null'
        equipment:
          description: >
            Equipment requirements keyed by free-text equipment name. May be
            null; treated the same as an empty object.
          oneOf:
            - $ref: '#/components/schemas/EquipmentRequirements'
            - type: 'null'
        internalNote:
          type: string
          description: >-
            Free-text note included with the group request for venue reference.
            Plain text only.
        languageCode:
          type: string
          description: ISO language tag.
          default: en-GB
        provisionalHoldDate:
          description: ISO 8601 date when a provisional hold should expire.
          oneOf:
            - type: string
              format: date
            - type: 'null'
        fAndBMinimumSpend:
          description: Numeric minimum spend requirement in cents.
          oneOf:
            - type: number
            - type: 'null'
      required:
        - eventDetails
        - opportunity
    LeadDetails:
      type: object
      description: >
        RFP / lead submission payload. All date and date-time fields must use
        ISO 8601. Time-only fields must use 24h hh:mm.
      properties:
        leadReference:
          type: string
          description: >
            Optional partner reference that can be echoed back. If not provided,
            MeetingPackage will generate one internally.
        venues:
          type: array
          description: >-
            List of venue targets referenced by partner-supplied venue
            identifier.
          items:
            $ref: '#/components/schemas/LeadVenueTarget'
          minItems: 1
        accounts:
          $ref: '#/components/schemas/LeadAccounts'
        contacts:
          $ref: '#/components/schemas/LeadContacts'
        groupRequest:
          $ref: '#/components/schemas/GroupRequest'
      required:
        - venues
        - contacts
        - groupRequest
    RfpVenueEntry:
      type: object
      required:
        - order_id
        - mp_venue_id
      properties:
        order_id:
          type: integer
          description: >
            Unique (order -> proposal -> booking) identifier. This is a key
            identifier for downstream events and retrieval endpoints (e.g.
            webhooks and booking retrieval).
          example: 123456
        mp_venue_id:
          type: integer
          description: MeetingPackage unique venue identifier.
          example: 25465
        external_venue_id:
          description: >-
            External venue identifier. May be null depending on integration
            mapping.
          oneOf:
            - type: string
            - type: 'null'
          example: VENUE-HELSINKI-001
    SendLeadDataResponse:
      type: object
      required:
        - rfp_details
      properties:
        rfp_details:
          type: object
          required:
            - id
            - rfps
          properties:
            id:
              type: string
              description: >-
                MeetingPackage unique identifier for the submitted RFP/group
                request.
              example: string
            rfps:
              type: array
              description: >-
                One entry per venue targeted by the RFP distribution. Each entry
                corresponds to the RFP as distributed to a specific venue.
              items:
                $ref: '#/components/schemas/RfpVenueEntry'
    Error:
      type: object
      description: Error information
      properties:
        message:
          type: string
          description: Human-readable error message
    RfpOrderSummary:
      type: object
      required:
        - order_id
        - venue_id
        - status
      properties:
        order_id:
          type: integer
          description: >-
            MeetingPackage unique identifier for the order created for this
            venue target.
          example: 123456
        venue_id:
          type: integer
          description: MeetingPackage unique identifier of the venue.
          example: 25465
        external_venue_id:
          type: string
          description: External venue identifier (if available).
          example: VENUE-HELSINKI-001
        status:
          type: string
          description: Order/booking status. Values may vary by configuration.
          example: string
    GetRfpOrdersResponse:
      type: object
      required:
        - orders
      properties:
        orders:
          type: array
          description: One order per venue targeted by the RFP group request.
          items:
            $ref: '#/components/schemas/RfpOrderSummary'
    id:
      type: integer
      description: Unique identifier for an entity (such as venue or booking).
      exclusiveMinimum: 0
      example: 1234
    PriceValue:
      type: integer
      description: >-
        A positive integer representing how much to charge in the smallest
        currency unit (e.g. 100 cents to charge $1.00 or 100 to charge ¥100, a
        zero-decimal currency).
      example: 100
      exclusiveMinimum: 0
    Currency:
      type: string
      description: >-
        ISO 4217 currency code accepted by the venue (ref.
        https://en.wikipedia.org/wiki/ISO_4217)
      example: EUR
    BookingSummary:
      type: object
      required:
        - order_id
        - rfp_parent_id
        - venue_id
        - status
      properties:
        order_id:
          type: integer
          format: int64
          description: Internal unique identifier for the order/booking.
          example: 123456
        rfp_parent_id:
          type: string
          description: >-
            Identifier linking this order/booking back to the parent RFP
            (group).
          example: string
        venue_id:
          type: integer
          format: int64
          description: Internal unique identifier of the venue.
          example: 25465
        status:
          type: string
          description: >
            Current status for the order/booking. Values may vary by
            configuration.
          example: string
    GetBookingsByEmailResponse:
      type: object
      required:
        - orders
      properties:
        orders:
          type: array
          description: List of orders/bookings associated with the given customer email.
          items:
            $ref: '#/components/schemas/BookingSummary'
    VenueConfigurationOption:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          description: Internal identifier of the configuration option.
          example: 1
        name:
          type: string
          description: Human-readable name of the configuration option.
          example: corporate
    VenueConfigurationDetails:
      type: object
      properties:
        market_segments:
          type: array
          description: Market segments supported by the venue.
          items:
            $ref: '#/components/schemas/VenueConfigurationOption'
        booking_types:
          type: array
          description: Booking or event types supported by the venue.
          items:
            $ref: '#/components/schemas/VenueConfigurationOption'
    VenueConfiguration:
      type: object
      required:
        - id
        - name
        - configuration
      properties:
        id:
          type: integer
          description: MeetingPackage unique identifier of the venue.
          example: 25465
        name:
          type: string
          description: Human-readable venue name.
          example: MP test
        external_id:
          type: string
          description: External system identifier for the venue.
          example: ICMSP571
        configuration:
          $ref: '#/components/schemas/VenueConfigurationDetails'
  responses:
    BadRequest:
      description: Invalid request payload or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication required or failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: The user has sent too many requests in a given amount of time.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: The server couldn't complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: The server couldn't complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ResourceNotFound:
      description: The requested resource could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
webhooks:
  bookingUpdate:
    post:
      tags:
        - Webhooks
      operationId: bookingUpdateWebhook
      summary: Booking update
      description: >-
        Notification of a change to an order/booking. Call the relevant GET
        operation to fetch details about the order/booking.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  $ref: '#/components/schemas/id'
                changed_at:
                  type: integer
                  description: Unix timestamp (seconds since epoch) for change event.
                  examples:
                    - 1735512345
      responses:
        '200':
          description: Notification event received OK.
  venueVisibility:
    post:
      tags:
        - Webhooks
      operationId: venueVisibilityUpdateWebhook
      summary: Venue visibility update
      description: >-
        Notification of a change to venue visibility, i.e. whether the venue is
        active or not.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                venue_id:
                  $ref: '#/components/schemas/id'
                visible:
                  type: boolean
                  description: true if the venue is active and visible.
                  examples:
                    - true
      responses:
        '200':
          description: Notification event received OK.
