{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rezdy/json-schema/rezdy-product-update-request-schema.json",
  "title": "ProductUpdateRequest",
  "description": "updated product",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rezdy-supplier-api-openapi.yml#/components/schemas/ProductUpdateRequest",
  "required": [
    "bookingFields",
    "confirmMode",
    "description",
    "shortDescription"
  ],
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Product name "
    },
    "shortDescription": {
      "type": "string",
      "description": "Product description is between 15 and 240 characters."
    },
    "description": {
      "type": "string",
      "description": "Long product description, is between 100 and 15000 characters."
    },
    "advertisedPrice": {
      "type": "number",
      "description": "General price indication for this product. It represents a display price only, therefore it does not affect a real booking price, which is calculated based on the price options.",
      "format": "float"
    },
    "terms": {
      "type": "string",
      "description": "Specific terms and conditions for this product."
    },
    "confirmMode": {
      "type": "string",
      "description": "Confirmation mode. Determines if bookings are automatically confirmed or it they are pending.",
      "enum": [
        "MANUAL",
        "AUTOCONFIRM",
        "MANUAL_THEN_AUTO",
        "AUTO_THEN_MANUAL"
      ]
    },
    "confirmModeMinParticipants": {
      "type": "integer",
      "description": "If confirmMode is MANUAL_THEN_AUTO or AUTO_THEN_MANUAL, determines the minimum number of participants per booking to trigger the change.",
      "format": "int32"
    },
    "minimumNoticeMinutes": {
      "type": "integer",
      "description": "Minimum book ahead interval for he product in minutes.",
      "format": "int64"
    },
    "durationMinutes": {
      "type": "integer",
      "description": "Duration of the product in minutes.",
      "format": "int64"
    },
    "pickupId": {
      "type": "integer",
      "description": "Pickup ID for this product.",
      "format": "int64"
    },
    "bookingFields": {
      "type": "array",
      "description": "List of booking fields required for this product.",
      "items": {
        "$ref": "#/$defs/BookingFieldCreate"
      }
    },
    "priceOptions": {
      "type": "array",
      "description": "List of price options for this product.",
      "items": {
        "$ref": "#/$defs/PriceOptionCreate"
      }
    },
    "internalCode": {
      "type": "string",
      "description": "Supplier-defined product code, used internally by the supplier."
    },
    "barcodeOutputType": {
      "type": "string",
      "description": "Specifies how to output the barcodes when this product is booked. Valid types are:<br><li>PARTICIPANT: Barcodes will be generated by rezdy for each participant when an booking is created for this product</li><li>ORDER: Barcodes will be generated by rezdy per booking</li>",
      "enum": [
        "PARTICIPANT",
        "ORDER"
      ]
    }
  },
  "$defs": {
    "BookingFieldCreate": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Field label that can be shown to customers"
        },
        "requiredPerParticipant": {
          "type": "boolean",
          "description": "true if this field must be populated for each participant. It should be in Booking.BookingItem.Participant.fields.<p><i>Currently, required fields are not validated when a booking is created though public API, however it's a good practice to support them on in your client code. <b>However, soon the required fields will be enforced for public API booking.</b></i></p>"
        },
        "requiredPerBooking": {
          "type": "boolean",
          "description": "true if this field must be populated once per booking, regardless of the number of items or participants. It should be in Booking.fields<p><i>Currently, required fields are not validated when a booking is created though public API, however it's a good practice to support them on in your client code <b>However, soon the required fields will be enforced for public API booking.</b>.</i></p>"
        },
        "visiblePerParticipant": {
          "type": "boolean",
          "description": "true if this field should be asked for each participant when doing a booking. It should be in Booking.BookingItem.Participant.fields."
        },
        "visiblePerBooking": {
          "type": "boolean",
          "description": "true if this field should be asked once per booking, regardless of the number of items or participants. It should be in Booking.fields"
        },
        "fieldType": {
          "type": "string",
          "description": "Type of a custom booking field. This type does not apply on the Rezdy build-in booking fields. See the section <a href=\"/guides/API%20Related%20Articles/Create%20products\">Product booking fields</a>",
          "enum": [
            "String",
            "List",
            "Boolean",
            "Hidden"
          ]
        },
        "listOptions": {
          "type": "string",
          "description": "If this field only allows limited values to be selected from a list, they'll be included in this string, separated by \\r\\n"
        }
      },
      "description": "An information about a booking or a participant."
    },
    "PriceOptionCreate": {
      "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\")"
        },
        "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.)"
    }
  }
}