{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/airroi/json-schema/airroi-calendar-price-recommendation-request-schema.json",
  "title": "Calendar Price request",
  "description": "Send location, currency, and base_price. Omitted rules are disabled.\nUse JSON numbers and booleans, not strings. Unknown fields are ignored.\nOmit unused fields. start_date, end_date and price_limits.min_price/max_price\naccept null, which selects their defaults.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/airroi-openapi.json#/components/schemas/CalendarPriceRecommendationRequest",
  "type": "object",
  "required": [
    "location",
    "currency",
    "base_price"
  ],
  "properties": {
    "location": {
      "$ref": "#/$defs/CalendarPricingLocation"
    },
    "currency": {
      "$ref": "#/$defs/PriceRecommendationCurrency"
    },
    "base_price": {
      "type": "number",
      "format": "double",
      "exclusiveMinimum": true,
      "minimum": 0,
      "description": "Year-round nightly rate before date-specific adjustments, in currency.\nUse your own value or recommended_base_price from the Base Price endpoint.\nExclude cleaning fees, taxes, and platform fees. Must be positive and use\nthe currency's decimal precision (2 places for USD, 0 for JPY, 3 for BHD).\n"
    },
    "start_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "Optional inclusive first output date (YYYY-MM-DD). Omitted or null starts\ntoday in the property's timezone. Must not be after end_date (422\nINVALID_DATE_RANGE). A past date returns 422 START_DATE_IN_PAST; a date\nafter the available calendar returns 422 START_DATE_BEYOND_AVAILABLE_HORIZON.\nEmpty string, impossible date, or wrong JSON type returns 422. Only selects\nreturned rows: lead-time rules still count from today, and calculation,\nevidence and warnings cover the full available calendar.\n"
    },
    "end_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "Optional inclusive output end date (YYYY-MM-DD). Omitted or null returns\nthe full available calendar (one to two years from start_date or today).\nstart_date and end_date on the same day return one row. A past date, empty\nstring, impossible date, or wrong JSON type returns 422. A date beyond\nthe available calendar is clamped; coverage.end_date reports the last date returned.\nOnly limits returned rows: calculation, evidence and warnings still cover\nthe full available calendar.\n"
    },
    "calendar": {
      "type": "array",
      "maxItems": 1000,
      "description": "Booking and availability data, not the requested output dates. Required for\ngap-day, adjacent-day, and occupancy-pacing adjustments. Include consecutive\ndates and surrounding reservations or blocks. Missing dates are unknown;\nnights a calendar-dependent rule cannot evaluate are skipped with an\nINCOMPLETE_CALENDAR warning, and so is every night when calendar is\nomitted or [] while such a rule is enabled.\nReserved and blocked rows also suppress last-minute and far-future adjustments.\n",
      "items": {
        "$ref": "#/$defs/CalendarPricingCalendarDay"
      }
    },
    "pricing_rules": {
      "$ref": "#/$defs/CalendarPricingRules"
    },
    "stay_rules": {
      "$ref": "#/$defs/CalendarPricingStayRules"
    },
    "price_limits": {
      "$ref": "#/$defs/CalendarPricingPriceLimits"
    },
    "price_overrides": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CalendarPricingPriceOverride"
      },
      "description": "Explicit percentage or fixed-price instructions for\ninclusive stay-date ranges. Applied after model and\nautomatic pricing-rule adjustments. An empty array is\naccepted. Date ranges across the entire list must not\noverlap (inclusive of endpoints).\n"
    },
    "advanced": {
      "$ref": "#/$defs/CalendarPricingAdvanced"
    }
  },
  "$defs": {
    "CalendarPricingAdjacentDayRule": {
      "type": "object",
      "title": "Adjacent Day rule",
      "required": [
        "mode"
      ],
      "description": "Adjusts available nights before or after a known reservation. Blocked or\nunknown dates interrupt the search. A nonzero gap-day adjustment takes priority.\nCustom mode requires complete settings and apply_on_weekends.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingCustomOnlyMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingAdjacentDaySettings"
        },
        "apply_on_weekends": {
          "type": "boolean",
          "description": "Whether Friday and Saturday stay dates may receive this adjustment. Required in custom mode; rejected in all other modes."
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesAdjacentDay"
        }
      }
    },
    "CalendarPricingAdjacentDaySettings": {
      "type": "object",
      "title": "Adjacent Day settings",
      "required": [
        "days_before",
        "days_after",
        "adjustment_percent"
      ],
      "properties": {
        "days_before": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30,
          "description": "Number of contiguous available nights before a reservation to adjust. 0 disables this direction."
        },
        "days_after": {
          "type": "integer",
          "minimum": 0,
          "maximum": 30,
          "description": "Number of contiguous available nights after a reservation to adjust. 0 disables this direction."
        },
        "adjustment_percent": {
          "type": "number",
          "minimum": -100,
          "exclusiveMinimum": true,
          "description": "Signed percentage for every qualifying adjacent night. Greater than -100 with at most two decimal places. Applied once even when reservations exist on both sides."
        }
      },
      "description": "At least one of `days_before` and `days_after` must be greater than zero."
    },
    "CalendarPricingAdvanced": {
      "type": "object",
      "title": "Advanced model controls",
      "description": "Controls the strength of model effects, independently of custom rules.\nDefaults apply when omitted.\n",
      "properties": {
        "seasonality_sensitivity_percent": {
          "type": "number",
          "minimum": 0,
          "maximum": 200,
          "default": 100,
          "description": "Scales seasonality, modeled weekday, and holiday/event effects.\n0 removes them, 100 keeps them unchanged, and 200 doubles each effect's\ndistance from neutral. At most two decimal places.\nValues above 100 can return 503 PRICING_DATA_UNAVAILABLE if a scaled\nmodel factor becomes zero or negative.\n"
        },
        "demand_sensitivity_percent": {
          "type": "number",
          "minimum": 0,
          "maximum": 200,
          "default": 100,
          "description": "Scales the Market Demand Adjustment. 0 removes it, 100 uses the model as trained, 200 doubles its distance from neutral. At most two decimal places. Regardless of this setting the effective demand adjustment is always bounded between -15% and +400%."
        },
        "apply_negative_demand_adjustments": {
          "type": "boolean",
          "default": true,
          "description": "When false, a below-neutral Market Demand factor is neutralized and the `market_demand` receipt line is omitted entirely for that date. The test is on the sensitivity-scaled factor before clamping."
        }
      }
    },
    "CalendarPricingCalendarDay": {
      "type": "object",
      "title": "Calendar day",
      "description": "Known state of one property-local stay date. Only `date` and `status` are required. Rows need not be sorted, contiguous, or future-dated. Duplicate dates are rejected.",
      "required": [
        "date",
        "status"
      ],
      "properties": {
        "date": {
          "$ref": "#/$defs/CalendarPricingDate"
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "reserved",
            "blocked"
          ],
          "x-enumDescriptions": {
            "available": "The date can be sold. Calendar-dependent pricing rules apply only to available dates.",
            "reserved": "The date belongs to a confirmed reservation. Last-minute and far-future rules are suppressed.",
            "blocked": "The date is unavailable for a non-reservation reason. Like `reserved` it suppresses last-minute and far-future rules and bounds a gap, but it does not anchor the adjacent-day rule and is excluded from the occupancy ratio."
          },
          "description": "Case-sensitive booking state. Calendar-dependent pricing rules (gap day, adjacent day, occupancy pacing) require the stay date to be `available`."
        },
        "price": {
          "type": "number",
          "format": "double",
          "exclusiveMinimum": true,
          "minimum": 0,
          "description": "Optional current nightly price in the request currency. Must be positive with valid minor-unit precision. Accepted and validated but not used by any pricing rule in this release."
        },
        "min_stay": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365,
          "description": "Current minimum-stay requirement for check-in on this date. Used only as a fallback when the gap-day rule tests whether a gap can be booked, and only when no custom minimum-stay rule is configured."
        },
        "reservation_id": {
          "type": "string",
          "minLength": 1,
          "description": "Stable identifier linking consecutive nights of the same reservation. Allowed only when status is `reserved` or `blocked`; rejected on `available` rows. Must not be blank (whitespace-only values are rejected). Accepted and validated but not used by any pricing rule in this release."
        },
        "check_in_allowed": {
          "type": "boolean",
          "description": "Whether a reservation may begin on this date. Used only when the gap-day rule tests whether a gap can be booked. Defaults to true when omitted or when the row is absent."
        },
        "check_out_allowed": {
          "type": "boolean",
          "description": "Whether a reservation may depart on this date. Used only when the gap-day rule tests whether a gap can be booked. Defaults to true when omitted or when the row is absent."
        }
      }
    },
    "CalendarPricingCheckInOutRule": {
      "type": "object",
      "title": "Check-in/out rule",
      "required": [
        "mode"
      ],
      "description": "Returns permitted arrival/departure weekdays and informs gap eligibility. Your booking integration must support and enforce these restrictions. Weekdays use the property's timezone. Accepts only `disabled` and `custom`.",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingCustomOnlyMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingCheckInOutSettings"
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesCheckInOut"
        }
      }
    },
    "CalendarPricingCheckInOutSettings": {
      "type": "object",
      "title": "Check-in/out settings",
      "required": [
        "allowed_check_in_days",
        "allowed_check_out_days"
      ],
      "properties": {
        "allowed_check_in_days": {
          "$ref": "#/$defs/CalendarPricingWeekdayList"
        },
        "allowed_check_out_days": {
          "$ref": "#/$defs/CalendarPricingWeekdayList"
        }
      }
    },
    "CalendarPricingCustomOnlyMode": {
      "type": "string",
      "enum": [
        "disabled",
        "custom"
      ],
      "x-enumDescriptions": {
        "disabled": "The rule is off and contributes nothing.",
        "custom": "Requires the rule's complete `settings`. Scoped `overrides` and (for adjacent day) `apply_on_weekends` are accepted only in this mode."
      },
      "description": "Case-sensitive lowercase mode. `disabled` applies nothing; `custom` requires the rule's complete `settings`."
    },
    "CalendarPricingDate": {
      "type": "string",
      "format": "date",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "Property-local Gregorian calendar date in locale-independent `YYYY-MM-DD` form. Must be a real calendar date; formats such as `MM/DD/YYYY` and invalid dates such as `2026-02-29` are rejected."
    },
    "CalendarPricingDateRangeAdjacentDay": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings",
            "apply_on_weekends"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingAdjacentDaySettings"
            },
            "apply_on_weekends": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeBase": {
      "type": "object",
      "required": [
        "start_date",
        "end_date"
      ],
      "description": "Absolute inclusive date range. `start_date` must be on or before `end_date`. Date ranges within one rule must not overlap (sharing one day is an overlap). Ranges do not repeat yearly.",
      "properties": {
        "start_date": {
          "$ref": "#/$defs/CalendarPricingDate"
        },
        "end_date": {
          "$ref": "#/$defs/CalendarPricingDate"
        }
      }
    },
    "CalendarPricingDateRangeCheckInOut": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingCheckInOutSettings"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeDayOfWeek": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingDayOfWeekSettings"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeFarFuture": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingFarFutureSettings"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeGapDay": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings",
            "apply_on_weekends"
          ],
          "properties": {
            "settings": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/CalendarPricingGapDaySettingsRow"
              }
            },
            "apply_on_weekends": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeLastMinute": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingLastMinuteSettings"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeLengthOfStay": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/CalendarPricingLengthOfStaySettingsRow"
              }
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeMinStay": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingMinStaySettings"
            }
          }
        }
      ]
    },
    "CalendarPricingDateRangeOccupancyPacing": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingDateRangeBase"
        },
        {
          "type": "object",
          "required": [
            "settings"
          ],
          "properties": {
            "settings": {
              "$ref": "#/$defs/CalendarPricingOccupancyPacingSettings"
            }
          }
        }
      ]
    },
    "CalendarPricingDayOfWeekRule": {
      "type": "object",
      "title": "Day of Week rule",
      "required": [
        "mode"
      ],
      "description": "Adds a custom weekday percentage after model effects and the automatic-rule\nadjustments. Custom mode requires all seven weekdays.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingCustomOnlyMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingDayOfWeekSettings"
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesDayOfWeek"
        }
      }
    },
    "CalendarPricingDayOfWeekSettings": {
      "type": "object",
      "title": "Day of Week settings",
      "required": [
        "adjustment_percent"
      ],
      "properties": {
        "adjustment_percent": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "monday",
            "tuesday",
            "wednesday",
            "thursday",
            "friday",
            "saturday",
            "sunday"
          ],
          "properties": {
            "monday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            },
            "tuesday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            },
            "wednesday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            },
            "thursday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            },
            "friday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            },
            "saturday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            },
            "sunday": {
              "type": "number",
              "minimum": -75,
              "maximum": 500,
              "description": "Signed percentage. At most two decimal places."
            }
          },
          "description": "Signed percentage adjustment for each property-local weekday. All seven lowercase weekday keys are required. Each value is from -75 through 500 with at most two decimal places."
        }
      }
    },
    "CalendarPricingFarFutureRule": {
      "type": "object",
      "title": "Far Future rule",
      "required": [
        "mode"
      ],
      "description": "Adjusts eligible nights far from arrival. Use a preset without settings,\nor custom mode with complete settings and optional scoped overrides.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingProfileMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingFarFutureSettings"
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesFarFuture"
        }
      }
    },
    "CalendarPricingFarFutureSettings": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingTimedAdjustmentSettings"
        },
        {
          "type": "object",
          "properties": {
            "start_days": {
              "type": "integer",
              "minimum": 60,
              "maximum": 728,
              "description": "Days out at which the window opens, at least 60. The window runs from `start_days` to the end of the available calendar, up to two years out."
            },
            "end_days": {
              "type": "integer",
              "minimum": 61,
              "maximum": 729,
              "default": 365,
              "description": "Days out at which a `gradual` ramp reaches the full percentage. Must be after `start_days`; defaults to 365, one year out. Nights further out keep the full percentage."
            }
          }
        }
      ]
    },
    "CalendarPricingGapDayRule": {
      "type": "object",
      "title": "Gap Day rule",
      "required": [
        "mode"
      ],
      "description": "Adjusts available nights bounded by known reserved or blocked dates, only\nwhen the gap is bookable under the effective stay restrictions. Custom stay\nrules take precedence over calendar-row restrictions, then defaults.\nGap length counts remaining nights from today onward. Each adjusted night\nmust fit at least one allowed stay within that gap.\nCustom mode requires settings and apply_on_weekends; presets include weekends.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingProfileMode"
        },
        "settings": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingGapDaySettingsRow"
          },
          "description": "Gap-length bands. Required (and accepted) only with `mode: custom`."
        },
        "apply_on_weekends": {
          "type": "boolean",
          "description": "Whether Friday and Saturday stay dates may receive this adjustment. Required in custom mode; rejected in all other modes. Named presets always apply on weekends."
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesGapDay"
        }
      }
    },
    "CalendarPricingGapDaySettingsRow": {
      "type": "object",
      "title": "Gap-length adjustment",
      "required": [
        "min_days",
        "max_days",
        "adjustment_percent"
      ],
      "properties": {
        "min_days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30,
          "description": "Shortest covered gap in nights, inclusive."
        },
        "max_days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 30,
          "description": "Longest covered gap in nights, inclusive. Must be greater than or equal to `min_days`."
        },
        "adjustment_percent": {
          "type": "number",
          "minimum": -100,
          "exclusiveMinimum": true,
          "description": "Signed percentage for stay dates inside this gap-length band. Greater than -100 with at most two decimal places."
        }
      },
      "description": "Gap-length bands must be ascending by min_days and non-overlapping.\nUncovered lengths receive no adjustment. Inclusive endpoints cannot be shared.\n"
    },
    "CalendarPricingLastMinuteRule": {
      "type": "object",
      "title": "Last Minute rule",
      "required": [
        "mode"
      ],
      "description": "Adjusts eligible nights close to arrival. Use a preset without settings,\nor custom mode with complete settings and optional scoped overrides.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingProfileMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingLastMinuteSettings"
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesLastMinute"
        }
      }
    },
    "CalendarPricingLastMinuteSettings": {
      "allOf": [
        {
          "$ref": "#/$defs/CalendarPricingTimedAdjustmentSettings"
        },
        {
          "type": "object",
          "properties": {
            "start_days": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "description": "Days out at which the window opens, from 1 through 90, inclusive. The window covers 0 through `start_days` days out."
            },
            "end_days": {
              "type": "integer",
              "minimum": 0,
              "maximum": 89,
              "default": 0,
              "description": "Days before arrival at which a `gradual` ramp reaches the full percentage, from 0 (arrival day) through `start_days - 1`. Nights closer than this keep the full percentage. Defaults to 0."
            }
          }
        }
      ]
    },
    "CalendarPricingLeadTimeRange": {
      "type": "object",
      "title": "Lead-time range",
      "required": [
        "min_days",
        "max_days"
      ],
      "properties": {
        "min_days": {
          "type": "integer",
          "minimum": 0,
          "maximum": 365
        },
        "max_days": {
          "type": "integer",
          "minimum": 0,
          "maximum": 365
        }
      },
      "description": "Inclusive lead-time range in days. `min_days` must be less than or equal to `max_days`."
    },
    "CalendarPricingLengthOfStayRule": {
      "type": "object",
      "title": "Length of Stay rule",
      "required": [
        "mode"
      ],
      "description": "Longer-stay discount tiers, accepted and validated but currently unused:\nthey change no price, explanation line, or output field.\nThis endpoint returns nightly recommendations, not a guest-specific stay\nquote. Configure these discounts separately in a supporting booking\nintegration that evaluates the guest's selected dates and stay length.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingCustomOnlyMode"
        },
        "settings": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingLengthOfStaySettingsRow"
          }
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesLengthOfStay"
        }
      }
    },
    "CalendarPricingLengthOfStaySettingsRow": {
      "type": "object",
      "title": "Length-of-stay discount",
      "required": [
        "min_nights",
        "adjustment_percent"
      ],
      "properties": {
        "min_nights": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365,
          "description": "Minimum stay length that qualifies for this row."
        },
        "adjustment_percent": {
          "type": "number",
          "minimum": -75,
          "maximum": 0,
          "description": "Discount percentage from 0 through -75; positive values are rejected. At most two decimal places."
        }
      },
      "description": "Rows must use strictly increasing `min_nights`."
    },
    "CalendarPricingLocation": {
      "type": "object",
      "title": "Property location",
      "description": "Exact property coordinates. AirROI uses them to resolve local pricing curves and the property's local timezone.",
      "required": [
        "latitude",
        "longitude"
      ],
      "properties": {
        "latitude": {
          "type": "number",
          "format": "double",
          "minimum": -90,
          "maximum": 90,
          "description": "Latitude in decimal degrees. Must be a finite number from -90 through 90 inclusive."
        },
        "longitude": {
          "type": "number",
          "format": "double",
          "minimum": -180,
          "maximum": 180,
          "description": "Longitude in decimal degrees. Must be a finite number from -180 through 180 inclusive."
        }
      }
    },
    "CalendarPricingMinStayRule": {
      "type": "object",
      "title": "Minimum Stay rule",
      "required": [
        "mode"
      ],
      "description": "Returns the minimum nights required for check-in on each applicable stay date and informs gap eligibility. Your booking integration must support and enforce the restriction. Accepts only `disabled` and `custom`.",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingCustomOnlyMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingMinStaySettings"
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesMinStay"
        }
      }
    },
    "CalendarPricingMinStaySettings": {
      "type": "object",
      "title": "Minimum Stay settings",
      "required": [
        "min_nights"
      ],
      "properties": {
        "min_nights": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365,
          "description": "Required stay length in nights."
        }
      }
    },
    "CalendarPricingMonthScopeAdjacentDay": {
      "type": "object",
      "required": [
        "settings",
        "apply_on_weekends"
      ],
      "description": "Complete replacement settings for this month. `apply_on_weekends` is required and does not inherit from the top-level adjacent-day rule.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingAdjacentDaySettings"
        },
        "apply_on_weekends": {
          "type": "boolean"
        }
      }
    },
    "CalendarPricingMonthScopeCheckInOut": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingCheckInOutSettings"
        }
      }
    },
    "CalendarPricingMonthScopeDayOfWeek": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month. No partial inheritance from the top-level settings.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingDayOfWeekSettings"
        }
      }
    },
    "CalendarPricingMonthScopeFarFuture": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingFarFutureSettings"
        }
      }
    },
    "CalendarPricingMonthScopeGapDay": {
      "type": "object",
      "required": [
        "settings",
        "apply_on_weekends"
      ],
      "description": "Complete replacement settings for this month. `apply_on_weekends` is required and does not inherit from the top-level gap-day rule.",
      "properties": {
        "settings": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingGapDaySettingsRow"
          }
        },
        "apply_on_weekends": {
          "type": "boolean"
        }
      }
    },
    "CalendarPricingMonthScopeLastMinute": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingLastMinuteSettings"
        }
      }
    },
    "CalendarPricingMonthScopeLengthOfStay": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month.",
      "properties": {
        "settings": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingLengthOfStaySettingsRow"
          }
        }
      }
    },
    "CalendarPricingMonthScopeMinStay": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingMinStaySettings"
        }
      }
    },
    "CalendarPricingMonthScopeOccupancyPacing": {
      "type": "object",
      "required": [
        "settings"
      ],
      "description": "Complete replacement settings for this month.",
      "properties": {
        "settings": {
          "$ref": "#/$defs/CalendarPricingOccupancyPacingSettings"
        }
      }
    },
    "CalendarPricingMonthsAdjacentDay": {
      "type": "object",
      "title": "Monthly Adjacent Day overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeAdjacentDay"
        }
      }
    },
    "CalendarPricingMonthsCheckInOut": {
      "type": "object",
      "title": "Monthly Check-in/out overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeCheckInOut"
        }
      }
    },
    "CalendarPricingMonthsDayOfWeek": {
      "type": "object",
      "title": "Monthly Day of Week overrides",
      "description": "Lowercase English month names as keys. Each scope completely replaces the top-level settings for stay dates in that month every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeDayOfWeek"
        }
      }
    },
    "CalendarPricingMonthsFarFuture": {
      "type": "object",
      "title": "Monthly Far Future overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeFarFuture"
        }
      }
    },
    "CalendarPricingMonthsGapDay": {
      "type": "object",
      "title": "Monthly Gap Day overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeGapDay"
        }
      }
    },
    "CalendarPricingMonthsLastMinute": {
      "type": "object",
      "title": "Monthly Last Minute overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLastMinute"
        }
      }
    },
    "CalendarPricingMonthsLengthOfStay": {
      "type": "object",
      "title": "Monthly Length of Stay overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeLengthOfStay"
        }
      }
    },
    "CalendarPricingMonthsMinStay": {
      "type": "object",
      "title": "Monthly Minimum Stay overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeMinStay"
        }
      }
    },
    "CalendarPricingMonthsOccupancyPacing": {
      "type": "object",
      "title": "Monthly Occupancy Pacing overrides",
      "description": "Lowercase English month names as keys, recurring every year.",
      "minProperties": 1,
      "maxProperties": 12,
      "additionalProperties": false,
      "properties": {
        "january": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "february": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "march": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "april": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "may": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "june": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "july": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "august": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "september": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "october": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "november": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        },
        "december": {
          "$ref": "#/$defs/CalendarPricingMonthScopeOccupancyPacing"
        }
      }
    },
    "CalendarPricingOccupancyPacingRule": {
      "type": "object",
      "title": "Occupancy Pacing rule",
      "required": [
        "mode"
      ],
      "description": "Adjusts eligible available nights using an occupancy/lead-time matrix.\nCustom mode requires complete settings. Every lead-time window that an\navailable night falls into needs a calendar row for each of its dates;\na window with missing rows is skipped with an INCOMPLETE_CALENDAR warning\nand its nights are priced without the rule. Dates outside every lead-time\ncolumn receive no adjustment or warning.\n",
      "properties": {
        "mode": {
          "$ref": "#/$defs/CalendarPricingCustomOnlyMode"
        },
        "settings": {
          "$ref": "#/$defs/CalendarPricingOccupancyPacingSettings"
        },
        "overrides": {
          "$ref": "#/$defs/CalendarPricingOverridesOccupancyPacing"
        }
      }
    },
    "CalendarPricingOccupancyPacingSettings": {
      "type": "object",
      "title": "Occupancy Pacing settings",
      "description": "Occupancy is reserved / (reserved + available), rounded to a whole percentage;\nblocked dates are excluded. Every date in the matching lead-time\nrange must be supplied, with at least one reserved or available date.\nSelect the matrix row by occupancy and column by lead time. Unmatched bands\napply no adjustment.\n",
      "required": [
        "lead_time_ranges",
        "occupancy_ranges",
        "adjustment_percent"
      ],
      "properties": {
        "lead_time_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingLeadTimeRange"
          },
          "description": "Matrix columns, ordered from shorter to longer lead time. Ranges must be ascending by `min_days` and non-overlapping. Need not cover 0 through 365."
        },
        "occupancy_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingOccupancyRange"
          },
          "description": "Matrix rows, ordered from lower to higher booked occupancy. Ranges must be ascending by `min_percent` and non-overlapping. Need not cover 0 through 100."
        },
        "adjustment_percent": {
          "type": "array",
          "minItems": 1,
          "description": "A grid of percentages: one inner list per occupancy band, in the order of `occupancy_ranges`; inside each list, one value per days-out band, in the order of `lead_time_ranges`. Each value is a signed percentage greater than -100 with at most two decimal places.",
          "items": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "number",
              "minimum": -100,
              "exclusiveMinimum": true
            }
          }
        }
      }
    },
    "CalendarPricingOccupancyRange": {
      "type": "object",
      "title": "Occupancy range",
      "required": [
        "min_percent",
        "max_percent"
      ],
      "properties": {
        "min_percent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "max_percent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        }
      },
      "description": "Inclusive booked-occupancy percentage range. `min_percent` must be less than or equal to `max_percent`."
    },
    "CalendarPricingOverridesAdjacentDay": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsAdjacentDay"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeAdjacentDay"
          }
        }
      }
    },
    "CalendarPricingOverridesCheckInOut": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsCheckInOut"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeCheckInOut"
          }
        }
      }
    },
    "CalendarPricingOverridesDayOfWeek": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsDayOfWeek"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeDayOfWeek"
          }
        }
      }
    },
    "CalendarPricingOverridesFarFuture": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsFarFuture"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeFarFuture"
          }
        }
      }
    },
    "CalendarPricingOverridesGapDay": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsGapDay"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeGapDay"
          }
        }
      }
    },
    "CalendarPricingOverridesLastMinute": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsLastMinute"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeLastMinute"
          }
        }
      }
    },
    "CalendarPricingOverridesLengthOfStay": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsLengthOfStay"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeLengthOfStay"
          }
        }
      }
    },
    "CalendarPricingOverridesMinStay": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsMinStay"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeMinStay"
          }
        }
      }
    },
    "CalendarPricingOverridesOccupancyPacing": {
      "type": "object",
      "description": "Custom-mode overrides; include months, date_ranges, or both.\nOne complete scope wins: date range, then recurring month, then default.\nSettings are replaced, not merged.\n",
      "properties": {
        "months": {
          "$ref": "#/$defs/CalendarPricingMonthsOccupancyPacing"
        },
        "date_ranges": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CalendarPricingDateRangeOccupancyPacing"
          }
        }
      }
    },
    "CalendarPricingPriceLimits": {
      "type": "object",
      "title": "Price limits",
      "description": "Nightly floor and ceiling, applied after percentage adjustments.\nEach omitted or null bound defaults independently: minimum to 70% of\nbase_price, maximum to 1000% (10 times) base_price, rounded HALF_UP\nto the currency's precision. An explicit bound replaces only that default.\nThe effective minimum must not exceed the effective maximum; otherwise\nHTTP 422 returns INVALID_PRICE_LIMITS in the error details.\nFixed price overrides bypass both default and explicit limits.\n",
      "properties": {
        "min_price": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "minimum": 0,
          "exclusiveMinimum": true,
          "description": "Lowest allowed nightly recommendation in `currency`. Omitted or null: 70% of base_price. An explicit value must be positive with valid minor-unit precision."
        },
        "max_price": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "minimum": 0,
          "exclusiveMinimum": true,
          "description": "Highest allowed nightly recommendation in `currency`. Omitted or null: 1000% (10 times) base_price. An explicit value must be positive with valid minor-unit precision. Must be at least the effective minimum, including its default."
        }
      }
    },
    "CalendarPricingPriceOverride": {
      "type": "object",
      "title": "Price override",
      "required": [
        "start_date",
        "end_date",
        "adjustment_type",
        "adjustment_amount"
      ],
      "description": "Price instruction for an inclusive, absolute date range.\nPercentage overrides apply before price limits; fixed overrides replace the\nprice afterward and bypass both default and explicit limits. Ranges must not overlap or share a day.\n",
      "properties": {
        "start_date": {
          "$ref": "#/$defs/CalendarPricingDate"
        },
        "end_date": {
          "$ref": "#/$defs/CalendarPricingDate"
        },
        "adjustment_type": {
          "type": "string",
          "enum": [
            "percentage",
            "fixed"
          ],
          "x-enumDescriptions": {
            "percentage": "Multiplies the running price by `(1 + adjustment_amount / 100)` before price limits.",
            "fixed": "Replaces the price with `adjustment_amount` after price limits, bypassing min and max in both directions."
          },
          "description": "How `adjustment_amount` is interpreted. Case-sensitive lowercase."
        },
        "adjustment_amount": {
          "type": "number",
          "description": "For `percentage`: a signed value greater than -100 and at most 500 with at most two decimal places. For `fixed`: a positive amount in the request currency with valid ISO minor-unit precision."
        }
      }
    },
    "CalendarPricingProfileMode": {
      "type": "string",
      "enum": [
        "disabled",
        "conservative",
        "balanced",
        "aggressive",
        "custom"
      ],
      "x-enumDescriptions": {
        "disabled": "The rule is off and contributes nothing.",
        "conservative": "Smallest preset. Last minute: 7 days, -8% (power 2.0). Far future: ramps from 0% at 270 days to +5% at 365 days, then holds +5%. Gap day: -4/-2/0% for 1/2/3-night gaps.",
        "balanced": "Middle preset. Last minute: 21 days, -15% (power 1.5). Far future: ramps from 0% at 180 days to +10% at 365 days, then holds +10%. Gap day: -8/-4/-2% for 1/2/3-night gaps.",
        "aggressive": "Largest preset. Last minute: 45 days, -25% (power 1.2). Far future: ramps from 0% at 120 days to +15% at 365 days, then holds +15%. Gap day: -12/-8/-4% for 1/2/3-night gaps.",
        "custom": "Requires the rule's complete `settings`. Scoped `overrides` and (for gap day) `apply_on_weekends` are accepted only in this mode."
      },
      "description": "Case-sensitive lowercase mode. Named presets use complete AirROI defaults; `custom` requires the rule's `settings`."
    },
    "CalendarPricingRules": {
      "type": "object",
      "title": "Pricing rules",
      "description": "Optional adjustments; omitted rules are disabled. Each supplied rule needs\na mode. Only custom mode accepts settings, overrides, or apply_on_weekends.\nEach automatic-rule percentage is rounded HALF_UP to two decimal places before\nuse. The five automatic rules then add their signed percentages against the same\npost-model price, without a combined cap. Custom day_of_week follows; price limits apply later.\n",
      "properties": {
        "day_of_week": {
          "$ref": "#/$defs/CalendarPricingDayOfWeekRule"
        },
        "last_minute": {
          "$ref": "#/$defs/CalendarPricingLastMinuteRule"
        },
        "far_future": {
          "$ref": "#/$defs/CalendarPricingFarFutureRule"
        },
        "gap_day": {
          "$ref": "#/$defs/CalendarPricingGapDayRule"
        },
        "adjacent_day": {
          "$ref": "#/$defs/CalendarPricingAdjacentDayRule"
        },
        "occupancy_pacing": {
          "$ref": "#/$defs/CalendarPricingOccupancyPacingRule"
        }
      }
    },
    "CalendarPricingStayRules": {
      "type": "object",
      "title": "Stay rules",
      "description": "Optional stay restrictions; each rule accepts disabled or custom.\nEnabled minimum-stay and check-in/out rules appear in recommendations and\ninform gap eligibility. To govern actual bookings, these restrictions must\nbe supported and enforced by your channel manager, PMS, or OTA integration;\nAirROI does not publish or enforce them on booking channels.\nlength_of_stay is accepted but not applied. Configure longer-stay discounts\nseparately in a supporting booking integration, which can evaluate the\nguest's selected dates and stay length.\n",
      "properties": {
        "min_stay": {
          "$ref": "#/$defs/CalendarPricingMinStayRule"
        },
        "length_of_stay": {
          "$ref": "#/$defs/CalendarPricingLengthOfStayRule"
        },
        "check_in_out": {
          "$ref": "#/$defs/CalendarPricingCheckInOutRule"
        }
      }
    },
    "CalendarPricingTimedAdjustmentSettings": {
      "type": "object",
      "title": "Lead-time adjustment settings",
      "required": [
        "start_days",
        "adjustment_percent",
        "adjustment_type"
      ],
      "properties": {
        "start_days": {
          "type": "integer",
          "description": "Days out (stay date minus the property's local today) at which the rule's window opens, inclusive. For `flat`, the full percentage applies on this day. For `gradual`, the adjustment is exactly zero on this day and ramps toward the maximum."
        },
        "adjustment_percent": {
          "type": "number",
          "minimum": -100,
          "exclusiveMinimum": true,
          "description": "Signed percentage: the full flat adjustment, or the strongest gradual adjustment. Greater than -100 with at most two decimal places. Negative values discount; positive values increase."
        },
        "adjustment_type": {
          "type": "string",
          "enum": [
            "flat",
            "gradual"
          ],
          "x-enumDescriptions": {
            "flat": "Applies the full `adjustment_percent` on every day in the window, including the `start_days` boundary.",
            "gradual": "Zero at `start_days`, the full `adjustment_percent` at `end_days`, held from there on. Custom gradual is linear. Last-minute presets use a convex power curve (exponent 2.0 conservative, 1.5 balanced, 1.2 aggressive); far-future presets are linear."
          },
          "description": "How `adjustment_percent` is applied across the window. Case-sensitive lowercase."
        },
        "end_days": {
          "type": "integer",
          "description": "Where a `gradual` ramp reaches the full `adjustment_percent`; the full value holds from there on (toward arrival for last minute, further out for far future). Ignored for `flat`. See each rule's settings for the range and default."
        }
      }
    },
    "CalendarPricingWeekdayList": {
      "type": "array",
      "minItems": 1,
      "maxItems": 7,
      "uniqueItems": true,
      "description": "Unique property-local weekdays as lowercase English names. At least one day is required. Duplicates are rejected.",
      "items": {
        "type": "string",
        "enum": [
          "monday",
          "tuesday",
          "wednesday",
          "thursday",
          "friday",
          "saturday",
          "sunday"
        ]
      }
    },
    "PriceRecommendationCurrency": {
      "type": "string",
      "title": "Currency",
      "description": "Supported uppercase ISO 4217 currency code for every monetary input and output. No currency conversion is performed. Lowercase codes are rejected; unsupported codes return UNSUPPORTED_CURRENCY.",
      "minLength": 3,
      "maxLength": 3,
      "pattern": "^[A-Z]{3}$"
    }
  }
}