{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rezdy/json-schema/rezdy-real-time-availability-update-request-schema.json",
  "title": "RealTimeAvailabilityUpdateRequest",
  "description": "Availability real time update request",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rezdy-rezdyconnect-api-openapi.yml#/components/schemas/RealTimeAvailabilityUpdateRequest",
  "required": [
    "sessions"
  ],
  "type": "object",
  "properties": {
    "externalProductCode": {
      "type": "string"
    },
    "productCode": {
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "fromLocal": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "toLocal": {
      "type": "string"
    },
    "sessions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AvailabilityResponseSessions"
      }
    }
  },
  "$defs": {
    "AvailabilityResponsePriceOptions": {
      "required": [
        "label",
        "price"
      ],
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Label for this price (I.e. \"Adult\", \"Child\").  Note: to use a standard price options label as `Everyone` in Rezdy UI, you will need to specify label as 'Quantity'."
        },
        "maxQuantity": {
          "type": "integer",
          "description": "Max booking quantity for the product price option. Can be specified, if the price option is fixed or a grouptype. For a successful booking of the product, the number of participants for this price option have to be lesser or equal than this value.",
          "format": "int32"
        },
        "minQuantity": {
          "type": "integer",
          "description": "Min booking quantity for the product price option. Can be specified, if the price option is fixed or a group type. For a successful booking of the product, the number of participants for this price option have to be greater or equal than this value.",
          "format": "int32"
        },
        "price": {
          "type": "number",
          "description": "Price amount (I.e. \"200.00\")",
          "format": "float"
        },
        "priceGroupType": {
          "type": "string",
          "description": "If this price is for a group, is the price for the whole group (TOTAL) or per quantity (EACH)",
          "enum": [
            "EACH",
            "TOTAL"
          ]
        },
        "productCode": {
          "type": "string",
          "description": "Product code to which the price options belongs to. Since Rezdy introduced shared availability option for products, the product sessions can contain price overrides for all of the products which share the sessions, therefore it is necessary to filer only the price options matching the chosen product code on the client side, when processing /availability service responses."
        },
        "seatsUsed": {
          "type": "integer",
          "description": "How many seats one quantity of this price will use. Used for availability calculations. For example 1 quantity of \"Family of 4\" will use 4 seats.",
          "format": "int32"
        }
      },
      "description": "A Price Option belongs to a product or products sessions. It holds price details for a specific price type. Products can have one or many price options (I.e. Adult, Child, Family, etc.)"
    },
    "AvailabilityResponseSessions": {
      "required": [
        "seatsAvailable"
      ],
      "type": "object",
      "properties": {
        "allDay": {
          "type": "boolean",
          "description": "If true, this session lasts all day and no time should be shown to customers. Technically the session will be from midnight to midnight."
        },
        "endTime": {
          "type": "string",
          "description": "End time of this session. Used to show the customer how long that tour will last"
        },
        "endTimeLocal": {
          "type": "string",
          "description": "End time of this session in supplier's local timezone. Used to show the customer how long that tour will last"
        },
        "priceOptions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AvailabilityResponsePriceOptions"
          }
        },
        "seats": {
          "type": "integer",
          "description": "Total number of seats for this session. Does not change after a booking is made",
          "format": "int32"
        },
        "seatsAvailable": {
          "type": "integer",
          "description": "Current availability for this session.",
          "format": "int32"
        },
        "startTime": {
          "type": "string",
          "description": "Start Time of this session. This time should be used when showing customers the booking date/time. It should be sent in BookingItem.startTime when making new bookings"
        },
        "startTimeLocal": {
          "type": "string",
          "description": "Start Time of this session in supplier's local timezone. This time should be used when showing customers the booking date/time. It should be sent in BookingItem.startTimeLocal when making new bookings"
        },
        "lastUpdated": {
          "type": "string",
          "description": "The date and time when this session data was last updated. The timestamp is in ISO-8601 extended offset date-time format. For example, '2011-12-03T10:15:30+01:00'"
        },
        "cutoffWindowDuration": {
          "type": "integer",
          "description": "Cut off time for this session.",
          "format": "int32"
        },
        "cutoffUnit": {
          "type": "string",
          "description": "Cut off time unit for this session. For example, minutes, hours, days, weeks.",
          "enum": [
            "MINUTES",
            "HOURS",
            "DAYS"
          ]
        },
        "minQuantity": {
          "type": "integer",
          "description": "Min quantity of the product for this session. For example, 1, 2.",
          "format": "int32"
        },
        "maxQuantity": {
          "type": "integer",
          "description": "Max quantity of the product for this session. For example, 2, 5.",
          "format": "int32"
        }
      }
    }
  }
}