{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quub-rent/json-schema/quub-rent-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quub-rent-openapi.json#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "place": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "destination": {
          "type": "string"
        },
        "guide_url": {
          "type": "string"
        },
        "guide_api": {
          "type": "string"
        },
        "place_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "tourist_tax": {
          "type": "object",
          "properties": {
            "value": {
              "type": "string"
            },
            "source": {
              "type": "string"
            }
          }
        }
      }
    },
    "stay": {
      "$ref": "#/$defs/Stay"
    },
    "result": {
      "type": "string",
      "enum": [
        "ok",
        "no_availability",
        "no_match_for_filters",
        "supplier_error"
      ]
    },
    "count": {
      "type": "integer"
    },
    "total_found": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    },
    "has_more": {
      "type": "boolean"
    },
    "sort": {
      "type": "string"
    },
    "hotels": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HotelCard"
      }
    },
    "retryable": {
      "type": "boolean",
      "description": "Present on an empty answer."
    },
    "retry_after_seconds": {
      "type": "integer"
    },
    "note": {
      "type": "string"
    },
    "suggestions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "checked": {
      "type": "string",
      "format": "date-time"
    },
    "offers_valid_until": {
      "type": "string",
      "format": "date-time"
    },
    "priced_for": {
      "type": "string",
      "enum": [
        "public",
        "agent key"
      ]
    },
    "agent_margin_percent": {
      "type": "number"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Cancellation": {
      "type": "object",
      "properties": {
        "refundable": {
          "type": "boolean"
        },
        "free_until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "summary": {
          "type": "string",
          "description": "The terms in plain words."
        }
      }
    },
    "HotelCard": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "hotel",
            "apartment",
            "house"
          ]
        },
        "stars": {
          "type": [
            "number",
            "null"
          ]
        },
        "rating": {
          "type": [
            "number",
            "null"
          ],
          "description": "Guest rating, 0 to 10."
        },
        "review_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "lat": {
          "type": [
            "number",
            "null"
          ]
        },
        "lng": {
          "type": [
            "number",
            "null"
          ]
        },
        "photo": {
          "type": [
            "string",
            "null"
          ]
        },
        "area": {
          "type": "string"
        },
        "distance_km_from_centre": {
          "type": "number"
        },
        "room": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": "object",
          "properties": {
            "total": {
              "type": [
                "number",
                "null"
              ],
              "description": "A decimal amount in currency, two decimals at most."
            },
            "currency": {
              "type": "string"
            },
            "per_night": {
              "type": [
                "number",
                "null"
              ]
            },
            "taxes_included": {
              "type": "boolean"
            },
            "taxes_at_property": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Tax"
              }
            },
            "due_at_property_total": {
              "type": [
                "number",
                "null"
              ],
              "description": "The taxes at the property summed, when they share the currency."
            }
          }
        },
        "board": {
          "type": [
            "string",
            "null"
          ]
        },
        "breakfast": {
          "type": "boolean"
        },
        "refundable": {
          "type": "boolean"
        },
        "free_cancellation_until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "cancellation": {
          "$ref": "#/$defs/Cancellation"
        },
        "offer_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "offer_valid_until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Advisory."
        },
        "hotel_url": {
          "type": "string"
        },
        "book_url": {
          "type": "string"
        },
        "sandbox": {
          "type": "boolean"
        }
      }
    },
    "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"
          ]
        }
      }
    }
  }
}