{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rentalcal-com/json-schema/rentalcal-com-property-schema.json",
  "title": "Property",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rentalcal-com-openapi.yml#/components/schemas/Property",
  "type": "object",
  "required": [
    "id",
    "name",
    "timezone",
    "minNights",
    "maxGuests",
    "currency",
    "pricing",
    "booking"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "tagline": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "location": {
      "type": [
        "string",
        "null"
      ],
      "description": "As the host describes it, e.g. `Tofino, BC`."
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2."
    },
    "timezone": {
      "type": "string",
      "description": "IANA zone."
    },
    "checkInTime": {
      "type": "string",
      "description": "e.g. `15:00`."
    },
    "checkOutTime": {
      "type": "string"
    },
    "minNights": {
      "type": "integer"
    },
    "checkInDayMinNights": {
      "$ref": "#/$defs/CheckInDayMinNights"
    },
    "maxNights": {
      "type": "integer",
      "description": "The longest stay the quote accepts. The quote refuses a longer one with `max_nights`."
    },
    "maxGuests": {
      "type": "integer"
    },
    "bedrooms": {
      "type": [
        "number",
        "null"
      ]
    },
    "bathrooms": {
      "type": [
        "number",
        "null"
      ]
    },
    "petsAllowed": {
      "type": "boolean"
    },
    "maxPets": {
      "type": [
        "integer",
        "null"
      ],
      "description": "0 when pets are not allowed; null means allowed with no stated cap."
    },
    "infants": {
      "type": [
        "object",
        "null"
      ],
      "description": "Null when the host books babies as children: count them in `guests`. Otherwise children under `freeUnderAge` are infants, sent as `infants`, free and outside `maxGuests`.",
      "required": [
        "freeUnderAge",
        "max"
      ],
      "properties": {
        "freeUnderAge": {
          "type": "integer",
          "description": "Infants are under this age, in years."
        },
        "max": {
          "type": "integer",
          "description": "Infants per booking."
        }
      }
    },
    "amenities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "houseRules": {
      "type": [
        "string",
        "null"
      ]
    },
    "images": {
      "type": "object",
      "properties": {
        "hero": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "gallery": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "cancellationPolicy": {
      "type": [
        "object",
        "null"
      ],
      "description": "How a cancellation is refunded. `summary` is what to tell the guest; `rules` is the same thing as numbers when the policy is simple: cancel at least `daysBeforeCheckIn` days out and `refundPercent` of what was paid is returned.",
      "properties": {
        "summary": {
          "type": "string"
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "daysBeforeCheckIn": {
                "type": "integer"
              },
              "refundPercent": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "paymentSchedule": {
      "type": [
        "object",
        "null"
      ],
      "description": "When the host collects the money. `depositPercent` is due at booking unless `depositDueDaysBeforeArrival` is set; the balance is due `balanceDueDaysBeforeArrival` days before check-in (0 = on arrival). 100 means paid in full at booking.",
      "properties": {
        "depositPercent": {
          "type": "number"
        },
        "depositDueDaysBeforeArrival": {
          "type": "integer"
        },
        "balanceDueDaysBeforeArrival": {
          "type": "integer"
        },
        "summary": {
          "type": "string"
        }
      }
    },
    "damageDepositCents": {
      "type": "integer",
      "description": "Refundable deposit the host requires, on top of the total. 0 when none. The quote says whether it is held at booking. In the smallest unit of the listing's currency (cents for USD/CAD)."
    },
    "faq": {
      "type": "array",
      "description": "The host's own answers to common questions.",
      "items": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          }
        }
      }
    },
    "site": {
      "type": [
        "object",
        "null"
      ],
      "description": "The host's booking site, when published.",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217."
    },
    "pricing": {
      "type": "object",
      "description": "Base rates. Use `getQuote` for a real total: seasonal rates, fees and taxes apply.",
      "properties": {
        "pricePerNight": {
          "type": "integer",
          "description": "Base nightly rate. In the smallest unit of the listing's currency (cents for USD/CAD)."
        },
        "cleaningFee": {
          "type": "integer",
          "description": "Once per stay. In the smallest unit of the listing's currency (cents for USD/CAD)."
        },
        "weekendPricePerNight": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Friday and Saturday nights. In the smallest unit of the listing's currency (cents for USD/CAD)."
        },
        "weeklyDiscountPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "monthlyDiscountPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "petFeeCents": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Once per stay: for each pet, or once for any number of pets, as `petFeeMode` says. In the smallest unit of the listing's currency (cents for USD/CAD)."
        },
        "petFeeMode": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "per_pet",
            "per_stay",
            null
          ],
          "description": "`per_pet`: `petFeeCents` times the number of pets. `per_stay`: `petFeeCents` once when the stay has any pets. Null when there is no pet fee."
        },
        "includedGuests": {
          "type": [
            "integer",
            "null"
          ]
        },
        "extraGuestFeeCents": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Per guest above includedGuests, per night. In the smallest unit of the listing's currency (cents for USD/CAD)."
        }
      }
    },
    "booking": {
      "type": "object",
      "properties": {
        "acceptsRequests": {
          "type": "boolean"
        },
        "maxAdvanceDays": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The booking window: a night more than this many days after today (in the property's timezone) is not open yet. The host's own window, or 730 days (24 months) when they have not set one, so it is no longer null. The quote refuses a later stay with `too_far_ahead`."
        },
        "minAdvanceHours": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Notice the host needs: a check-in whose check-in time is closer than this many hours away is refused with `too_soon`. Null means today is bookable until midnight in the property's timezone. The availability feed's `bookableFrom` is the first check-in open right now."
        },
        "rentalAgreement": {
          "type": [
            "object",
            "null"
          ],
          "description": "When present the guest must read it and the request must carry `agreementAccepted` with this `version`.",
          "properties": {
            "version": {
              "type": "integer"
            },
            "bodyMarkdown": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "$defs": {
    "CheckInDayMinNights": {
      "type": "array",
      "description": "Minimums by the check-in's day of the week, 0 = Sunday. Overrides `minNights`; a seasonal rule still wins on its dates.",
      "items": {
        "type": "object",
        "required": [
          "weekday",
          "minNights"
        ],
        "properties": {
          "weekday": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "minNights": {
            "type": "integer"
          }
        }
      }
    }
  }
}