openapi: 3.1.0
info:
  title: ONDA Vendor API 3.0
  description: ONDA Vendor API 3.0 — vendor integration API
  version: 3.0.0
servers:
  - url: "{base_url}"
    description: Base URL per environment is provided by your ONDA contact
    variables:
      base_url:
        default: "{base_url}"
tags:
  - name: content-meta
    description: Code Catalog
    x-displayName: Code Catalog
  - name: content-property
    description: Property Management
    x-displayName: Property Management
  - name: content-roomtype
    description: Room Type Management
    x-displayName: Room Type Management
  - name: content-rateplan-model
    description: Rate Plan Model Management
    x-displayName: Rate Plan Model Management
  - name: content-rateplan
    description: Rate Plan Management
    x-displayName: Rate Plan Management
  - name: content-license
    description: Submit License
    x-displayName: Submit License
  - name: ari
    description: Availability, Rates, and Business Days
    x-displayName: Availability, Rates, and Business Days
  - name: reservation
    description: Booking Lookup and Settlement
    x-displayName: Booking Lookup and Settlement
  - name: channel
    description: Channel Information, Settings, and Status
    x-displayName: Channel Information
  - name: channel-open
    description: Channel Requests and Status by Property
    x-displayName: Channel Requests and Status
  - name: channel-setting
    description: Per-Channel Settings for Property, Room Type, and Rate Plan
    x-displayName: Per-Channel Sales Settings
  - name: channel-mapping
    description: Channel Mapping Management
    x-displayName: Channel Mapping Management
  - name: webhook-ari
    description: Availability and Rate Lookup (implemented by vendor)
    x-displayName: Cancellation and Refund Policy
  - name: webhook-reservation
    description: Booking Processing (implemented by vendor)
    x-displayName: Booking Processing
components:
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization
      description: Vendor access token
  schemas:
    MetaResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            classification:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            property:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            facility:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            service:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            attraction:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            roomtype:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            amenity:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
            view:
              type: array
              items:
                $ref: "#/components/schemas/MetaCodeNode"
          required:
            - classification
            - property
            - facility
            - service
            - attraction
            - roomtype
            - amenity
            - view
          description: Code catalog by code_type
      required:
        - data
    MetaCodeNode:
      type: object
      properties:
        code:
          type: string
          description: pcs.codes.code
          example: FACI1D300030
        name:
          type: string
          description: Code names by locale
          example: Parking
        children:
          type: array
          items:
            $ref: "#/components/schemas/MetaCodeNode"
          description: Child code list (omitted for leaf nodes with no children)
      required:
        - code
        - name
    PostPropertyBody:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ContentStatus"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/PropertyI18n"
          description: Content by locale. ko-KR is required when creating; one entry per locale.
        email:
          type: string
          format: email
          description: Primary email
          example: hello@example.com
        phone:
          type: string
          description: Primary phone
          example: 02-0000-0000
        sms_phone:
          type: string
          description: SMS sender number
        checkin:
          type: string
          pattern: ^\d{2}:\d{2}$
          description: Check-in time (HH:mm)
          example: "15:00"
        checkout:
          type: string
          pattern: ^\d{2}:\d{2}$
          description: Check-out time (HH:mm)
          example: "11:00"
        website:
          type: string
          format: uri
          description: Primary website
        refunds:
          type: object
          additionalProperties:
            type: number
          description: "Refund policy. Keys use the `0d`/`1d` form for how many days before check-in, and values are refund rates (%). For example, `1d: 30` means cancelling one day before check-in refunds 30%."
          example:
            0d: 0
            1d: 30
            2d: 50
            3d: 70
            4d: 80
            5d: 90
            6d: 100
        classifications:
          type: array
          items:
            type: string
          description: Property classifications
        property_tags:
          type: array
          items:
            type: string
          description: Property tags
        facility_tags:
          type: array
          items:
            type: string
          description: Facility tags
        service_tags:
          type: array
          items:
            type: string
          description: Service tags
        attraction_tags:
          type: array
          items:
            type: string
          description: Nearby attraction tags
        photos:
          type: array
          items:
            $ref: "#/components/schemas/Photo"
          description: Property images
        settings:
          type: object
          properties:
            extra_adult_price:
              type:
                - integer
                - "null"
              minimum: 0
              description: Default extra adult charge for the property (integer KRW; sending null clears it)
          description: Property settings
        id:
          type: string
          maxLength: 40
          description: Vendor property ID (max 40 characters)
          example: VP-001
      required:
        - id
    ContentStatus:
      type: string
      enum:
        - enabled
        - disabled
      description: Status
      example: enabled
    PropertyI18n:
      type: object
      properties:
        locale:
          $ref: "#/components/schemas/Locale"
        name:
          type: string
          description: Property name
          example: Seoul Hotel
        description:
          type: string
          description: Property description
        address:
          type: string
          description: Address (road name or lot number) on a single line.
          example: 30 Euljiro, Jung-gu, Seoul
        address_detail:
          type: string
          description: Address detail (building, block, floor, unit). Provide together with address.
          example: 10F, Room 1001
        notice:
          type: string
          description: General notice
        reservation_description:
          type: string
          description: Booking notice
        refunds_description:
          type: string
          description: Refund notice
      required:
        - locale
    Locale:
      type: string
      enum:
        - ko-KR
        - en-US
        - zh-CN
        - ja-JP
        - vn-VN
        - th-TH
        - zh-TW
      description: locale
      example: ko-KR
    Photo:
      type: object
      properties:
        url:
          type: string
          description: Image URL
          example: https://cdn.example.com/p/1.jpg
        description:
          type: string
          description: Image caption
        order:
          type: integer
          minimum: 0
          description: Sort order
          example: 0
      required:
        - url
        - order
    PropertyContent:
      type: object
      properties:
        id:
          type: string
          description: Vendor property ID
          example: VP-001
        status:
          $ref: "#/components/schemas/ContentStatus"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/PropertyI18n"
        email:
          type: string
        phone:
          type: string
        sms_phone:
          type: string
        checkin:
          type: string
          description: Check-in time (HH:mm)
          example: "15:00"
        checkout:
          type: string
          description: Check-out time (HH:mm)
          example: "11:00"
        website:
          type: string
        refunds:
          description: Refund policy. Keys use the `0d`/`1d` form for how many days before check-in, and values are refund rates (%).
          type: object
          additionalProperties:
            type: number
        classifications:
          type: array
          items:
            type: string
        property_tags:
          type: array
          items:
            type: string
        facility_tags:
          type: array
          items:
            type: string
        service_tags:
          type: array
          items:
            type: string
        attraction_tags:
          type: array
          items:
            type: string
        photos:
          type: array
          items:
            $ref: "#/components/schemas/Photo"
        settings:
          type: object
          properties:
            extra_adult_price:
              type:
                - number
                - "null"
          required:
            - extra_adult_price
      required:
        - id
        - status
        - i18n
        - classifications
        - property_tags
        - facility_tags
        - service_tags
        - attraction_tags
        - photos
        - settings
    PatchPropertyBody:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ContentStatus"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/PropertyI18n"
          description: Content by locale. ko-KR is required when creating; one entry per locale.
        email:
          type: string
          format: email
          description: Primary email
          example: hello@example.com
        phone:
          type: string
          description: Primary phone
          example: 02-0000-0000
        sms_phone:
          type: string
          description: SMS sender number
        checkin:
          type: string
          pattern: ^\d{2}:\d{2}$
          description: Check-in time (HH:mm)
          example: "15:00"
        checkout:
          type: string
          pattern: ^\d{2}:\d{2}$
          description: Check-out time (HH:mm)
          example: "11:00"
        website:
          type: string
          format: uri
          description: Primary website
        refunds:
          type: object
          additionalProperties:
            type: number
          description: Refund policy. Keys use the `0d`/`1d` form for how many days before check-in, and values are refund rates (%). The map you send replaces the policy entirely, so include the full policy even when changing only part of it.
          example:
            0d: 0
            1d: 30
            2d: 50
            3d: 70
            4d: 80
            5d: 90
            6d: 100
        classifications:
          type: array
          items:
            type: string
          description: Property classifications
        property_tags:
          type: array
          items:
            type: string
          description: Property tags
        facility_tags:
          type: array
          items:
            type: string
          description: Facility tags
        service_tags:
          type: array
          items:
            type: string
          description: Service tags
        attraction_tags:
          type: array
          items:
            type: string
          description: Nearby attraction tags
        photos:
          type: array
          items:
            $ref: "#/components/schemas/Photo"
          description: Property images
        settings:
          type: object
          properties:
            extra_adult_price:
              type:
                - integer
                - "null"
              minimum: 0
              description: Default extra adult charge for the property (integer KRW; sending null clears it)
          description: Property settings
    PostRoomtypeBody:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ContentStatus"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/RoomtypeI18nItem"
          description: Content by locale. ko-KR is required when creating.
        min_stay:
          type: integer
          exclusiveMinimum: 0
          description: Minimum length of stay
        max_stay:
          type: integer
          exclusiveMinimum: 0
          description: Maximum length of stay
        size:
          type: number
          description: Area
        standard_capacity:
          type: integer
          exclusiveMinimum: 0
          description: Standard occupancy
        max_capacity:
          type: integer
          exclusiveMinimum: 0
          description: Maximum occupancy
        roomtype_tags:
          type: array
          items:
            type: string
          description: Room type tags
        amenity_tags:
          type: array
          items:
            type: string
          description: Amenity tags
        view_tags:
          type: array
          items:
            type: string
          description: View tags
        details:
          $ref: "#/components/schemas/RoomtypeDetails"
        bedtype:
          $ref: "#/components/schemas/Bedtype"
        photos:
          type: array
          items:
            $ref: "#/components/schemas/Photo"
          description: Room images
        id:
          type: string
          maxLength: 40
          description: Vendor room type ID (max 40 characters)
          example: VRT-001
      required:
        - id
    RoomtypeI18nItem:
      type: object
      properties:
        locale:
          $ref: "#/components/schemas/Locale"
        name:
          type: string
          description: Room name
          example: Deluxe Double
        description:
          type: string
          description: Room description
      required:
        - locale
    RoomtypeDetails:
      type: object
      additionalProperties:
        type: number
      description: Room composition. Keys are components such as `room`, `bedroom`, and `bathroom`; values are counts.
      example:
        room: 1
        bedroom: 1
        bathroom: 1
    Bedtype:
      type: object
      properties:
        single_beds:
          type: integer
          minimum: 0
          description: Single bed count
        double_beds:
          type: integer
          minimum: 0
          description: Double bed count
        bunk_beds:
          type: integer
          minimum: 0
          description: Bunk bed count
    RoomtypeContent:
      type: object
      properties:
        id:
          type: string
          description: Vendor room type ID
          example: VRT-001
        status:
          $ref: "#/components/schemas/ContentStatus"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/RoomtypeI18nItem"
        min_stay:
          type: number
        max_stay:
          type: number
        size:
          type: number
        standard_capacity:
          type: number
        max_capacity:
          type: number
        roomtype_tags:
          type: array
          items:
            type: string
        amenity_tags:
          type: array
          items:
            type: string
        view_tags:
          type: array
          items:
            type: string
        details:
          $ref: "#/components/schemas/RoomtypeDetails"
        bedtype:
          $ref: "#/components/schemas/Bedtype"
        photos:
          type: array
          items:
            $ref: "#/components/schemas/Photo"
      required:
        - id
        - status
        - i18n
        - roomtype_tags
        - amenity_tags
        - view_tags
        - photos
    PatchRoomtypeBody:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ContentStatus"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/RoomtypeI18nItem"
          description: Content by locale. ko-KR is required when creating.
        min_stay:
          type: integer
          exclusiveMinimum: 0
          description: Minimum length of stay
        max_stay:
          type: integer
          exclusiveMinimum: 0
          description: Maximum length of stay
        size:
          type: number
          description: Area
        standard_capacity:
          type: integer
          exclusiveMinimum: 0
          description: Standard occupancy
        max_capacity:
          type: integer
          exclusiveMinimum: 0
          description: Maximum occupancy
        roomtype_tags:
          type: array
          items:
            type: string
          description: Room type tags
        amenity_tags:
          type: array
          items:
            type: string
          description: Amenity tags
        view_tags:
          type: array
          items:
            type: string
          description: View tags
        details:
          $ref: "#/components/schemas/RoomtypeDetails"
        bedtype:
          $ref: "#/components/schemas/Bedtype"
        photos:
          type: array
          items:
            $ref: "#/components/schemas/Photo"
          description: Room images
    PostRateplanModelBody:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/RateplanModelType"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/RateplanModelI18nItem"
          minItems: 1
          description: Content by locale. ko-KR is required.
        sale_from:
          type: string
          format: date
          description: Sale start date
        sale_to:
          type: string
          format: date
          description: Sale end date
        min_los:
          type: integer
          exclusiveMinimum: 0
          description: Minimum length of stay
        max_los:
          type: integer
          exclusiveMinimum: 0
          description: Maximum length of stay
        refundable:
          type: boolean
          description: Refundable
        meals:
          $ref: "#/components/schemas/Meals"
        channels:
          type: array
          items:
            type: integer
            exclusiveMinimum: 0
          description: List of sales channel IDs.
        id:
          type: string
          maxLength: 40
          description: Vendor rate plan model ID (max 40 characters)
          example: VRPM-001
      required:
        - i18n
        - id
    RateplanModelType:
      type: string
      enum:
        - standalone
        - package
      description: Rate plan model type (standalone | package). A package model applies a difference (rate_modify) against the base rate.
      example: standalone
    RateplanModelI18nItem:
      type: object
      properties:
        locale:
          $ref: "#/components/schemas/Locale"
        name:
          type: string
          description: Rate plan model name
          example: Standard Rate
        description:
          type: string
          description: Rate plan model description
      required:
        - locale
    Meals:
      type: object
      properties:
        breakfast:
          type: boolean
          description: Breakfast included
        lunch:
          type: boolean
          description: Lunch included
        dinner:
          type: boolean
          description: Dinner included
      required:
        - breakfast
        - lunch
        - dinner
      description: Meals included
    RateplanModelContent:
      type: object
      properties:
        id:
          type: string
          description: Vendor rate plan model ID
          example: VRPM-001
        vendor_property_id:
          type: string
          description: Vendor property ID
          example: VP-001
        type:
          $ref: "#/components/schemas/RateplanModelType"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/RateplanModelI18nItem"
          minItems: 1
          description: Content by locale. ko-KR is required.
        sale_from:
          type: string
        sale_to:
          type: string
        min_los:
          type: number
        max_los:
          type: number
        refundable:
          type: boolean
        meals:
          $ref: "#/components/schemas/Meals"
        channels:
          type: array
          items:
            type: integer
            exclusiveMinimum: 0
          description: List of channel IDs currently on sale. The field is absent when the item is sold on all channels.
      required:
        - id
        - vendor_property_id
        - type
        - i18n
        - refundable
    PatchRateplanModelBody:
      type: object
      properties:
        type:
          $ref: "#/components/schemas/RateplanModelType"
        i18n:
          type: array
          items:
            $ref: "#/components/schemas/RateplanModelI18nItem"
          minItems: 1
          description: Content by locale. ko-KR is required.
        sale_from:
          type:
            - string
            - "null"
          format: date
          description: Sale start date (sending null clears it)
        sale_to:
          type:
            - string
            - "null"
          format: date
          description: Sale end date (sending null clears it)
        min_los:
          type:
            - integer
            - "null"
          exclusiveMinimum: 0
          description: Minimum length of stay (sending null clears it)
        max_los:
          type:
            - integer
            - "null"
          exclusiveMinimum: 0
          description: Maximum length of stay (sending null clears it)
        refundable:
          type: boolean
          description: Refundable
        meals:
          $ref: "#/components/schemas/Meals"
        channels:
          type:
            - array
            - "null"
          items:
            type: integer
            exclusiveMinimum: 0
          description: List of sales channel IDs. Sending null or an empty array resets it to all channels.
      required:
        - i18n
    PostRateplanBody:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ContentStatus"
        id:
          type: string
          maxLength: 40
          description: Vendor rate plan ID (max 40 characters)
          example: VRP-001
        vendor_rateplan_model_id:
          type: string
          maxLength: 40
          description: Vendor rate plan model ID (max 40 characters)
          example: VRPM-001
      required:
        - id
        - vendor_rateplan_model_id
    RateplanContent:
      type: object
      properties:
        id:
          type: string
          description: Vendor rate plan ID
          example: VRP-001
        vendor_property_id:
          type: string
          description: Vendor property ID
          example: VP-001
        vendor_roomtype_id:
          type: string
          description: Vendor room type ID
          example: VRT-001
        vendor_rateplan_model_id:
          type: string
          description: Vendor rate plan model ID
          example: VRPM-001
        status:
          $ref: "#/components/schemas/ContentStatus"
        type:
          $ref: "#/components/schemas/RateplanModelType"
      required:
        - id
        - vendor_property_id
        - vendor_roomtype_id
        - vendor_rateplan_model_id
        - status
        - type
    PatchRateplanBody:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/ContentStatus"
    LicenseSubmitResult:
      type: object
      properties:
        id:
          type: integer
          description: Request ID
          example: 101
        type:
          type: string
          enum:
            - permit
            - business
          description: Document type
          example: permit
        status:
          type: string
          enum:
            - pending
            - confirm
            - reject
          description: Review status. A submission starts as `pending` and becomes `confirm` (approved) or `reject` (rejected) after review.
          example: pending
        reason:
          type:
            - string
            - "null"
          description: Reason for the most recent status change, usually set on `reject`. A request rejected because it was resubmitted holds `Superseded by request {new request ID}`.
          example: null
        created_at:
          type: string
          description: Submitted at (ISO 8601)
          example: "2026-10-07T11:00:00+09:00"
        updated_at:
          type: string
          description: Last updated at (ISO 8601)
          example: "2026-10-07T11:00:00+09:00"
      required:
        - id
        - type
        - status
        - reason
        - created_at
        - updated_at
    PermitRequestBody:
      type: object
      properties:
        type:
          type: string
          enum:
            - permit
          description: Document type. Use this to submit a license document (business report certificate, tourism business registration, rural homestay registration, etc.).
          example: permit
        data:
          type: object
          properties:
            type:
              type: string
              enum:
                - general_lodging
                - residential_lodging
                - foreign_tourist_urban_homestay
                - hanok_experience
                - rural_homestay
                - tourist_hotel
                - floating_tourist_hotel
                - korean_traditional_hotel
                - family_hotel
                - hostel
                - small_hotel
                - medical_tourism_hotel
                - youth_hostel
                - resort_condominium
                - tourist_pension
                - resort_pension
                - general_campground
                - auto_campground
                - forest_lodge
                - gosiwon
                - shared_homestay
                - specialized_resort
              description: License type code. See the table in the [License Submission guide](/en/docs/api/vendor-v3/guides/initial-setup-license#permit-type-codes) for what each code means.
              example: general_lodging
            number:
              type: string
              minLength: 1
              maxLength: 254
              description: Report or registration number on the document (max 254 characters)
              example: No. 2026-00123
            date:
              type: string
              format: date
              description: Report or registration date (YYYY-MM-DD). Future dates are rejected (Korea time).
              example: "2026-03-02"
            file:
              type: string
              minLength: 1
              description: Document file as a base64-encoded string. Accepts jpeg, png, gif, webp, and pdf.
              example: JVBERi0xLjQKJeLjz9MK
          required:
            - type
            - number
            - date
            - file
          description: License document fields and file
        comment:
          type: string
          maxLength: 16000
          description: Memo (optional, up to 16,000 characters). Notes for the reviewer.
          example: Document reissued in March 2026.
      required:
        - type
        - data
    BusinessRequestBody:
      type: object
      properties:
        type:
          type: string
          enum:
            - business
          description: Document type. Use this to submit a business registration certificate.
          example: business
        data:
          type: object
          properties:
            type:
              type: string
              enum:
                - corporation
                - personal
              description: Business entity type. `corporation` is a corporate business and `personal` is a sole proprietor. For a corporation, `name`, `address`, `industry`, and `category` are also required.
              example: corporation
            number:
              type: string
              description: 10-digit business registration number, with or without hyphens. Rejected with 400 if the length or checksum is invalid.
              example: 123-45-67891
            owner_name:
              type: string
              minLength: 1
              maxLength: 128
              description: Representative name (max 128 characters)
              example: Hong Gil-dong
            open_date:
              type: string
              format: date
              description: Business opening date (YYYY-MM-DD). Future dates are rejected (Korea time).
              example: "2020-05-01"
            name:
              type: string
              minLength: 1
              maxLength: 254
              description: Business name (max 254 characters). Required for a corporation, optional for a sole proprietor.
              example: Example Hotel Co., Ltd.
            address:
              type: string
              minLength: 1
              maxLength: 254
              description: Business address (max 254 characters). Required for a corporation, optional for a sole proprietor.
              example: 1 Teheran-ro, Gangnam-gu, Seoul
            industry:
              type: string
              minLength: 1
              maxLength: 64
              description: Industry (max 64 characters). Required for a corporation, optional for a sole proprietor.
              example: Lodging
            category:
              type: string
              minLength: 1
              maxLength: 64
              description: Business category (max 64 characters). Required for a corporation, optional for a sole proprietor.
              example: Hotel
            file:
              type: string
              minLength: 1
              description: Business registration certificate file as a base64-encoded string. Accepts jpeg, png, gif, webp, and pdf.
              example: JVBERi0xLjQKJeLjz9MK
          required:
            - type
            - number
            - owner_name
            - open_date
            - file
          description: Business registration fields and file
        comment:
          type: string
          maxLength: 16000
          description: Memo (optional, up to 16,000 characters). Notes for the reviewer.
          example: Document reissued in March 2026.
      required:
        - type
        - data
    LicenseRequestList:
      type: object
      properties:
        count:
          type: integer
          description: Total number of requests for the property
          example: 1
        offset:
          type: integer
          description: Number of requests skipped
          example: 0
        limit:
          type: integer
          description: Number of requests returned
          example: 100
        licenses:
          type: array
          items:
            $ref: "#/components/schemas/LicenseRequest"
          description: Requests, newest first.
      required:
        - count
        - offset
        - limit
        - licenses
    LicenseRequest:
      type: object
      properties:
        id:
          type: integer
          description: Request ID
          example: 101
        type:
          type: string
          enum:
            - permit
            - business
          description: Document type
          example: permit
        status:
          type: string
          enum:
            - pending
            - confirm
            - reject
          description: Review status. A submission starts as `pending` and becomes `confirm` (approved) or `reject` (rejected) after review.
          example: pending
        comment:
          type:
            - string
            - "null"
          description: Memo sent with the submission. null if none was sent.
          example: null
        reason:
          type:
            - string
            - "null"
          description: Reason for the most recent status change, usually set on `reject`. A request rejected because it was resubmitted holds `Superseded by request {new request ID}`.
          example: null
        created_at:
          type: string
          description: Submitted at (ISO 8601)
          example: "2026-10-07T11:00:00+09:00"
        updated_at:
          type: string
          description: Last updated at (ISO 8601)
          example: "2026-10-07T11:00:00+09:00"
      required:
        - id
        - type
        - status
        - comment
        - reason
        - created_at
        - updated_at
    LicenseRequestDetail:
      type: object
      properties:
        id:
          type: integer
          description: Request ID
          example: 101
        type:
          type: string
          enum:
            - permit
            - business
          description: Document type
          example: permit
        status:
          type: string
          enum:
            - pending
            - confirm
            - reject
          description: Review status. A submission starts as `pending` and becomes `confirm` (approved) or `reject` (rejected) after review.
          example: pending
        comment:
          type:
            - string
            - "null"
          description: Memo sent with the submission. null if none was sent.
          example: null
        reason:
          type:
            - string
            - "null"
          description: Reason for the most recent status change, usually set on `reject`. A request rejected because it was resubmitted holds `Superseded by request {new request ID}`.
          example: null
        created_at:
          type: string
          description: Submitted at (ISO 8601)
          example: "2026-10-07T11:00:00+09:00"
        updated_at:
          type: string
          description: Last updated at (ISO 8601)
          example: "2026-10-07T11:00:00+09:00"
        data:
          anyOf:
            - $ref: "#/components/schemas/PermitDetailData"
            - $ref: "#/components/schemas/BusinessDetailData"
          description: Submitted document fields, returned under the same field names used at submission. The file is not returned.
        has_file:
          type: boolean
          description: Whether a document file is stored
          example: true
        histories:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                enum:
                  - pending
                  - confirm
                  - reject
                description: Status changed to
                example: pending
              reason:
                type:
                  - string
                  - "null"
                description: Reason
                example: null
              created_at:
                type: string
                description: Processed at (ISO 8601)
                example: "2026-10-07T11:00:00+09:00"
            required:
              - status
              - reason
              - created_at
          description: Status history, newest first.
      required:
        - id
        - type
        - status
        - comment
        - reason
        - created_at
        - updated_at
        - data
        - has_file
        - histories
    PermitDetailData:
      type: object
      properties:
        type:
          type:
            - string
            - "null"
          enum:
            - general_lodging
            - residential_lodging
            - foreign_tourist_urban_homestay
            - hanok_experience
            - rural_homestay
            - tourist_hotel
            - floating_tourist_hotel
            - korean_traditional_hotel
            - family_hotel
            - hostel
            - small_hotel
            - medical_tourism_hotel
            - youth_hostel
            - resort_condominium
            - tourist_pension
            - resort_pension
            - general_campground
            - auto_campground
            - forest_lodge
            - gosiwon
            - shared_homestay
            - specialized_resort
            - null
          description: License type code. null if the type is not in the code list.
          example: general_lodging
        number:
          type:
            - string
            - "null"
          description: Report or registration number
          example: No. 2026-00123
        date:
          type:
            - string
            - "null"
          description: Report or registration date (YYYY-MM-DD)
          example: "2026-03-02"
      required:
        - type
        - number
        - date
    BusinessDetailData:
      type: object
      properties:
        type:
          type:
            - string
            - "null"
          enum:
            - corporation
            - personal
            - null
          description: Business entity type. `corporation` is a corporate business and `personal` is a sole proprietor.
          example: corporation
        number:
          type:
            - string
            - "null"
          description: Business registration number, with the last 5 digits masked.
          example: 123-45-*****
        owner_name:
          type:
            - string
            - "null"
          description: Representative name
          example: Hong Gil-dong
        open_date:
          type:
            - string
            - "null"
          description: Business opening date (YYYY-MM-DD)
          example: "2020-05-01"
        name:
          type:
            - string
            - "null"
          description: Business name. null if not sent.
          example: Example Hotel Co., Ltd.
        address:
          type:
            - string
            - "null"
          description: Business address. null if not sent.
          example: 1 Teheran-ro, Gangnam-gu, Seoul
        industry:
          type:
            - string
            - "null"
          description: Industry. null if not sent.
          example: Lodging
        category:
          type:
            - string
            - "null"
          description: Business category. null if not sent.
          example: Hotel
      required:
        - type
        - number
        - owner_name
        - open_date
        - name
        - address
        - industry
        - category
  parameters: {}
paths:
  /gds/vendor/bookings:
    get:
      operationId: get-settlement-comparison
      tags:
        - reservation
      summary: Get Settlement Comparison
      description: |-
        - Retrieves settlement amounts for reconciliation against the vendor's own records.
        - `option` selects the reference date: `checkin` uses the check-in date and `checkout` the check-out date. It is required together with `from` and `to`.
        - Use `offset` and `limit` to page through results. Supplying `vendor_property_id` narrows the query to one property.
        - `net_price` is the amount payable after fees.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            enum:
              - checkin
              - checkout
            description: Query basis
            example: checkin
          required: true
          description: Query basis
          name: option
          in: query
        - schema:
            type: string
            description: Start date (YYYY-MM-DD)
            example: "2024-07-01"
          required: true
          description: Start date (YYYY-MM-DD)
          name: from
          in: query
        - schema:
            type: string
            description: End date (YYYY-MM-DD)
            example: "2024-07-31"
          required: true
          description: End date (YYYY-MM-DD)
          name: to
          in: query
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: false
          description: Vendor property ID
          name: vendor_property_id
          in: query
        - schema:
            type: string
            description: Offset
            example: "0"
          required: true
          description: Offset
          name: offset
          in: query
        - schema:
            type: string
            description: Limit
            example: "50"
          required: false
          description: Limit
          name: limit
          in: query
      responses:
        "200":
          description: Settlement comparison data
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: number
                    description: Total count
                    example: 100
                  offset:
                    type: number
                    description: Offset
                    example: 0
                  limit:
                    type: number
                    description: Limit
                    example: 50
                  reservations:
                    type: array
                    items:
                      type: object
                      properties:
                        booking_number:
                          type: string
                          description: Booking number
                          example: BK-20240101-001
                        channel_booking_number:
                          type: string
                          description: Channel booking number
                          example: CH-001
                        status:
                          type: string
                          description: Booking status
                          example: confirmed
                        type:
                          type:
                            - string
                            - "null"
                          enum:
                            - dayuse
                            - overnight
                            - null
                          description: Day-use or overnight (day-use = dayuse, overnight stay = overnight). null when the booking carries no such information.
                          example: overnight
                        property_id:
                          type: string
                          description: PCS property ID
                          example: "12345"
                        vendor_property_id:
                          type: string
                          description: Vendor property ID
                          example: VP-001
                        checkin:
                          type: string
                          format: date-time
                          description: Check-in date and time (ISO 8601 with offset)
                          example: "2026-01-20T15:00:00+09:00"
                        checkout:
                          type: string
                          format: date-time
                          description: Check-out date and time (ISO 8601 with offset)
                          example: "2026-01-21T11:00:00+09:00"
                        currency:
                          type: string
                          description: Currency code
                          example: KRW
                        price_type:
                          type: string
                          description: Rate type
                          example: net
                        total_amount:
                          type: number
                          description: Total amount
                          example: 150000
                        refund_amount:
                          type: number
                          description: Refund amount
                          example: 0
                        charged_amount:
                          type: number
                          description: Charged amount
                          example: 150000
                        net_price:
                          type: number
                          description: Net revenue
                          example: 135000
                        reserved_at:
                          type: string
                          format: date-time
                          description: Booking timestamp (ISO 8601 with offset) — when the guest booked on the sales channel
                          example: "2026-01-01T09:59:00+09:00"
                        confirmed_at:
                          type:
                            - string
                            - "null"
                          format: date-time
                          description: Confirmed at (ISO 8601 with offset) — when the sales channel confirmed the booking. null while unconfirmed.
                          example: "2026-01-01T10:01:00+09:00"
                        canceled_at:
                          type:
                            - string
                            - "null"
                          format: date-time
                          description: Cancelled at (ISO 8601 with offset) — when the sales channel cancelled the booking. null if not cancelled.
                          example: "2026-01-02T09:00:00+09:00"
                        created_at:
                          type: string
                          format: date-time
                          description: Created at (ISO 8601 with offset) — when the booking record was first stored
                          example: "2026-01-01T10:00:00+09:00"
                      required:
                        - booking_number
                        - channel_booking_number
                        - status
                        - type
                        - property_id
                        - vendor_property_id
                        - checkin
                        - checkout
                        - currency
                        - price_type
                        - total_amount
                        - refund_amount
                        - charged_amount
                        - net_price
                        - reserved_at
                        - confirmed_at
                        - canceled_at
                        - created_at
                    description: Booking list
                required:
                  - count
                  - offset
                  - limit
                  - reservations
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
  /gds/vendor/booking/{vendor_booking_number}:
    get:
      operationId: get-booking
      tags:
        - reservation
      summary: Get Booking
      description: |-
        - Retrieves the details of a single booking by booking number.
        - Vendor bookings are created against `gds_sub_booking_number`. A single `gds_booking_number` may correspond to several of them.
        - Returns stay details, amounts, and status together with channel information.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor booking number
            example: VB-001
          required: true
          description: Vendor booking number
          name: vendor_booking_number
          in: path
      responses:
        "200":
          description: Booking information
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: ""
                  bookingNumber:
                    type: string
                    description: Vendor booking number
                    example: VB-001
                  status:
                    type: string
                    description: Booking status
                    example: confirmed
                  type:
                    type: string
                    enum:
                      - dayuse
                      - overnight
                    description: Day-use or overnight (day-use = dayuse, overnight stay = overnight). Omitted when the booking carries no such information.
                    example: overnight
                  channel_id:
                    type: number
                    description: Sales channel ID
                    example: 132
                  channel_name:
                    type: string
                    description: Sales channel name
                    example: Naver
                  channel_booking_number:
                    type: string
                    description: Sales channel booking number
                    example: CH-001
                  gds_booking_number:
                    type: string
                    description: ONDA Hub booking number
                    example: GDS-001
                  gds_sub_booking_number:
                    type: string
                    description: ONDA Hub sub-booking number
                    example: GDS-001-1
                  property_id:
                    type: string
                    description: Vendor property ID
                    example: VP-001
                  roomtype_id:
                    type: string
                    description: Vendor room type ID
                    example: VRT-001
                  rateplan_id:
                    type: string
                    description: Vendor rate plan ID. Omitted for bookings with no mapping.
                    example: VRP-001
                  checkin:
                    type: string
                    format: date-time
                    description: Check-in date and time (ISO 8601 with offset)
                    example: "2026-01-20T15:00:00+09:00"
                  checkout:
                    type: string
                    format: date-time
                    description: Check-out date and time (ISO 8601 with offset)
                    example: "2026-01-21T11:00:00+09:00"
                  currency:
                    type: string
                    description: Currency
                    example: KRW
                  amount:
                    type: number
                    description: Vendor-side amount — the per-night amounts plus any extra charges
                    example: 150000
                  total_amount:
                    type: number
                    description: Channel-side selling price. With postpayment, this is the amount the vendor collects on site.
                    example: 150000
                  net_price:
                    type: number
                    description: Deposit amount (payable to the vendor)
                    example: 135000
                  payment_type:
                    type: string
                    enum:
                      - prepayment
                      - postpayment
                    description: Payment type (prepaid = prepayment, pay on arrival = postpayment)
                    example: prepayment
                  guest:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Guest name
                      adults:
                        type: number
                        description: Adults
                      children:
                        type: number
                        description: Children
                      infants:
                        type: number
                        description: Infants
                      pets:
                        type: number
                        description: Pets
                      cars:
                        type: number
                        description: Vehicles
                    required:
                      - name
                      - adults
                      - children
                      - infants
                      - pets
                      - cars
                  booker:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Booker name
                      email:
                        type: string
                        description: Booker email
                      phone:
                        type: string
                        description: Booker phone
                    required:
                      - name
                      - email
                      - phone
                  reserved_at:
                    type: string
                    format: date-time
                    description: Booking timestamp (ISO 8601 with offset) — when the guest booked on the sales channel
                    example: "2026-01-01T09:59:00+09:00"
                  confirmed_at:
                    type:
                      - string
                      - "null"
                    format: date-time
                    description: Confirmed at (ISO 8601 with offset) — when the sales channel confirmed the booking. null while unconfirmed.
                    example: "2026-01-01T10:01:00+09:00"
                  canceled_at:
                    type:
                      - string
                      - "null"
                    format: date-time
                    description: Cancelled at (ISO 8601 with offset) — when the sales channel cancelled the booking. null if not cancelled.
                    example: "2026-01-02T09:00:00+09:00"
                  update_at:
                    type: string
                    format: date-time
                    description: Updated at (ISO 8601 with offset) — when the booking was last changed
                    example: "2026-01-01T10:01:00+09:00"
                  request_at:
                    type: string
                    format: date-time
                    description: Retrieved at (ISO 8601 with offset) — when this response was generated
                    example: "2026-01-01T10:00:00+09:00"
                  special_comment:
                    type: string
                    description: Guest requests. Omitted when empty.
                    example: Please assign a high floor
                  visit_type:
                    type: string
                    enum:
                      - walk
                      - car
                    description: Arrival method (on foot = walk, by car = car). Present only when the channel supplies it; otherwise omitted.
                    example: car
                  secondary_channel:
                    type: string
                    description: Secondary sales channel (the final selling brand when a channel resells through another brand or OTA). Present only when the channel supplies it; otherwise omitted.
                    example: Expedia Affiliate Network
                required:
                  - error
                  - bookingNumber
                  - status
                  - channel_id
                  - channel_name
                  - gds_booking_number
                  - gds_sub_booking_number
                  - property_id
                  - roomtype_id
                  - checkin
                  - checkout
                  - currency
                  - amount
                  - total_amount
                  - net_price
                  - payment_type
                  - guest
                  - booker
                  - reserved_at
                  - confirmed_at
                  - canceled_at
                  - update_at
                  - request_at
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
  /gds/vendor/bookinglist:
    get:
      operationId: list-bookings
      tags:
        - reservation
      summary: List Bookings
      description: |-
        - Lists bookings within a date range.
        - `from` and `to` are required.
        - Booking processing itself works by ONDA calling the vendor's endpoints, so this API is for vendors reconciling against their own data or looking for gaps.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Start date (YYYY-MM-DD)
            example: "2024-07-01"
          required: true
          description: Start date (YYYY-MM-DD)
          name: from
          in: query
        - schema:
            type: string
            description: End date (YYYY-MM-DD)
            example: "2024-07-31"
          required: true
          description: End date (YYYY-MM-DD)
          name: to
          in: query
      responses:
        "200":
          description: Booking list
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    booking_number:
                      type: string
                      description: Vendor booking number
                      example: VB-001
                    reservation_status:
                      type: string
                      description: Booking status
                      example: confirmed
                  required:
                    - booking_number
                    - reservation_status
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/ari:
    post:
      operationId: push-rates
      tags:
        - ari
      summary: Push Rates and Business Days
      description: |-
        - Sets rates and business days.
        - Each item requires `is_business_day` together with either `net_price` or `sale_price`.
        - Every channel under `channels` must repeat `is_business_day` and exactly the rate fields sent on the item. Omitting one, or adding a rate field the item does not carry, returns 400.
        - Rate and business-day settings for channels absent from `channels` are deleted within the from-to range. Omitting the field or sending an empty array deletes the settings for all channels.
        - use_from, use_to, and use_time may be sent only on day-use (dayuse) items, and use_time is expressed in minutes.
        - Availability is sent separately through the availability API (`POST /gds/vendor/properties/{vendor_property_id}/ari/avails`).
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  vendor_roomtype_id:
                    type: string
                    minLength: 1
                  vendor_rateplan_id:
                    type: string
                    minLength: 1
                  type:
                    type: string
                    enum:
                      - dayuse
                      - overnight
                  from:
                    type: string
                    format: date
                  to:
                    type: string
                    format: date
                  basic_price:
                    type: number
                    minimum: 0
                  net_price:
                    type: number
                    minimum: 0
                  sale_price:
                    type: number
                    minimum: 0
                  is_business_day:
                    type: number
                    enum:
                      - 0
                      - 1
                  use_from:
                    type: string
                    pattern: ^([01]\d|2[0-3]):[0-5]\d$
                  use_to:
                    type: string
                    pattern: ^([01]\d|2[0-3]):[0-5]\d$
                  use_time:
                    type: integer
                    minimum: 120
                  channels:
                    type: array
                    items:
                      type: object
                      properties:
                        channel_id:
                          type: integer
                          exclusiveMinimum: 0
                        basic_price:
                          type: number
                          minimum: 0
                        net_price:
                          type: number
                          minimum: 0
                        sale_price:
                          type: number
                          minimum: 0
                        is_business_day:
                          type: number
                          enum:
                            - 0
                            - 1
                        use_from:
                          type: string
                          pattern: ^([01]\d|2[0-3]):[0-5]\d$
                        use_to:
                          type: string
                          pattern: ^([01]\d|2[0-3]):[0-5]\d$
                        use_time:
                          type: integer
                          minimum: 120
                      required:
                        - channel_id
                        - is_business_day
                      description: Per-channel settings. is_business_day is required, and you must repeat exactly the rate fields sent on the item (omitting one, or adding a rate field the item does not carry, returns 400). Settings for channels absent from the array are deleted within the date range.
                required:
                  - vendor_roomtype_id
                  - vendor_rateplan_id
                  - type
                  - from
                  - to
                  - is_business_day
                description: Incoming ARI item (overnight or day-use) — rates and business days. Declarative reconcile of default plus channels[].
      responses:
        "200":
          description: Settings result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/ari/avails:
    post:
      operationId: push-avails
      tags:
        - ari
      summary: Push Availability
      description: |-
        - Sets availability (vacancy); `vacancy` is required on each item.
        - Availability is applied per room type.
        - If the room type has no rate plans, the submitted availability is not applied.
        - Availability settings for channels absent from the `channels` array are deleted within the from-to range. Omitting the field or sending an empty array deletes the availability settings for all channels.
        - Each item may span at most 730 days.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  vendor_roomtype_id:
                    type: string
                    minLength: 1
                  type:
                    type: string
                    enum:
                      - dayuse
                      - overnight
                  from:
                    type: string
                    format: date
                  to:
                    type: string
                    format: date
                  vacancy:
                    type: integer
                    minimum: 0
                  min_los:
                    type: integer
                    minimum: 0
                  max_los:
                    type: integer
                    minimum: 0
                  channels:
                    type: array
                    items:
                      type: object
                      properties:
                        channel_id:
                          type: integer
                          exclusiveMinimum: 0
                        vacancy:
                          type: integer
                          minimum: 0
                      required:
                        - channel_id
                        - vacancy
                      additionalProperties: false
                      description: Per-channel availability override (vacancy required). Overrides for channels absent from the array are deleted within the date range.
                required:
                  - vendor_roomtype_id
                  - type
                  - from
                  - to
                  - vacancy
                additionalProperties: false
                description: Availability-only ARI item (overnight or day-use). Declarative reconcile of default availability (plus LOS) and channels[] availability.
      responses:
        "200":
          description: Settings result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
  /gds/vendor/meta:
    get:
      operationId: get-meta-codes
      tags:
        - content-meta
      summary: Get Meta Codes
      description: |-
        - Retrieves the pcs.codes.code values used for content push, as a hierarchical tree grouped by code_type.
        - Leaf nodes with no children omit the children field.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            enum:
              - ko-KR
              - en-US
              - zh-CN
              - ja-JP
              - vn-VN
              - th-TH
              - zh-TW
            default: ko-KR
            description: Code name locale
            example: ko-KR
          required: false
          description: Code name locale
          name: locale
          in: query
      responses:
        "200":
          description: Code Catalog
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MetaResponse"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid locale
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
  /gds/vendor/properties:
    post:
      operationId: create-property
      tags:
        - content-property
      summary: Create Property
      description: |-
        - Creates a vendor property in ONDA. Room types, rate plan models, and rate plans are all created beneath this property, making this the first step of content integration.
        - `id` (the vendor property ID) is required, and the property name goes in `ko-kr` under `i18n`.
        - Code-based fields such as `classifications`, `property_tags`, and `facility_tags` accept only codes obtained from the code catalog.
        - `settings.extra_adult_price` is the property's default extra adult charge (integer KRW) and applies to channels that price by occupancy.
        - Calling again with an existing `id` returns `409`. Use Update Property to change an existing property.
      security:
        - Authorization: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PostPropertyBody"
      responses:
        "200":
          description: Creation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
    get:
      operationId: list-properties
      tags:
        - content-property
      summary: List Properties
      description: |-
        - Lists the properties the vendor has registered.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent or reconciling after an incident.
        - The response returns exactly what ONDA has stored, which makes it useful for finding entries that diverge from the vendor's own data.
      security:
        - Authorization: []
      responses:
        "200":
          description: Property list
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Property ID
                      example: PROP123
                    name:
                      type: string
                      description: Property name
                      example: Seoul Hotel
                    status:
                      type: string
                      enum:
                        - enabled
                        - disabled
                      description: Status
                  required:
                    - id
                    - name
                    - status
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}:
    get:
      operationId: get-property
      tags:
        - content-property
      summary: Get Property
      description: |-
        - Retrieves the content and sales status of a single property.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - The `vendor_property_id` in the path is the `id` the vendor sent when creating the property.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      responses:
        "200":
          description: Property content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PropertyContent"
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
    patch:
      operationId: update-property
      tags:
        - content-property
      summary: Update Property
      description: |-
        - Updates a property's content and sales status.
        - Follows RFC 7396 JSON Merge Patch. Omitted fields keep their existing values, and sending `null` clears a value.
        - Stopping and resuming sales also goes through this API. Sending only `status` leaves the rest of the content untouched.
        - Sending `null` for `settings.extra_adult_price` returns the property's default extra adult charge to unset.
        - A mismatch between `vendor_property_id` in the path and the identifier in the body returns `400`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatchPropertyBody"
      responses:
        "200":
          description: Update result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes:
    post:
      operationId: create-roomtype
      tags:
        - content-roomtype
      summary: Create Room Type
      description: |-
        - Creates a room type beneath a property. The property must exist first.
        - `id` (the vendor room type ID) is required, and the room name goes in `ko-kr` under `i18n`.
        - Code-based fields such as `roomtype_tags`, `amenity_tags`, and `view_tags` accept only codes obtained from the code catalog.
        - Availability is managed per room type, so the `id` created here becomes the key for subsequent availability pushes.
        - Calling again with an existing `id` returns `409`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PostRoomtypeBody"
      responses:
        "200":
          description: Creation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
    get:
      operationId: list-roomtypes
      tags:
        - content-roomtype
      summary: List Room Types
      description: |-
        - Lists the room types belonging to a property. The response also carries the rate plans linked to each room type.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - Useful for checking how room types and rate plans are linked in a single call.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      responses:
        "200":
          description: Room type list
          content:
            application/json:
              schema:
                type: object
                properties:
                  property_id:
                    type: string
                    description: Property ID
                    example: "12345"
                  roomtypes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Room type ID
                          example: RT-001
                        name:
                          type: string
                          description: Room type name
                          example: Deluxe Double
                        status:
                          type: string
                          description: Status
                          example: enabled
                        rateplans:
                          type: array
                          items:
                            type: object
                            properties:
                              rateplan_id:
                                type: string
                                description: Rate plan ID
                                example: RP-001
                              rateplan_name:
                                type: string
                                description: Rate plan name
                                example: Standard Rate
                              rateplan_status:
                                type: string
                                description: Rate plan status
                                example: enabled
                              rateplan_type:
                                type: string
                                description: Rate plan type
                                example: standard
                              rateplan_description:
                                type: string
                                description: Rate plan description
                                example: Breakfast Included
                              updated_at:
                                type: string
                                format: date-time
                                description: Last modified (ISO 8601 with offset)
                                example: "2024-07-01T10:00:00+09:00"
                            required:
                              - rateplan_id
                              - rateplan_name
                              - rateplan_status
                              - rateplan_type
                              - rateplan_description
                              - updated_at
                          description: Rate plan list
                        updated_at:
                          type: string
                          format: date-time
                          description: Last modified (ISO 8601 with offset)
                          example: "2024-07-01T10:00:00+09:00"
                      required:
                        - id
                        - name
                        - status
                        - rateplans
                        - updated_at
                    description: Room type list
                required:
                  - property_id
                  - roomtypes
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}:
    get:
      operationId: get-roomtype
      tags:
        - content-roomtype
      summary: Get Room Type
      description: |-
        - Retrieves the content and sales status of a single room type.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - The `vendor_roomtype_id` in the path is the `id` the vendor sent when creating the room type.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
      responses:
        "200":
          description: Room type content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RoomtypeContent"
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
    patch:
      operationId: update-roomtype
      tags:
        - content-roomtype
      summary: Update Room Type
      description: |-
        - Updates a room type's content and sales status.
        - Follows RFC 7396 JSON Merge Patch. Omitted fields keep their existing values, and sending `null` clears a value.
        - Stopping and resuming sales also goes through this API. Sending only `status` leaves the rest of the content untouched.
        - A mismatch between the identifier in the path and the one in the body returns `400`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatchRoomtypeBody"
      responses:
        "200":
          description: Update result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/rateplan-models:
    post:
      operationId: create-rateplan-model
      tags:
        - content-rateplan-model
      summary: Create Rate Plan Model
      description: |-
        - Creates a rate plan model at the property level. A rate plan is defined as a room type combined with one of these models, so the model must exist first.
        - `id` and `i18n` (with `ko-kr` required) must be supplied.
        - Exactly one model with `type` set to `standalone` is required per property. There is no limit on `package` models.
        - `sale_from` and `sale_to` must both be sent or both omitted; sending only one is rejected. Setting `max_los` to `0` means no maximum length of stay.
        - Sending `channels` restricts sales to those channels; omitting it sells on all channels.
        - An existing `id` returns `409`, and a reference or invariant violation returns `422`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PostRateplanModelBody"
      responses:
        "200":
          description: Creation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
        "422":
          description: Unprocessable Entity (reference or invariant violation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unprocessable Entity
                required:
                  - message
    get:
      operationId: list-rateplan-models
      tags:
        - content-rateplan-model
      summary: List Rate Plan Models
      description: |-
        - Lists the rate plan models registered for a property.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - Useful for checking the `id` of the model you intend to combine before creating a rate plan.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      responses:
        "200":
          description: Rate plan model list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/RateplanModelContent"
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/rateplan-models/{vendor_rateplan_model_id}:
    get:
      operationId: get-rateplan-model
      tags:
        - content-rateplan-model
      summary: Get Rate Plan Model
      description: |-
        - Retrieves the selling conditions of a single rate plan model.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - Shows the conditions that apply to every rate plan referencing this model, including sale period, length of stay, refundability, and sales channels.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan model ID
            example: VRPM-001
          required: true
          description: Vendor rate plan model ID
          name: vendor_rateplan_model_id
          in: path
      responses:
        "200":
          description: Rate plan model content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RateplanModelContent"
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
    patch:
      operationId: update-rateplan-model
      tags:
        - content-rateplan-model
      summary: Update Rate Plan Model
      description: |-
        - Updates a rate plan model's selling conditions. The change applies to every rate plan that references the model.
        - Follows RFC 7396 JSON Merge Patch. `i18n` is required on update requests as well.
        - Changing `channels` changes rate plan mappings. Adding a channel creates mappings only for the added channel, and removing a channel does not delete mappings that already exist. An empty array creates mappings on every eligible channel.
        - `sale_from` and `sale_to` must both be sent or both omitted.
        - A reference or invariant violation returns `422`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan model ID
            example: VRPM-001
          required: true
          description: Vendor rate plan model ID
          name: vendor_rateplan_model_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatchRateplanModelBody"
      responses:
        "200":
          description: Update result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
        "422":
          description: Unprocessable Entity (reference or invariant violation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unprocessable Entity
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}/rateplans:
    post:
      operationId: create-rateplan
      tags:
        - content-rateplan
      summary: Create Rate Plan
      description: |-
        - Creates a rate plan beneath a room type. It is the unit that rates and business days are pushed against, so it is required before selling can begin.
        - `id` and `vendor_rateplan_model_id` are required. `vendor_rateplan_model_id` binds the rate plan to a model, which determines its selling conditions.
        - Both the rate plan model and the room type must already exist.
        - An existing `id` returns `409`. A missing referenced rate plan model or an invariant violation returns `422`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PostRateplanBody"
      responses:
        "200":
          description: Creation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
        "422":
          description: Unprocessable Entity (reference or invariant violation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unprocessable Entity
                required:
                  - message
    get:
      operationId: list-rateplans
      tags:
        - content-rateplan
      summary: List Rate Plans
      description: |-
        - Lists the rate plans linked to a room type.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - Use it to look up the `vendor_rateplan_id` needed when pushing rates and business days.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
      responses:
        "200":
          description: Rate plan list
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/RateplanContent"
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}/rateplans/{vendor_rateplan_id}:
    get:
      operationId: get-rateplan
      tags:
        - content-rateplan
      summary: Get Rate Plan
      description: |-
        - Retrieves a single rate plan's information and sales status.
        - In 3.0 the vendor pushes content to ONDA by default, so lookups serve as a secondary means of confirming what was sent.
        - Shows which rate plan model the rate plan is bound to.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan ID
            example: VRP-001
          required: true
          description: Vendor rate plan ID
          name: vendor_rateplan_id
          in: path
      responses:
        "200":
          description: Rate plan content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RateplanContent"
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
    patch:
      operationId: update-rateplan
      tags:
        - content-rateplan
      summary: Update Rate Plan
      description: |-
        - Updates a rate plan's sales status.
        - Follows RFC 7396 JSON Merge Patch. Omitted fields keep their existing values.
        - Selling conditions such as sale period, length of stay, and refundability live on the bound rate plan model rather than the rate plan, so use Update Rate Plan Model to change them.
        - A mismatch between the identifier in the path and the one in the body returns `400`.
      security:
        - Authorization: []
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan ID
            example: VRP-001
          required: true
          description: Vendor rate plan ID
          name: vendor_rateplan_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PatchRateplanBody"
      responses:
        "200":
          description: Update result
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message (empty string on success)
                    example: ""
                required:
                  - error
        "400":
          description: Bad Request (identifier mismatch between path and body, etc.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict (id already exists)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property already exists
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/licenses:
    post:
      operationId: submit-license
      tags:
        - content-license
      security:
        - Authorization: []
      summary: Submit License
      description: |-
        - Submits a property's license document (`permit`) or business registration certificate (`business`). Send one request per document, and set the document type with `type`.
        - `permit` is a license document, such as a business report certificate, tourism business registration, or rural homestay registration. Put the license type code in `data.type`.
        - Send the document fields and the file together in `data`. The file is a base64-encoded string; file names are not accepted.
        - Supported formats are jpeg, png, gif, webp, and pdf, detected from the file content. HEIC and AVIF are not supported, and images must be at least 450 pixels wide and 200 pixels tall. Each file can be up to 10MB.
        - For `business`, when `data.type` is `corporation`, `data.name`, `data.address`, `data.industry`, and `data.category` are also required. They are optional for `personal` (sole proprietor).
        - A submission is accepted as `pending` and becomes `confirm` (approved) or `reject` (rejected) after ONDA reviews it.
        - Resubmitting while a `pending` request of the same type exists changes the earlier request to `reject` with `Superseded by request {new request ID}` in `reason`. If the new request is rejected with `400` or `422`, the earlier request stays as it is.
        - Both `permit` and `business` must be approved (`confirm`) before a Plus channel can be opened. Only the most recently approved document per type is active, and the previously approved document stays current until a new one is approved.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: "#/components/schemas/PermitRequestBody"
                - $ref: "#/components/schemas/BusinessRequestBody"
              discriminator:
                propertyName: type
                mapping:
                  permit: "#/components/schemas/PermitRequestBody"
                  business: "#/components/schemas/BusinessRequestBody"
      responses:
        "200":
          description: Returns the accepted submission request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LicenseSubmitResult"
        "400":
          description: "Bad Request. Returned when a required field is missing or a value is malformed: an unsupported `type`, a `data.type` not in the code list, a business registration number with an invalid length or checksum, a future date, or a file that cannot be read as base64. For a corporation, 400 is also returned if any of `data.name` (business name), `data.address` (business address), `data.industry` (industry), or `data.category` (business category) is missing."
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Business registration number checksum is invalid
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "404":
          description: Not Found. Returned when `vendor_property_id` is not a property linked to this vendor.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property not found
                required:
                  - message
        "413":
          description: Payload Too Large. Returned when the request body is too large.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: request entity too large
                required:
                  - message
        "422":
          description: Unprocessable Entity. Returns `Unsupported file format` for unsupported formats (HEIC, AVIF, etc.), `Image must be at least 450x200 pixels` for images smaller than 450x200 pixels, and `Image conversion failed` when the image cannot be converted to JPG.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unsupported file format
                required:
                  - message
    get:
      operationId: list-licenses
      tags:
        - content-license
      security:
        - Authorization: []
      summary: List License Submissions
      description: |-
        - Lists a property's license and business registration submissions, newest first.
        - Skips `offset` requests and returns up to `limit` (default 100, max 500). `count` holds the property's total number of requests.
        - Each request's `reason` holds the reason for its most recent status change. Use it to check why a submission was rejected.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: integer
            description: Number of requests to skip. Default 0
            example: 0
            minimum: 0
            default: 0
          required: false
          description: Number of requests to skip. Default 0
          name: offset
          in: query
        - schema:
            type: integer
            description: Number of requests to return. Default 100, max 500
            example: 100
            minimum: 1
            maximum: 500
            default: 100
          required: false
          description: Number of requests to return. Default 100, max 500
          name: limit
          in: query
      responses:
        "200":
          description: Returns the submission requests and the total count. `licenses` is an empty array if no requests fall in the range.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LicenseRequestList"
        "400":
          description: Bad Request. Returned when `offset` is not an integer of 0 or more, or `limit` is not an integer from 1 to 500.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: "Too big: expected number to be <=500"
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "404":
          description: Not Found. Returned when `vendor_property_id` is not a property linked to this vendor.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Property not found
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/licenses/{request_id}:
    get:
      operationId: get-license
      tags:
        - content-license
      security:
        - Authorization: []
      summary: Get License Submission
      description: |-
        - Retrieves one submission request's status, status history (`histories`), and submitted fields.
        - `data` is returned under the same field names used at submission, with the last 5 digits of the business registration number masked.
        - The file is not returned; `has_file` only indicates whether one is stored.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: integer
            exclusiveMinimum: 0
            description: Request ID. This is the `id` from the submission response or the list.
            example: 101
          required: true
          description: Request ID. This is the `id` from the submission response or the list.
          name: request_id
          in: path
      responses:
        "200":
          description: Returns the details of the submission request.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LicenseRequestDetail"
        "400":
          description: Bad Request. Returned when `request_id` is not a positive integer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: "Too small: expected number to be >0"
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "404":
          description: Not Found. Returned when `vendor_property_id` is not a property linked to the vendor, or `request_id` is not a request for that property.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: License request not found
                required:
                  - message
  /gds/vendor/channels:
    get:
      operationId: list-channels
      tags:
        - channel
      security:
        - Authorization: []
      summary: List Channels
      description: |-
        - Lists the vendor's sales channels.
        - The `processing_mode` field shows how each channel handles opening requests (auto_approve or external_review).
      responses:
        "200":
          description: Channel list
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                      description: Channel ID
                      example: 2
                    name:
                      type: string
                      description: Channel name
                      example: Naver
                    status:
                      type: string
                      enum:
                        - enabled
                        - disabled
                      description: Status
                    currency:
                      type: string
                      description: Currency code
                      example: KRW
                    booking_number_prefix:
                      type: string
                      description: Booking number prefix
                      example: NV
                    processing_mode:
                      type: string
                      enum:
                        - auto_approve
                        - external_review
                      description: How opening requests are processed. auto_approve channels activate immediately; external_review channels require operator approval.
                      example: auto_approve
                    channel_type:
                      type: string
                      enum:
                        - hub
                        - cms
                      description: Channel integration type. hub is Hub-based integration; cms is integration where the vendor maps channel products directly.
                      example: cms
                    requires_cms_authorization:
                      type: boolean
                      description: Requires CMS authorization
                      example: false
                  required:
                    - id
                    - name
                    - status
                    - currency
                    - booking_number_prefix
                    - processing_mode
                    - channel_type
                    - requires_cms_authorization
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/channels/{channel_id}/properties/{channel_property_id}:
    get:
      operationId: get-channel-property
      tags:
        - channel
      security:
        - Authorization: []
      summary: Get Channel Property
      description: |-
        - Retrieves the property registered on the channel side along with its room types and rate plans.
        - Call it before creating mappings on a direct channel to collect candidate channel room type and rate plan IDs.
        - `channel_parent_rateplan_id` in the response points to a parent rate plan. Rates sent to such a rate plan are not applied on the channel; it follows its parent's rates automatically.
        - Because the request goes through to the channel, a `500` can occur depending on the channel's state. Adding retry handling is advisable.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Channel property ID
            example: CP-001
          required: true
          description: Channel property ID
          name: channel_property_id
          in: path
      responses:
        "200":
          description: Channel property information retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  channel_id:
                    type: string
                    description: Channel ID
                    example: "1"
                  channel_property_id:
                    type: string
                    description: Channel property ID
                    example: CP-001
                  name:
                    type: string
                    description: Channel property name
                    example: ONDA Hotel Gangnam
                  status:
                    type: string
                    description: Channel property status
                    example: enabled
                  pricing_model:
                    type:
                      - string
                      - "null"
                    description: The pricing value exactly as the channel supplied it. Each channel uses its own scheme (Ctrip, for example, uses Standard/OBP), and the value is null when the channel supplies none.
                    example: Standard
                  roomtypes:
                    type: array
                    items:
                      type: object
                      properties:
                        channel_roomtype_id:
                          type: string
                          description: Channel room type ID
                          example: CRT-001
                        name:
                          type: string
                          description: Channel room type name
                          example: Deluxe Double
                        status:
                          type: string
                          description: Channel room type status
                          example: enabled
                      required:
                        - channel_roomtype_id
                        - name
                        - status
                  rateplans:
                    type: array
                    items:
                      type: object
                      properties:
                        channel_rateplan_id:
                          type: string
                          description: Channel rate plan ID
                          example: CRP-001
                        name:
                          type: string
                          description: Channel rate plan name
                          example: Breakfast Included
                        channel_roomtype_id:
                          type: string
                          description: Channel room type ID
                          example: CRT-001
                        channel_parent_rateplan_id:
                          type:
                            - string
                            - "null"
                          description: Channel ID of the parent rate plan. Present only for child rate plans and null otherwise. Only the Booking.com and Agoda channels populate it.
                          example: CRP-000
                        status:
                          type: string
                          description: Channel rate plan status
                          example: enabled
                        type:
                          type: string
                          enum:
                            - dayuse
                            - overnight
                          description: "Distinguishes day-use from overnight stays: dayuse is day-use, overnight is an overnight stay."
                          example: overnight
                      required:
                        - channel_rateplan_id
                        - name
                        - channel_roomtype_id
                        - channel_parent_rateplan_id
                        - status
                        - type
                required:
                  - channel_id
                  - channel_property_id
                  - status
                  - pricing_model
                  - roomtypes
                  - rateplans
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/channels/{channel_id}/settings:
    get:
      operationId: get-property-channel-settings
      tags:
        - channel-setting
      security:
        - Authorization: []
      summary: Get Property Channel Settings
      description: |-
        - Retrieves per-channel supplementary settings for a property.
        - An empty object is returned when nothing has been saved. Handle "not configured" separately from an error.
        - The available settings differ by channel; some, such as extra-occupancy pricing, apply to only a few channels.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Channel ID
            example: "24"
          required: true
          description: Channel ID
          name: channel_id
          in: path
      responses:
        "200":
          description: Channel settings retrieved. Returns an empty object when nothing has been saved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  pricing_model:
                    type: string
                    enum:
                      - OBP
                      - Standard
                    description: Rate model
                    example: Standard
                description: Per-channel settings response. Only saved fields are included; unset fields are omitted.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
    patch:
      operationId: update-property-channel-settings
      tags:
        - channel-setting
      security:
        - Authorization: []
      summary: Save Property Channel Settings
      description: RFC 7396 JSON Merge Patch. A null value deletes the corresponding key.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Channel ID
            example: "24"
          required: true
          description: Channel ID
          name: channel_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                pricing_model:
                  type:
                    - string
                    - "null"
                  enum:
                    - OBP
                    - Standard
                    - null
                  description: Rate model
                  example: Standard
              additionalProperties: false
              description: Per-channel settings. Every supported channel uses the same schema. Sending a field as null deletes it; omitting it keeps the existing value. Fields that are not allowed are rejected with 400.
      responses:
        "200":
          description: Channel settings saved. Returns the complete settings after the save.
          content:
            application/json:
              schema:
                type: object
                properties:
                  pricing_model:
                    type: string
                    enum:
                      - OBP
                      - Standard
                    description: Rate model
                    example: Standard
                description: Per-channel settings response. Only saved fields are included; unset fields are omitted.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}/channels/{channel_id}/settings:
    get:
      operationId: get-roomtype-channel-settings
      tags:
        - channel-setting
      security:
        - Authorization: []
      summary: Get Room Type Channel Settings
      description: |-
        - Retrieves per-channel settings for a vendor room type.
        - An empty object is returned when nothing has been saved.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Channel ID
            example: "133"
          required: true
          description: Channel ID
          name: channel_id
          in: path
      responses:
        "200":
          description: Room type channel settings retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  booking_lead_time_hours:
                    type: number
                    enum:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                      - 6
                      - 7
                      - 8
                      - 9
                      - 10
                      - 11
                      - 12
                      - 13
                      - 14
                      - 15
                      - 16
                      - 17
                      - 18
                      - 19
                      - 20
                      - 21
                      - 22
                      - 23
                      - 24
                      - 48
                      - 72
                      - 168
                    description: Booking lead time in hours (Airbnb accepts 1-24, 48, 72, 168)
                    example: 24
                  allow_request_to_book:
                    type: boolean
                    description: Allow booking requests below the lead time
                    example: false
                  default_min_nights:
                    type: integer
                    minimum: 0
                    description: Default minimum length of stay
                    example: 2
                  included_guests:
                    type: integer
                    minimum: 0
                    description: Default included occupancy
                    example: 2
                  weekly_discount_percentage:
                    type: number
                    minimum: 0
                    maximum: 100
                    description: Weekly discount rate (0-100)
                    example: 10
                  monthly_discount_percentage:
                    type: number
                    minimum: 0
                    maximum: 100
                    description: Monthly discount rate (0-100)
                    example: 20
                  cleaning_fee:
                    type: number
                    minimum: 0
                    description: Cleaning fee
                    example: 30000
                description: Per-channel room type settings response. Only saved fields are included; unset fields are omitted.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
    patch:
      operationId: update-roomtype-channel-settings
      tags:
        - channel-setting
      security:
        - Authorization: []
      summary: Save Room Type Channel Settings
      description: RFC 7396 JSON Merge Patch. A null value deletes the corresponding key.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Channel ID
            example: "133"
          required: true
          description: Channel ID
          name: channel_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                booking_lead_time_hours:
                  type:
                    - number
                    - "null"
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 17
                    - 18
                    - 19
                    - 20
                    - 21
                    - 22
                    - 23
                    - 24
                    - 48
                    - 72
                    - 168
                    - null
                  description: Booking lead time in hours (Airbnb accepts 1-24, 48, 72, 168)
                  example: 24
                allow_request_to_book:
                  type:
                    - boolean
                    - "null"
                  description: Whether to accept bookings below the lead time as requests (Airbnb)
                  example: false
                default_min_nights:
                  type:
                    - integer
                    - "null"
                  minimum: 0
                  description: Default minimum length of stay
                  example: 2
                included_guests:
                  type:
                    - integer
                    - "null"
                  minimum: 0
                  description: Default included occupancy
                  example: 2
                weekly_discount_percentage:
                  type:
                    - number
                    - "null"
                  minimum: 0
                  maximum: 100
                  description: Weekly discount rate (0-100)
                  example: 10
                monthly_discount_percentage:
                  type:
                    - number
                    - "null"
                  minimum: 0
                  maximum: 100
                  description: Monthly discount rate (0-100)
                  example: 20
                cleaning_fee:
                  type:
                    - number
                    - "null"
                  minimum: 0
                  description: Cleaning fee
                  example: 30000
              additionalProperties: false
              description: Per-channel room type settings. Sending a field as null deletes it; omitting it keeps the existing value. Fields that are not allowed are rejected with 400.
      responses:
        "200":
          description: Room type channel settings saved. Returns the complete settings after the save.
          content:
            application/json:
              schema:
                type: object
                properties:
                  booking_lead_time_hours:
                    type: number
                    enum:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                      - 6
                      - 7
                      - 8
                      - 9
                      - 10
                      - 11
                      - 12
                      - 13
                      - 14
                      - 15
                      - 16
                      - 17
                      - 18
                      - 19
                      - 20
                      - 21
                      - 22
                      - 23
                      - 24
                      - 48
                      - 72
                      - 168
                    description: Booking lead time in hours (Airbnb accepts 1-24, 48, 72, 168)
                    example: 24
                  allow_request_to_book:
                    type: boolean
                    description: Allow booking requests below the lead time
                    example: false
                  default_min_nights:
                    type: integer
                    minimum: 0
                    description: Default minimum length of stay
                    example: 2
                  included_guests:
                    type: integer
                    minimum: 0
                    description: Default included occupancy
                    example: 2
                  weekly_discount_percentage:
                    type: number
                    minimum: 0
                    maximum: 100
                    description: Weekly discount rate (0-100)
                    example: 10
                  monthly_discount_percentage:
                    type: number
                    minimum: 0
                    maximum: 100
                    description: Monthly discount rate (0-100)
                    example: 20
                  cleaning_fee:
                    type: number
                    minimum: 0
                    description: Cleaning fee
                    example: 30000
                description: Per-channel room type settings response. Only saved fields are included; unset fields are omitted.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/channels/{channel_id}/mappings:
    get:
      operationId: get-property-mapping
      tags:
        - channel-mapping
      security:
        - Authorization: []
      summary: Get Property Mapping
      description: |-
        - Retrieves the mapping state between a property and a channel.
        - A value in `channel_property_id` means the property is linked to one on the channel side. Use it to judge whether channel opening has completed.
        - Mappings apply only to direct channels. ONDA manages mappings for Plus channels, so they are out of scope here.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      responses:
        "200":
          description: Property mapping retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  vendor_property_id:
                    type: string
                    description: Vendor property ID
                    example: VP-001
                  channel_id:
                    type: string
                    description: Channel ID
                    example: "1"
                  channel_name:
                    type: string
                    description: Channel name
                    example: Booking.com
                  channel_property_id:
                    type: string
                    description: Channel property ID
                    example: CP-001
                  status:
                    type: string
                    description: Property mapping status
                    example: enabled
                  roomtype_mappings:
                    type: array
                    items:
                      type: object
                      properties:
                        vendor_roomtype_id:
                          type: string
                          description: Vendor room type ID
                          example: VRT-001
                        channel_roomtype_id:
                          type:
                            - string
                            - "null"
                          description: Channel room type ID. Included only in CMS channel responses.
                          example: CRT-001
                        status:
                          type: string
                          description: Mapping status
                          example: enabled
                      required:
                        - vendor_roomtype_id
                        - status
                  rateplan_mappings:
                    type: array
                    items:
                      type: object
                      properties:
                        vendor_rateplan_id:
                          type: string
                          description: Vendor rate plan ID
                          example: VRP-001
                        vendor_roomtype_id:
                          type: string
                          description: Vendor room type ID
                          example: VRT-001
                        channel_rateplan_id:
                          type:
                            - string
                            - "null"
                          description: Channel rate plan ID. Included only in CMS channel responses.
                          example: CRP-001
                        status:
                          type: string
                          description: Mapping status
                          example: enabled
                      required:
                        - vendor_rateplan_id
                        - vendor_roomtype_id
                        - status
                required:
                  - vendor_property_id
                  - channel_id
                  - channel_name
                  - status
                  - roomtype_mappings
                  - rateplan_mappings
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
    patch:
      operationId: update-property-mapping
      tags:
        - channel-mapping
      security:
        - Authorization: []
      summary: Update Property Mapping
      description: |-
        - Updates the mapping between a property and a channel.
        - Put the channel-side property ID in `channel_property_id` to link them, and use `status` to turn the mapping on or off.
        - Sending `null` clears the mapping; omitting the field keeps the existing value. There is no separate `DELETE` for mappings, so use `null` when stopping sales as well.
        - Only direct channels can be modified.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_property_id:
                  type:
                    - string
                    - "null"
                  minLength: 1
                  description: Channel property ID. Only CMS channels can modify it. Sending null clears it; omitting it keeps the existing value.
                  example: CP-001
                status:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  description: Mapping status
                  example: enabled
              additionalProperties: false
      responses:
        "200":
          description: Property mapping updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  vendor_property_id:
                    type: string
                    description: Vendor property ID
                    example: VP-001
                  channel_id:
                    type: string
                    description: Channel ID
                    example: "1"
                  channel_name:
                    type: string
                    description: Channel name
                    example: Booking.com
                  channel_property_id:
                    type: string
                    description: Channel property ID
                    example: CP-001
                  status:
                    type: string
                    description: Property mapping status
                    example: enabled
                  roomtype_mappings:
                    type: array
                    items:
                      type: object
                      properties:
                        vendor_roomtype_id:
                          type: string
                          description: Vendor room type ID
                          example: VRT-001
                        channel_roomtype_id:
                          type:
                            - string
                            - "null"
                          description: Channel room type ID. Included only in CMS channel responses.
                          example: CRT-001
                        status:
                          type: string
                          description: Mapping status
                          example: enabled
                      required:
                        - vendor_roomtype_id
                        - status
                  rateplan_mappings:
                    type: array
                    items:
                      type: object
                      properties:
                        vendor_rateplan_id:
                          type: string
                          description: Vendor rate plan ID
                          example: VRP-001
                        vendor_roomtype_id:
                          type: string
                          description: Vendor room type ID
                          example: VRT-001
                        channel_rateplan_id:
                          type:
                            - string
                            - "null"
                          description: Channel rate plan ID. Included only in CMS channel responses.
                          example: CRP-001
                        status:
                          type: string
                          description: Mapping status
                          example: enabled
                      required:
                        - vendor_rateplan_id
                        - vendor_roomtype_id
                        - status
                required:
                  - vendor_property_id
                  - channel_id
                  - channel_name
                  - status
                  - roomtype_mappings
                  - rateplan_mappings
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}/channels/{channel_id}/mappings:
    get:
      operationId: get-roomtype-mapping
      tags:
        - channel-mapping
      security:
        - Authorization: []
      summary: Get Room Type Mapping
      description: |-
        - Retrieves the mapping state between a room type and a channel room type.
        - It is meaningful only after the property mapping is in place; room type mappings cannot be created while the property is unlinked.
        - Mappings apply only to direct channels.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
      responses:
        "200":
          description: Room type mapping retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  vendor_roomtype_id:
                    type: string
                    description: Vendor room type ID
                    example: VRT-001
                  channel_roomtype_id:
                    type:
                      - string
                      - "null"
                    description: Channel room type ID. Included only in CMS channel responses.
                    example: CRT-001
                  status:
                    type: string
                    description: Mapping status
                    example: enabled
                  rateplan_mappings:
                    type: array
                    items:
                      type: object
                      properties:
                        vendor_rateplan_id:
                          type: string
                          description: Vendor rate plan ID
                          example: VRP-001
                        vendor_roomtype_id:
                          type: string
                          description: Vendor room type ID
                          example: VRT-001
                        channel_rateplan_id:
                          type:
                            - string
                            - "null"
                          description: Channel rate plan ID. Included only in CMS channel responses.
                          example: CRP-001
                        status:
                          type: string
                          description: Mapping status
                          example: enabled
                      required:
                        - vendor_rateplan_id
                        - vendor_roomtype_id
                        - status
                required:
                  - vendor_roomtype_id
                  - status
                  - rateplan_mappings
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
    patch:
      operationId: update-roomtype-mapping
      tags:
        - channel-mapping
      security:
        - Authorization: []
      summary: Update Room Type Mapping
      description: |-
        - Updates the mapping between a room type and a channel room type.
        - Put the channel-side room type ID in `channel_roomtype_id` to link them, and use `status` to turn the mapping on or off.
        - Sending `null` clears the mapping; omitting the field keeps the existing value.
        - The property mapping must be completed first, and only direct channels can be modified.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_roomtype_id:
                  type:
                    - string
                    - "null"
                  minLength: 1
                  description: Channel room type ID. Only CMS channels can modify it. Sending null clears it; omitting it keeps the existing value.
                  example: CRT-001
                status:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  description: Mapping status
                  example: enabled
              additionalProperties: false
      responses:
        "200":
          description: Room type mapping updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  vendor_roomtype_id:
                    type: string
                    description: Vendor room type ID
                    example: VRT-001
                  channel_roomtype_id:
                    type:
                      - string
                      - "null"
                    description: Channel room type ID. Included only in CMS channel responses.
                    example: CRT-001
                  status:
                    type: string
                    description: Mapping status
                    example: enabled
                  rateplan_mappings:
                    type: array
                    items:
                      type: object
                      properties:
                        vendor_rateplan_id:
                          type: string
                          description: Vendor rate plan ID
                          example: VRP-001
                        vendor_roomtype_id:
                          type: string
                          description: Vendor room type ID
                          example: VRT-001
                        channel_rateplan_id:
                          type:
                            - string
                            - "null"
                          description: Channel rate plan ID. Included only in CMS channel responses.
                          example: CRP-001
                        status:
                          type: string
                          description: Mapping status
                          example: enabled
                      required:
                        - vendor_rateplan_id
                        - vendor_roomtype_id
                        - status
                required:
                  - vendor_roomtype_id
                  - status
                  - rateplan_mappings
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}/rateplans/{vendor_rateplan_id}/channels/{channel_id}/mappings:
    get:
      operationId: get-rateplan-mapping
      tags:
        - channel-mapping
      security:
        - Authorization: []
      summary: Get Rate Plan Mapping
      description: |-
        - Retrieves the mapping state between a rate plan and a channel rate plan.
        - It is meaningful only after the property and room type mappings are in place; mapping proceeds from property to room type to rate plan.
        - Mappings apply only to direct channels.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan ID
            example: VRP-001
          required: true
          description: Vendor rate plan ID
          name: vendor_rateplan_id
          in: path
      responses:
        "200":
          description: Rate plan mapping retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  vendor_rateplan_id:
                    type: string
                    description: Vendor rate plan ID
                    example: VRP-001
                  vendor_roomtype_id:
                    type: string
                    description: Vendor room type ID
                    example: VRT-001
                  channel_rateplan_id:
                    type:
                      - string
                      - "null"
                    description: Channel rate plan ID. Included only in CMS channel responses.
                    example: CRP-001
                  status:
                    type: string
                    description: Mapping status
                    example: enabled
                required:
                  - vendor_rateplan_id
                  - vendor_roomtype_id
                  - status
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
    patch:
      operationId: update-rateplan-mapping
      tags:
        - channel-mapping
      security:
        - Authorization: []
      summary: Update Rate Plan Mapping
      description: |-
        - Updates the mapping between a rate plan and a channel rate plan.
        - Put the channel-side rate plan ID in `channel_rateplan_id` to link them, and use `status` to turn the mapping on or off.
        - Sending `null` clears the mapping; omitting the field keeps the existing value.
        - Map to `0` on channels that have no concept of rate plans.
        - The property and room type mappings must be completed first, and only direct channels can be modified.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan ID
            example: VRP-001
          required: true
          description: Vendor rate plan ID
          name: vendor_rateplan_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_rateplan_id:
                  type:
                    - string
                    - "null"
                  minLength: 1
                  description: Channel rate plan ID. Only CMS channels can modify it. Sending null clears it; omitting it keeps the existing value.
                  example: CRP-001
                status:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  description: Mapping status
                  example: enabled
              additionalProperties: false
      responses:
        "200":
          description: Rate plan mapping updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  vendor_rateplan_id:
                    type: string
                    description: Vendor rate plan ID
                    example: VRP-001
                  vendor_roomtype_id:
                    type: string
                    description: Vendor room type ID
                    example: VRT-001
                  channel_rateplan_id:
                    type:
                      - string
                      - "null"
                    description: Channel rate plan ID. Included only in CMS channel responses.
                    example: CRP-001
                  status:
                    type: string
                    description: Mapping status
                    example: enabled
                required:
                  - vendor_rateplan_id
                  - vendor_roomtype_id
                  - status
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/channels/{channel_id}/authorization:
    get:
      operationId: get-channel-authorization-url
      tags:
        - channel
      security:
        - Authorization: []
      summary: Get Channel Authorization URL
      description: |-
        - **Airbnb only.** It applies to channels whose channel metadata sets `requires_cms_authorization` to `true`, which today means Airbnb alone. Calling it for any other channel returns `403`.
        - Airbnb requires OAuth approval from the host account for each property. Use this API to obtain an authorization URL, send the host there, and wait for approval before proceeding with room type and rate plan mappings.
        - Once the host finishes authorizing, they return to `redirect_url` with `?auth_result=success|fail` appended.
        - `auth_result` is a display hint only. Judge completion by whether `channel_property_id` is present in the property mapping.
        - An issued authorization URL must be used within one hour; once it expires you must issue a new one. Issue it at the moment the host presses the button.
        - Authorization is per property, so a host account operating several properties must repeat it for each one.
      parameters:
        - schema:
            type: string
            description: Channel ID
            example: "1"
          required: true
          description: Channel ID
          name: channel_id
          in: path
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: query
        - schema:
            type: string
            format: uri
            description: Redirect URL to return to after authorization. On return, `?auth_result=success|fail` is appended and any existing query parameters are preserved.
            example: https://vendor.example.com/callback
          required: true
          description: Redirect URL to return to after authorization. On return, `?auth_result=success|fail` is appended and any existing query parameters are preserved.
          name: redirect_url
          in: query
      responses:
        "200":
          description: Channel authorization URL retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: Channel authorization URL
                    example: https://channel.example.com/oauth/authorize?state=abc
                required:
                  - url
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/channels:
    get:
      operationId: list-property-channel-requests
      tags:
        - channel-open
      security:
        - Authorization: []
      summary: Channel request list by property
      description: Returns the channels this property has actually submitted requests for, along with each channel's latest request status, regardless of the current vendor whitelist or channel state.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
      responses:
        "200":
          description: Channel request status list. Returns an empty array when there is no request history.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    channel_id:
                      type: number
                      description: Channel ID
                      example: 1
                    channel_name:
                      type: string
                      description: Channel name
                      example: ONDA
                    processing_mode:
                      type: string
                      enum:
                        - auto_approve
                        - external_review
                      description: Processing mode. auto_approve channels activate immediately; external_review channels require operator approval.
                      example: auto_approve
                    description:
                      type: string
                      description: Channel description
                      example: ONDA's own sales channel
                    request_type:
                      type: string
                      enum:
                        - "on"
                        - "off"
                      description: Latest request type
                      example: "on"
                    request_status:
                      type: string
                      enum:
                        - pending
                        - confirm
                        - reject
                      description: Latest request status
                      example: confirm
                  required:
                    - channel_id
                    - channel_name
                    - processing_mode
                    - request_type
                    - request_status
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /gds/vendor/properties/{vendor_property_id}/channels/{channel_id}:
    post:
      operationId: create-property-channel-request
      tags:
        - channel-open
      security:
        - Authorization: []
      summary: Create Channel Request
      description: |-
        - Creates a request to start (ON) or stop (OFF) selling on the channel.
        - ON requests run the shared pre-checks and are rejected immediately when the conditions are not met.
        - CMS-integrated channels are exempt from the property image, property category, and room image checks.
        - OFF requests are auto-approved immediately on every channel.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Channel ID
            example: "2"
          required: true
          description: Channel ID
          name: channel_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                request_type:
                  type: string
                  enum:
                    - "on"
                    - "off"
                  description: Request type. on requests channel opening; off requests channel closure.
                  example: "on"
                channel_property_id:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: Channel-side property ID (optional). Allowed only on on requests; sending it with off is rejected with 400. If another property already uses the ID on the same channel, it is rejected with 409. When submitted, it is applied to the property mapping at request time.
                  example: CP-001
                note:
                  type: string
                  maxLength: 16000
                  description: Note left by the requester (vendor) (optional, up to 16,000 characters). Allowed on both on and off requests. Use it for information the operator should see.
                  example: Opening request agreed with the channel manager.
              required:
                - request_type
      responses:
        "200":
          description: Request processing result
          content:
            application/json:
              schema:
                type: object
                properties:
                  channel_id:
                    type: number
                    description: Channel ID
                    example: 1
                  channel_name:
                    type: string
                    description: Channel name
                    example: ONDA
                  request_type:
                    type: string
                    enum:
                      - "on"
                      - "off"
                    description: Request type
                    example: "on"
                  request_status:
                    type: string
                    enum:
                      - pending
                      - confirm
                      - reject
                    description: Request status
                    example: pending
                  channel_property_id:
                    type:
                      - string
                      - "null"
                    description: Channel property ID submitted with the request. null if none was submitted.
                    example: CP-001
                  note:
                    type:
                      - string
                      - "null"
                    description: Requester (vendor) note. null if none was submitted. The processor's reason is returned separately in reason.
                    example: null
                  reason:
                    type:
                      - string
                      - "null"
                    description: Reason recorded by the processor (operator or system). Usually filled in when a request is rejected.
                    example: null
                  created_at:
                    type: string
                    description: Requested at (ISO 8601)
                    example: "2026-04-07T10:00:00+09:00"
                  updated_at:
                    type: string
                    description: Updated at (ISO 8601)
                    example: "2026-04-07T10:00:00+09:00"
                required:
                  - channel_id
                  - channel_name
                  - request_type
                  - request_status
                  - channel_property_id
                  - note
                  - reason
                  - created_at
                  - updated_at
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: A request is already being processed.
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
    get:
      operationId: get-property-channel-request
      tags:
        - channel-open
      security:
        - Authorization: []
      summary: Get Channel Request Detail
      description: Returns the channel's latest request status and up to 100 history entries, newest first, regardless of the current vendor whitelist or channel state.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Channel ID
            example: "2"
          required: true
          description: Channel ID
          name: channel_id
          in: path
      responses:
        "200":
          description: Channel request status
          content:
            application/json:
              schema:
                type: object
                properties:
                  channel_id:
                    type: number
                    description: Channel ID
                    example: 1
                  channel_name:
                    type: string
                    description: Channel name
                    example: ONDA
                  request_type:
                    type: string
                    enum:
                      - "on"
                      - "off"
                    description: Request type
                    example: "on"
                  request_status:
                    type: string
                    enum:
                      - pending
                      - confirm
                      - reject
                    description: Request status
                    example: pending
                  channel_property_id:
                    type:
                      - string
                      - "null"
                    description: Channel property ID submitted with the request. null if none was submitted.
                    example: CP-001
                  note:
                    type:
                      - string
                      - "null"
                    description: Requester (vendor) note. null if none was submitted. The processor's reason is returned separately in reason.
                    example: null
                  reason:
                    type:
                      - string
                      - "null"
                    description: Reason recorded by the processor (operator or system). Usually filled in when a request is rejected.
                    example: null
                  created_at:
                    type: string
                    description: Requested at (ISO 8601)
                    example: "2026-04-07T10:00:00+09:00"
                  updated_at:
                    type: string
                    description: Updated at (ISO 8601)
                    example: "2026-04-07T10:00:00+09:00"
                  histories:
                    type: array
                    items:
                      type: object
                      properties:
                        request_type:
                          type: string
                          enum:
                            - "on"
                            - "off"
                          description: Request type
                          example: "on"
                        request_status:
                          type: string
                          enum:
                            - pending
                            - confirm
                            - reject
                          description: Processing status
                          example: confirm
                        channel_property_id:
                          type:
                            - string
                            - "null"
                          description: Channel property ID submitted with that request. null if none was submitted.
                          example: CP-001
                        note:
                          type:
                            - string
                            - "null"
                          description: Requester (vendor) note submitted with that request. null if none was submitted.
                          example: null
                        reason:
                          type:
                            - string
                            - "null"
                          description: Reason recorded by the processor (operator or system)
                          example: null
                        processed_at:
                          type:
                            - string
                            - "null"
                          description: Processed at (ISO 8601)
                          example: "2026-04-07T10:00:00+09:00"
                        created_at:
                          type: string
                          description: Created at (ISO 8601)
                          example: "2026-04-07T10:00:00+09:00"
                      required:
                        - request_type
                        - request_status
                        - channel_property_id
                        - note
                        - reason
                        - processed_at
                        - created_at
                    description: Request history, newest first, up to 100 entries.
                required:
                  - channel_id
                  - channel_name
                  - request_type
                  - request_status
                  - channel_property_id
                  - note
                  - reason
                  - created_at
                  - updated_at
                  - histories
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Invalid Parameter.
                required:
                  - message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                required:
                  - message
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                required:
                  - message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not Found
                required:
                  - message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                required:
                  - message
  /properties/{vendor_property_id}/roomtypes/{vendor_roomtype_id}/rateplans/{vendor_rateplan_id}/refund_policy:
    get:
      operationId: webhook-get-refund-policy
      servers:
        - url: "{vendor_base_url}"
          description: Receiving server provided by the vendor
          variables:
            vendor_base_url:
              default: https://vendor.example.com
              description: Base URL of the vendor server
      tags:
        - webhook-ari
      summary: Cancellation and Refund Policy
      description: |-
        - The vendor implements this endpoint and ONDA calls it.
        - ONDA retrieves the vendor's cancellation and refund policy.
      parameters:
        - schema:
            type: string
            description: Vendor property ID
            example: VP-001
          required: true
          description: Vendor property ID
          name: vendor_property_id
          in: path
        - schema:
            type: string
            description: Vendor room type ID
            example: VRT-001
          required: true
          description: Vendor room type ID
          name: vendor_roomtype_id
          in: path
        - schema:
            type: string
            description: Vendor rate plan ID
            example: VRP-001
          required: true
          description: Vendor rate plan ID
          name: vendor_rateplan_id
          in: path
        - schema:
            type: string
            description: Check-in date and time
            example: "2026-01-20"
          required: true
          description: Check-in date and time
          name: checkin
          in: query
        - schema:
            type: string
            description: Check-out date and time
            example: "2026-01-21"
          required: true
          description: Check-out date and time
          name: checkout
          in: query
      responses:
        "200":
          description: Cancellation and refund policy retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: ""
                  checkin:
                    type: string
                    format: date-time
                    description: Check-in date and time (ISO 8601)
                    example: "2026-01-20T00:00:00+09:00"
                  checkout:
                    type: string
                    format: date-time
                    description: Check-out date and time (ISO 8601)
                    example: "2026-01-21T00:00:00+09:00"
                  refunds:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - refund
                          description: Refund type
                          example: refund
                        until:
                          type: string
                          format: date-time
                          description: Refundable until (ISO 8601 with offset)
                          example: "2026-01-19T23:59:59+09:00"
                        percent:
                          type: number
                          description: Refund rate (%)
                          example: 100
                        amount:
                          type: number
                          description: Refund amount
                          example: 100000
                      required:
                        - type
                        - until
                        - percent
                        - amount
                    description: Refund policy list
                required:
                  - error
                  - checkin
                  - checkout
                  - refunds
        "400":
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "403":
          description: Access Denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "500":
          description: System Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
  /bookings:
    post:
      operationId: webhook-create-booking
      servers:
        - url: "{vendor_base_url}"
          description: Receiving server provided by the vendor
          variables:
            vendor_base_url:
              default: https://vendor.example.com
              description: Base URL of the vendor server
      tags:
        - webhook-reservation
      summary: Create Booking
      description: |-
        - The vendor implements this endpoint and ONDA calls it.
        - ONDA requests that the vendor create a booking.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_id:
                  type: number
                  description: Sales channel ID
                  example: 132
                channel_name:
                  type: string
                  description: Sales channel name
                  example: Naver
                channel_booking_number:
                  type: string
                  description: Sales channel booking number. Omitted when the channel does not supply its own booking number.
                  example: CH-001
                gds_booking_number:
                  type: string
                  description: ONDA Hub booking number
                  example: GDS-001
                gds_sub_booking_number:
                  type: string
                  description: ONDA Hub sub-booking number
                  example: GDS-001-1
                property_id:
                  type: string
                  description: Vendor property ID
                  example: VP-001
                roomtype_id:
                  type: string
                  description: Vendor room type ID
                  example: VRT-001
                rateplan_id:
                  type: string
                  description: Vendor rate plan ID
                  example: VRP-001
                checkin:
                  type: string
                  format: date-time
                  description: Check-in date and time (ISO 8601)
                  example: "2026-01-20T15:00:00+09:00"
                checkout:
                  type: string
                  format: date-time
                  description: Check-out date and time (ISO 8601)
                  example: "2026-01-21T11:00:00+09:00"
                currency:
                  type: string
                  description: Currency
                  example: KRW
                total_amount:
                  type: number
                  description: Total stay amount
                  example: 100000
                guest:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Guest name
                      example: Hong Gil-dong
                    adults:
                      type: number
                      description: Adults
                      example: 2
                    children:
                      type: number
                      description: Children
                      example: 0
                    infants:
                      type: number
                      description: Infants
                      example: 0
                    pets:
                      type: number
                      description: Pets
                      example: 0
                    cars:
                      type: number
                      description: Vehicles
                      example: 1
                  required:
                    - name
                    - adults
                    - children
                    - infants
                booker:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Booker name
                      example: Kim Ye-yak
                    email:
                      type: string
                      description: Booker email
                      example: booker@example.com
                    phone:
                      type: string
                      description: Booker phone
                      example: 010-1234-5678
                  required:
                    - name
                    - email
                    - phone
                special_comment:
                  type: string
                  description: Guest requests
                  example: Please assign a high floor
                type:
                  type: string
                  enum:
                    - dayuse
                    - overnight
                  description: Day-use or overnight (day-use = dayuse, overnight stay = overnight)
                  example: overnight
                payment_type:
                  type: string
                  enum:
                    - prepayment
                    - postpayment
                  description: Payment type (prepaid = prepayment, pay on arrival = postpayment). With postpayment, total_amount is collected on site.
                  example: prepayment
                net_price:
                  type: number
                  description: Deposit amount (payable to the vendor)
                  example: 90000
                reserved_at:
                  type: string
                  format: date-time
                  description: Booking date and time (ISO 8601 with offset)
                  example: "2026-01-19T10:00:00+09:00"
                visit_type:
                  type: string
                  enum:
                    - walk
                    - car
                  description: Arrival method (on foot = walk, by car = car). Present only when the channel supplies it; otherwise omitted.
                  example: car
                secondary_channel:
                  type: string
                  description: Secondary sales channel (the final selling brand when a channel resells through another brand or OTA). Present only when the channel supplies it; otherwise omitted.
                  example: Expedia Affiliate Network
              required:
                - channel_id
                - channel_name
                - gds_booking_number
                - gds_sub_booking_number
                - property_id
                - roomtype_id
                - rateplan_id
                - checkin
                - checkout
                - currency
                - total_amount
                - guest
                - booker
                - payment_type
                - net_price
                - reserved_at
      responses:
        "200":
          description: Booking creation request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: ""
                  reservation:
                    type: object
                    properties:
                      booking_number:
                        type: string
                        description: Vendor booking number
                        example: VB-20260101-0001
                      requested_at:
                        type: string
                        format: date-time
                        description: Request date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:00:00+09:00"
                      updated_at:
                        type: string
                        format: date-time
                        description: Modification date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:01:00+09:00"
                      status:
                        type: string
                        enum:
                          - pending
                        description: Booking status
                        example: pending
                      refunds:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - refund
                              description: Refund type
                              example: refund
                            until:
                              type: string
                              format: date-time
                              description: Refundable until (ISO 8601 with offset)
                              example: "2026-01-19T23:59:59+09:00"
                            percent:
                              type: number
                              description: Refund rate (%)
                              example: 100
                            amount:
                              type: number
                              description: Refund amount
                              example: 100000
                          required:
                            - type
                            - until
                            - percent
                            - amount
                        description: Refund policy list
                    required:
                      - booking_number
                      - status
                required:
                  - error
                  - reservation
        "400":
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "403":
          description: Access Denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "404":
          description: Reservation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "409":
          description: Business Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "500":
          description: System Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
  /bookings/{vendor_booking_number}/confirm:
    put:
      operationId: webhook-confirm-booking
      servers:
        - url: "{vendor_base_url}"
          description: Receiving server provided by the vendor
          variables:
            vendor_base_url:
              default: https://vendor.example.com
              description: Base URL of the vendor server
      tags:
        - webhook-reservation
      summary: Confirm Booking
      description: |-
        - The vendor implements this endpoint and ONDA calls it.
        - ONDA requests that the vendor confirm a booking.
        - The paid amount (paid_amount) is not sent to the vendor.
        - Identify the booking to confirm by `vendor_booking_number` in the path. `property_id` and `roomtype_id` in the body are informational and may be absent, so do not rely on them to locate the booking. `rateplan_id` is always sent.
      parameters:
        - schema:
            type: string
            description: Vendor booking number
            example: VB-20260101-0001
          required: true
          description: Vendor booking number
          name: vendor_booking_number
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                confirmed_at:
                  type: string
                  format: date-time
                  description: Booking confirmation date and time (ISO 8601)
                  example: "2026-01-19T10:05:00+09:00"
                property_id:
                  type: string
                  description: Vendor property ID
                  example: VP-001
                roomtype_id:
                  type: string
                  description: Vendor room type ID
                  example: VRT-001
                rateplan_id:
                  type: string
                  description: Vendor rate plan ID
                  example: VRP-001
              required:
                - confirmed_at
                - rateplan_id
      responses:
        "200":
          description: Booking confirmation request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: ""
                  reservation:
                    type: object
                    properties:
                      booking_number:
                        type: string
                        description: Vendor booking number
                        example: VB-20260101-0001
                      requested_at:
                        type: string
                        format: date-time
                        description: Request date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:00:00+09:00"
                      updated_at:
                        type: string
                        format: date-time
                        description: Modification date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:01:00+09:00"
                      status:
                        type: string
                        enum:
                          - confirm
                        description: Booking status
                        example: confirm
                    required:
                      - booking_number
                      - status
                required:
                  - error
                  - reservation
        "400":
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "403":
          description: Access Denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "404":
          description: Reservation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "409":
          description: Business Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "500":
          description: System Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
  /bookings/{vendor_booking_number}/cancel:
    post:
      operationId: webhook-cancel-booking
      servers:
        - url: "{vendor_base_url}"
          description: Receiving server provided by the vendor
          variables:
            vendor_base_url:
              default: https://vendor.example.com
              description: Base URL of the vendor server
      tags:
        - webhook-reservation
      summary: Cancel Booking
      description: |-
        - The vendor implements this endpoint and ONDA calls it.
        - ONDA requests that the vendor cancel a booking.
        - The vendor also receives the cancellation reason (memo).
      parameters:
        - schema:
            type: string
            description: Vendor booking number
            example: VB-20260101-0001
          required: true
          description: Vendor booking number
          name: vendor_booking_number
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                canceled_at:
                  type: string
                  format: date-time
                  description: Cancellation date and time (ISO 8601)
                  example: "2026-01-20T14:30:00+09:00"
                canceled_by:
                  type: string
                  enum:
                    - user
                    - admin
                    - channel
                    - system
                  description: Who cancelled the booking. Defaults to system when unknown.
                  example: channel
                refund:
                  type: object
                  properties:
                    amount:
                      type: number
                      description: Refund amount
                      example: 50000
                    percent:
                      type: number
                      description: Refund rate (%)
                      example: 50
                  required:
                    - amount
                    - percent
                  description: Refund information
                property_id:
                  type: string
                  description: Vendor property ID
                  example: VP-001
                roomtype_id:
                  type: string
                  description: Vendor room type ID
                  example: VRT-001
                rateplan_id:
                  type: string
                  description: Vendor rate plan ID
                  example: VRP-001
                memo:
                  type: string
                  description: Cancellation reason (optional). Sent when a reason exists, such as a cancellation by a channel administrator.
                  example: Cancelled by the channel administrator
              required:
                - canceled_at
                - canceled_by
                - refund
                - property_id
                - roomtype_id
                - rateplan_id
      responses:
        "200":
          description: Booking cancellation request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: ""
                  reservation:
                    type: object
                    properties:
                      booking_number:
                        type: string
                        description: Vendor booking number
                        example: VB-20260101-0001
                      requested_at:
                        type: string
                        format: date-time
                        description: Request date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:00:00+09:00"
                      updated_at:
                        type: string
                        format: date-time
                        description: Modification date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:01:00+09:00"
                      status:
                        type: string
                        enum:
                          - cancel
                        description: Booking status
                        example: cancel
                    required:
                      - booking_number
                      - status
                required:
                  - error
                  - reservation
        "400":
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "403":
          description: Access Denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "404":
          description: Reservation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "409":
          description: Business Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "500":
          description: System Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
  /bookings/{vendor_booking_number}/modify:
    put:
      operationId: webhook-modify-booking
      servers:
        - url: "{vendor_base_url}"
          description: Receiving server provided by the vendor
          variables:
            vendor_base_url:
              default: https://vendor.example.com
              description: Base URL of the vendor server
      tags:
        - webhook-reservation
      summary: Modify Booking
      description: |-
        - The vendor implements this endpoint and ONDA calls it.
        - ONDA requests that the vendor modify a booking.
      parameters:
        - schema:
            type: string
            description: Vendor booking number
            example: VB-20260101-0001
          required: true
          description: Vendor booking number
          name: vendor_booking_number
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                roomtype_id:
                  type: string
                  description: Vendor room type ID
                  example: VRT-001
                rateplan_id:
                  type: string
                  description: Vendor rate plan ID
                  example: VRP-001
                total_amount:
                  type: number
                  description: Total stay amount
                  example: 100000
                guest:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Guest name
                      example: Hong Gil-dong
                    adults:
                      type: number
                      description: Adults
                      example: 2
                    children:
                      type: number
                      description: Children
                      example: 0
                    infants:
                      type: number
                      description: Infants
                      example: 0
                    pets:
                      type: number
                      description: Pets
                      example: 0
                    cars:
                      type: number
                      description: Vehicles
                      example: 1
                  required:
                    - name
                    - adults
                    - children
                    - infants
                booker:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Booker name
                      example: Kim Ye-yak
                    email:
                      type: string
                      description: Booker email
                      example: booker@example.com
                    phone:
                      type: string
                      description: Booker phone
                      example: 010-1234-5678
                  required:
                    - name
                    - email
                    - phone
                special_comment:
                  type: string
                  description: Guest requests
                  example: Please assign a high floor
                net_price:
                  type: number
                  description: Deposit amount (payable to the vendor)
                  example: 90000
                checkin:
                  type: string
                  format: date-time
                  description: Check-in date and time (ISO 8601)
                  example: "2026-01-20T15:00:00+09:00"
                checkout:
                  type: string
                  format: date-time
                  description: Check-out date and time (ISO 8601)
                  example: "2026-01-21T11:00:00+09:00"
                updated_at:
                  type: string
                  format: date-time
                  description: Modification date and time (ISO 8601)
                  example: "2026-01-19T11:00:00+09:00"
                secondary_channel:
                  type: string
                  description: Secondary sales channel (the final selling brand when a channel resells through another brand or OTA). Present only when the channel supplies it; otherwise omitted.
                  example: Expedia Affiliate Network
              required:
                - roomtype_id
                - rateplan_id
                - total_amount
                - guest
                - booker
                - net_price
                - checkin
                - checkout
                - updated_at
      responses:
        "200":
          description: Booking modification request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: ""
                  reservation:
                    type: object
                    properties:
                      booking_number:
                        type: string
                        description: Vendor booking number
                        example: VB-20260101-0001
                      requested_at:
                        type: string
                        format: date-time
                        description: Request date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:00:00+09:00"
                      updated_at:
                        type: string
                        format: date-time
                        description: Modification date and time (ISO 8601 with offset)
                        example: "2026-01-01T10:01:00+09:00"
                    required:
                      - booking_number
                required:
                  - error
                  - reservation
        "400":
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "403":
          description: Access Denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "404":
          description: Reservation not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "409":
          description: Business Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
        "500":
          description: System Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - "1000"
                      - "2000"
                      - "3000"
                      - "4000"
                      - "4001"
                      - "4002"
                      - "4003"
                      - "4004"
                      - "4005"
                      - "4006"
                      - "4007"
                      - "9999"
                    description: Error code
                    example: "3000"
                  error:
                    type: string
                    enum:
                      - An error occurred during system processing
                      - Access denied
                      - Please check your input information
                      - No rooms available for booking
                      - Requested amount differs from actual amount
                      - Minimum guest requirement not met
                      - Maximum guest capacity exceeded
                      - Reservation not found
                      - Reservation already cancelled
                      - Reservation cannot be cancelled
                      - Reservation cannot be confirmed
                      - An unknown error occurred
                    description: Error message
                    example: Please check your input information
                required:
                  - code
                  - error
x-tagGroups:
  - name: API
    tags:
      - content-meta
      - content-property
      - content-roomtype
      - content-rateplan-model
      - content-rateplan
      - content-license
      - ari
      - reservation
      - channel
      - channel-open
      - channel-setting
      - channel-mapping
  - name: Webhook
    tags:
      - webhook-ari
      - webhook-reservation
