{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/threshold-rentals/json-schema/threshold-rentals-availability-schema.json",
  "title": "Availability",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/threshold-rentals-openapi.json#/components/schemas/Availability",
  "type": "object",
  "properties": {
    "property_id": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "as_of": {
      "type": "string",
      "format": "date-time"
    },
    "days": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "available": {
            "type": "boolean"
          },
          "min_nights": {
            "type": "integer"
          },
          "check_in_allowed": {
            "type": "boolean"
          },
          "check_out_allowed": {
            "type": "boolean"
          },
          "nightly": {
            "$ref": "#/$defs/Money"
          }
        }
      }
    }
  },
  "$defs": {
    "Money": {
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "integer",
          "description": "In cents"
        },
        "currency": {
          "type": "string"
        }
      }
    }
  }
}