{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quub-rent/json-schema/quub-rent-hotel-result-schema.json",
  "title": "HotelResult",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quub-rent-openapi.json#/components/schemas/HotelResult",
  "type": "object",
  "properties": {
    "hotel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "stars": {
          "type": [
            "number",
            "null"
          ]
        },
        "rating": {
          "type": [
            "number",
            "null"
          ]
        },
        "review_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "address": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "lat": {
          "type": [
            "number",
            "null"
          ]
        },
        "lng": {
          "type": [
            "number",
            "null"
          ]
        },
        "checkin_from": {
          "type": [
            "string",
            "null"
          ]
        },
        "checkout_by": {
          "type": [
            "string",
            "null"
          ]
        },
        "parking": {
          "type": [
            "string",
            "null"
          ]
        },
        "photos": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "description": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "important_information": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "facilities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "hotel_url": {
          "type": "string"
        }
      }
    },
    "stay": {
      "$ref": "#/$defs/Stay"
    },
    "rates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Rate"
      }
    },
    "result": {
      "type": "string",
      "enum": [
        "ok",
        "no_availability",
        "supplier_error"
      ]
    },
    "rates_error": {
      "type": "string"
    },
    "retryable": {
      "type": "boolean"
    },
    "retry_after_seconds": {
      "type": "integer"
    },
    "offers_valid_until": {
      "type": "string",
      "format": "date-time"
    },
    "priced_for": {
      "type": "string"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Rate": {
      "type": "object",
      "properties": {
        "offer_id": {
          "type": "string"
        },
        "room": {
          "type": "string"
        },
        "board": {
          "type": "string"
        },
        "breakfast": {
          "type": "boolean"
        },
        "refundable": {
          "type": "boolean"
        },
        "free_cancellation_until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "cancellation_summary": {
          "type": "string"
        },
        "max_occupancy": {
          "type": [
            "integer",
            "null"
          ]
        },
        "total": {
          "type": "number",
          "description": "A decimal amount in currency, two decimals at most."
        },
        "per_night": {
          "type": "number",
          "description": "A decimal amount in currency, two decimals at most."
        },
        "currency": {
          "type": "string"
        },
        "taxes_included": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tax"
          }
        },
        "taxes_at_property": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tax"
          }
        },
        "due_at_property_total": {
          "type": [
            "number",
            "null"
          ]
        },
        "book_url": {
          "type": "string"
        }
      }
    },
    "Stay": {
      "type": "object",
      "properties": {
        "checkin": {
          "type": "string",
          "format": "date"
        },
        "checkout": {
          "type": "string",
          "format": "date"
        },
        "nights": {
          "type": "integer"
        },
        "adults": {
          "type": "integer"
        },
        "children": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "currency": {
          "type": "string"
        },
        "nationality": {
          "type": "string"
        }
      }
    },
    "Tax": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "A decimal amount in currency, two decimals at most."
        },
        "currency": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}