{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upsellguru/json-schema/upsellguru-upgrade-bid-schema.json",
  "title": "UpgradeBid",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upsellguru-openapi.yml#/components/schemas/UpgradeBid",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "touchpoint": {
      "$ref": "#/$defs/Touchpoint"
    },
    "status": {
      "$ref": "#/$defs/UpgradeBidStatus"
    },
    "fromRoomType": {
      "$ref": "#/$defs/RoomTypeLite"
    },
    "toRoomType": {
      "$ref": "#/$defs/RoomTypeLite"
    },
    "amount": {
      "$ref": "#/$defs/Money"
    },
    "strength": {
      "type": "integer",
      "minimum": 0,
      "maximum": 4
    },
    "reservation": {
      "$ref": "#/$defs/ReservationLite"
    },
    "deniedReason": {
      "$ref": "#/$defs/UpgradeBidDeniedReason"
    }
  },
  "$defs": {
    "Money": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "format": "float"
        },
        "currency": {
          "type": "string"
        }
      },
      "required": [
        "amount",
        "currency"
      ]
    },
    "ReservationLite": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "format": "uuid"
        },
        "status": {
          "$ref": "#/$defs/ReservationStatus"
        },
        "roomTypeCode": {
          "type": "string"
        },
        "bookedRoomTypeCode": {
          "type": "string"
        },
        "checkin": {
          "type": "string",
          "format": "date"
        },
        "checkout": {
          "type": "string",
          "format": "date"
        },
        "reference": {
          "type": "string"
        },
        "ratePlan": {
          "type": "string"
        },
        "marketSegment": {
          "type": "string"
        },
        "reservationSource": {
          "type": "string"
        }
      }
    },
    "ReservationStatus": {
      "type": "string",
      "description": "This enum describes all possible status a reservation can be in UpsellGuru",
      "enum": [
        "TENTATIVE",
        "CONFIRMED",
        "INHOUSE",
        "CHECKEDOUT",
        "CANCELLED",
        "NOSHOW"
      ]
    },
    "RoomTypeLite": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "code": {
          "type": "string"
        }
      }
    },
    "Touchpoint": {
      "type": "string",
      "enum": [
        "AT_RESERVATION",
        "RESERVATION_CONFIRMATION",
        "PRE_ARRIVAL_UPSELLING",
        "PRE_ARRIVAL_UPSELLING_REMINDER",
        "ALTERNATIVE_UPGRADE",
        "GUEST_RETARGETING",
        "REGISTRATION_CARD",
        "FRONT_DESK",
        "SPA",
        "F_AND_B",
        "INHOUSE_EXTRAS",
        "HOTEL_DIRECTORY"
      ]
    },
    "UpgradeBidDeniedReason": {
      "type": [
        "string",
        "null"
      ],
      "description": "This enum describes all possible reasons that an upgrade bid can be denied in UpsellGuru",
      "enum": [
        "LIMITED_ROOM_TYPE_AVAILABILITY",
        "NO_ROOM_TYPE_AVAILABILITY",
        "OFFER_TOO_WEAK",
        "GUEST_CANT_BE_UPGRADED",
        "PAYMENT_NOT_RECEIVED"
      ]
    },
    "UpgradeBidStatus": {
      "type": "string",
      "description": "This enum describes all possible status an upgrade bid can be in UpsellGuru",
      "enum": [
        "ACCEPTED",
        "CANCELLED",
        "EXPIRED",
        "PENDING",
        "REJECTED"
      ]
    }
  }
}