{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rezdy/json-schema/rezdy-session-create-request-schema.json",
  "title": "SessionCreateRequest",
  "description": "Create session data. Should only contain productCode, startTime and seats, optionally priceOptions, if you wish to override the default product price",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rezdy-supplier-api-openapi.yml#/components/schemas/SessionCreateRequest",
  "required": [
    "productCode",
    "seats"
  ],
  "type": "object",
  "properties": {
    "productCode": {
      "type": "string",
      "description": "Rezdy unique productCode linked to this session"
    },
    "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 ",
      "format": "date-time"
    },
    "endTime": {
      "type": "string",
      "description": "End time of this session. Used to show the customer how long that tour will last",
      "format": "date-time"
    },
    "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 "
    },
    "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"
    },
    "seats": {
      "type": "integer",
      "description": "Total number of seats for this session. Does not change after a booking is made",
      "format": "int32"
    },
    "priceOptions": {
      "type": "array",
      "description": "List of price options attached to this session. Most of the time they'll match the product's price options, but they can be used to change the price of specific dates/times (I.e. high/low season, weekday/weekend, etc.)",
      "items": {
        "$ref": "#/$defs/PriceOption"
      }
    },
    "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."
    }
  },
  "$defs": {
    "PriceOption": {
      "type": "object",
      "properties": {
        "price": {
          "type": "number",
          "description": "Price amount (I.e. \"200.00\")",
          "format": "float"
        },
        "label": {
          "type": "string",
          "description": "Label for this price (I.e. \"Adult\", \"Child\")"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "seatsUsed": {
          "type": "integer",
          "description": "How many seats one quantity of this price willuse. Used for availability calculations. For example 1 quantity of \"Family of 4\" will use 4 seats.",
          "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"
        },
        "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"
        },
        "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."
        }
      },
      "description": "A Price Option belongs to a product or products session. It holds the price details for a specific price type.Products can have one or many price options (I.e. Adult, Child, Family, etc.)"
    }
  }
}