{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upsellguru/json-schema/upsellguru-basic-reservation-schema.json",
  "title": "BasicReservation",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upsellguru-openapi.yml#/components/schemas/BasicReservation",
  "type": "object",
  "properties": {
    "hotelId": {
      "type": "integer"
    },
    "checkin": {
      "type": "string",
      "format": "date"
    },
    "checkout": {
      "type": "string",
      "format": "date"
    },
    "reference": {
      "type": "string",
      "description": "Reservation identifier in the PMS or other systems acting as source of truth. Can be used to look up a reservation with `GET /reservations`."
    },
    "status": {
      "$ref": "#/$defs/ReservationStatus"
    },
    "roomTypeCode": {
      "type": "string"
    },
    "guestName": {
      "type": "string"
    },
    "guestSurname": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "adults": {
      "type": "integer"
    },
    "children": {
      "type": "integer"
    },
    "language": {
      "$ref": "#/$defs/LanguageCode"
    },
    "ratePlan": {
      "type": "string"
    },
    "marketSegment": {
      "type": "string"
    },
    "reservationSource": {
      "type": "string"
    },
    "includedExtraCodes": {
      "type": "array",
      "description": "List of string codes e.g. BRKF, EARLY, LATE etc or their numeric identifiers",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "hotelId",
    "checkin",
    "checkout",
    "reference",
    "status",
    "roomTypeCode",
    "adults",
    "language"
  ],
  "$defs": {
    "LanguageCode": {
      "type": "string",
      "enum": [
        "EN",
        "ES",
        "IT",
        "FR",
        "PT",
        "DE",
        "GE",
        "JP",
        "CN",
        "RU",
        "NL",
        "TR",
        "PL",
        "ID",
        "BG",
        "CZ",
        "ZH"
      ]
    },
    "ReservationStatus": {
      "type": "string",
      "description": "This enum describes all possible status a reservation can be in UpsellGuru",
      "enum": [
        "TENTATIVE",
        "CONFIRMED",
        "INHOUSE",
        "CHECKEDOUT",
        "CANCELLED",
        "NOSHOW"
      ]
    }
  }
}