{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-reservation-schema.json",
  "title": "Reservation",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-reservations-api-openapi.yml#/components/schemas/Reservation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "guestName": {
      "type": "string"
    },
    "guestEmail": {
      "type": [
        "string",
        "null"
      ]
    },
    "propertyId": {
      "type": "string"
    },
    "checkIn": {
      "type": "string",
      "format": "date-time"
    },
    "checkOut": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "$ref": "#/$defs/ReservationStatus"
    },
    "amount": {
      "type": "number"
    },
    "channel": {
      "type": "string"
    },
    "confirmationCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "complianceStatus": {
      "type": "string"
    },
    "nights": {
      "type": "integer"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "ReservationStatus": {
      "type": "string",
      "enum": [
        "Pending",
        "Confirmed",
        "Checked In",
        "Checked Out",
        "Cancelled"
      ]
    }
  }
}