{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rezdy/json-schema/rezdy-product-create-request-schema.json",
  "title": "ProductCreateRequest",
  "description": "new 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/ProductCreateRequest",
  "required": [
    "bookingFields",
    "bookingMode",
    "confirmMode",
    "description",
    "durationMinutes",
    "name",
    "priceOptions",
    "productType",
    "shortDescription",
    "unitLabel",
    "unitLabelPlural"
  ],
  "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."
    },
    "bookingFields": {
      "type": "array",
      "description": "List of booking fields required for this product.",
      "items": {
        "$ref": "#/$defs/BookingFieldCreate"
      }
    },
    "productType": {
      "type": "string",
      "description": "Type of this product.",
      "enum": [
        "ACTIVITY",
        "DAYTOUR",
        "MULTIDAYTOUR",
        "PRIVATE_TOUR",
        "TICKET",
        "RENTAL",
        "CHARTER",
        "EVENT",
        "GIFT_CARD",
        "TRANSFER",
        "LESSON",
        "MERCHANDISE",
        "CUSTOM"
      ]
    },
    "internalCode": {
      "type": "string",
      "description": "Supplier-defined product code, used internally by the supplier."
    },
    "priceOptions": {
      "type": "array",
      "description": "List of price options belonging to this product. ",
      "items": {
        "$ref": "#/$defs/PriceOptionCreate"
      }
    },
    "unitLabel": {
      "type": "string",
      "description": "What a quantity for this product is. It can be people (I.e. participant, passenger, diver) or objects (Kayak, Helicopter, etc.)"
    },
    "unitLabelPlural": {
      "type": "string",
      "description": "Plural version of unitLabel."
    },
    "quantityRequired": {
      "type": "boolean",
      "description": "Does this product require a quantity to be booked? True for most products. Can be false if the supplier can only provide one quantity at any single time (I.e. private charters) or a price of a booking is fixed regardless of quantity"
    },
    "quantityRequiredMin": {
      "type": "integer",
      "description": "Represent the min booking quantity for the product. It can be setup for a supplier product. For a successful booking of the product, the total number of participants (regardless of pricing options), per booking item in the booking request, have to be greater or equal than this value.",
      "format": "int32"
    },
    "quantityRequiredMax": {
      "type": "integer",
      "description": "Represent the max booking quantity for the product. It can be setup for a supplier product. For a successful booking of the product, the total number of participants (regardless of pricing options), per booking item in the booking request, have to be lesser or equal than this value.",
      "format": "int32"
    },
    "bookingMode": {
      "type": "string",
      "description": "Booking mode. Determines if this product needs availability or can be booked for any date.",
      "enum": [
        "NO_DATE",
        "DATE_ENQUIRY",
        "INVENTORY"
      ]
    },
    "charter": {
      "type": "boolean",
      "description": "A charter product means each session can only have a single booking, whatever the number of seats booked."
    },
    "xeroAccount": {
      "type": "string",
      "description": "Supplier Xero account 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": "If pickups are configured for this product, the field will contain the id of the pickup location list created by the supplier.",
      "format": "int64"
    },
    "locationAddress": {
      "$ref": "#/$defs/Address"
    },
    "additionalInformation": {
      "type": "string",
      "description": "Additional information for the product, that should be sent after a booking is completed (i.e. by email) to the customer. Useful for integration, when manual control of the entire customer booking experience is wanted, and the automatic confirmation e-mail from Rezdy had been suppressed.  "
    },
    "languages": {
      "uniqueItems": true,
      "type": "array",
      "description": "List of product languages. The format of the language is ISO 639 two-letter code with BCP 47 language variants, separated by underscore e.g. en_au.",
      "items": {
        "type": "string",
        "description": "List of product languages. The format of the language is ISO 639 two-letter code with BCP 47 language variants, separated by underscore e.g. en_au."
      }
    },
    "extras": {
      "uniqueItems": true,
      "type": "array",
      "description": "List of extras IDs.",
      "items": {
        "$ref": "#/$defs/Extra"
      }
    },
    "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": {
    "Address": {
      "type": "object",
      "properties": {
        "addressLine": {
          "type": "string",
          "description": "Address line "
        },
        "addressLine2": {
          "type": "string",
          "description": "Address line 2"
        },
        "postCode": {
          "type": "string",
          "description": "Post Code"
        },
        "city": {
          "type": "string",
          "description": "City name"
        },
        "state": {
          "type": "string",
          "description": "State name"
        },
        "countryCode": {
          "type": "string",
          "description": "Country code"
        },
        "latitude": {
          "type": "number",
          "description": "Geolocation - latitude",
          "format": "double"
        },
        "longitude": {
          "type": "number",
          "description": "Geolocation - longitude",
          "format": "double"
        }
      },
      "description": "Address of a company, customer or product location."
    },
    "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."
    },
    "Extra": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "ID of the extra",
          "format": "int64"
        },
        "name": {
          "type": "string",
          "description": "Name of the extra"
        },
        "description": {
          "type": "string",
          "description": "Description of the extra"
        },
        "price": {
          "type": "number",
          "description": "Price for a single quantity of this extra",
          "format": "float"
        },
        "extraPriceType": {
          "type": "string",
          "description": "Price type for this extra. Defines what quantities are allowed and how their price is calculated",
          "enum": [
            "ANY",
            "FIXED",
            "QUANTITY"
          ]
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity booked",
          "format": "int32"
        },
        "image": {
          "$ref": "#/$defs/Image"
        }
      },
      "description": "Optional service or item that can be purchased when booking a specific product"
    },
    "Image": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Id of the image. Can be used for DELETE /{productCode}/image/{mediaId} service",
          "format": "int64"
        },
        "itemUrl": {
          "type": "string",
          "description": "Full size image link"
        },
        "thumbnailUrl": {
          "type": "string",
          "description": "Thumbnail image link (240px)"
        },
        "mediumSizeUrl": {
          "type": "string",
          "description": "Medium size image link (480px)"
        },
        "largeSizeUrl": {
          "type": "string",
          "description": "Large size image link (1280px)"
        }
      },
      "description": "Image links."
    },
    "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.)"
    }
  }
}