{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rezdy/json-schema/rezdy-booking-create-schema.json",
  "title": "Booking create",
  "description": "Booking create object used to create a booking in Rezdy's system. Lists all the possible fields for all product types and scenarios. Most of them are not required when sending a new booking.<br>A single Booking can be used to book multiple products, each of them being a BookingItem. All the products of one booking have to be from the same supplier.",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rezdy-supplier-api-openapi.yml#/components/schemas/Booking create",
  "required": [
    "items"
  ],
  "type": "object",
  "properties": {
    "orderNumber": {
      "type": "string",
      "description": "Order number. This is the number you should give to customers and print on booking confirmations. Order number is generated by the system, therefore, even if it is specified in the booking request, it will be overwritten."
    },
    "status": {
      "type": "string",
      "description": "Status of this booking",
      "enum": [
        "PROCESSING",
        "NEW",
        "ON_HOLD",
        "PENDING_SUPPLIER",
        "PENDING_CUSTOMER",
        "CONFIRMED",
        "CANCELLED",
        "ABANDONED_CART"
      ]
    },
    "resellerId": {
      "type": "integer",
      "description": "Rezdy internal ID of the agent company attached to this booking",
      "format": "int64"
    },
    "resellerUser": {
      "$ref": "#/$defs/User"
    },
    "customer": {
      "$ref": "#/$defs/Customer"
    },
    "items": {
      "type": "array",
      "description": "List of items in this booking. A booking can contain multiple products. Each BookingItem is a separate product with its own set of quantities and participant details.",
      "items": {
        "$ref": "#/$defs/BookingItemCreate"
      }
    },
    "totalAmount": {
      "type": "number",
      "description": "Total booking amount",
      "format": "float"
    },
    "datePaid": {
      "type": "string",
      "description": "Date this booking was fully paid",
      "format": "date-time"
    },
    "dateReconciled": {
      "type": "string",
      "description": "Date this booking was reconciled with the agent",
      "format": "date-time"
    },
    "comments": {
      "type": "string",
      "description": "Special requirements entered by the customer. Visible to both customer and supplier."
    },
    "internalNotes": {
      "type": "string",
      "description": "Comments only visible internally by the supplier"
    },
    "payments": {
      "type": "array",
      "description": "List of payments recorded for this booking",
      "items": {
        "$ref": "#/$defs/BookingPayment"
      }
    },
    "creditCard": {
      "$ref": "#/$defs/CreditCard"
    },
    "fields": {
      "type": "array",
      "description": "List of custom fields that are required \"once per booking\" by all the products in this booking ",
      "items": {
        "$ref": "#/$defs/BookingField"
      }
    },
    "source": {
      "type": "string",
      "description": "Source of this booking viewed from the supplier",
      "enum": [
        "ONLINE",
        "INTERNAL",
        "PARTNERS",
        "COMMUNITY",
        "MARKETPLACE",
        "MARKETPLACE_PREF_RATE",
        "API",
        "GOOGLE"
      ]
    },
    "sourceReferrer": {
      "type": "string",
      "description": "Referrer code "
    },
    "resellerSource": {
      "type": "string",
      "description": "Source of this booking viewed from the agent",
      "enum": [
        "ONLINE",
        "INTERNAL",
        "PARTNERS",
        "COMMUNITY",
        "MARKETPLACE",
        "MARKETPLACE_PREF_RATE",
        "API",
        "GOOGLE"
      ]
    },
    "sourceChannel": {
      "type": "string",
      "description": "Agent code defined by the supplier"
    },
    "resellerComments": {
      "type": "string",
      "description": "Comments only visible by the agent and the supplier. This should be used by the agent to send voucher numbers/redemption codes to suppliers."
    },
    "surcharge": {
      "type": "number",
      "description": "Credit card surcharge calculated for this booking",
      "format": "float"
    },
    "vouchers": {
      "type": "array",
      "description": "List of vouchers (Gift cards) that have been redeemed to pay for this booking",
      "items": {
        "type": "string",
        "description": "List of vouchers (Gift cards) that have been redeemed to pay for this booking"
      }
    },
    "coupon": {
      "type": "string",
      "description": "Promo code that has been applied to this booking"
    },
    "paymentOption": {
      "type": "string",
      "description": "Payment option selected by the customer when making an online booking",
      "enum": [
        "CREDITCARD",
        "PAYPAL",
        "PAYPAL_COMMERCE",
        "BANKTRANSFER",
        "CASH",
        "INVOICE",
        "EXTERNAL",
        "ALIPAY"
      ]
    },
    "sendNotifications": {
      "type": "boolean",
      "description": "Flag to control if a booking confirmation email should be send to the customer after this booking is created.<br>This will also send other types of customer notifications when setup by the supplier (I.e. SMS, Gift cards) ",
      "default": true
    },
    "resellerReference": {
      "type": "string",
      "description": "External reseller reference, can be used to pass internal booking number. This reference will be shown to a supplier, also it will appear on reports and can be used to filter orders. Maxiumum number of characters is 30"
    },
    "barcodeType": {
      "type": "string",
      "description": "Declares the redemption code format customers will receive if the booking was created with barcodes.",
      "enum": [
        "TEXT",
        "CODE_39",
        "CODE_128",
        "QR_CODE",
        "EAN_8",
        "EAN_13",
        "ITF"
      ]
    }
  },
  "$defs": {
    "BookingField": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "description": "Field label that can be shown to customers"
        },
        "value": {
          "type": "string",
          "description": "Value entered by the customer for this field"
        },
        "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 through public API, however, it's a good practice to support them 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 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"
        },
        "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"
        },
        "fieldType": {
          "type": "string",
          "description": "Booking field type which determines its format. See <a href=\"/guides/API%20Related%20Articles/Booking%20Fields%20Format\">Booking Fields Format</a>",
          "enum": [
            "String",
            "List",
            "Boolean",
            "Phone",
            "Date",
            "Hidden"
          ]
        }
      },
      "description": "An information about a booking or a participant, based on context - either nested in a booking or a participant object (I.e. \"First Name\", \"Dietary requirements\", \"Hotel Pickup\").<p><ul>How to handle the booking fields:\t<li>requiredPerXXX is true: the fields is mandatory for the booking, a booking with missing required field will fail</li> \t<li>visiblePerXXX is true: the fields is optional, a customer should be asked to fill it up, but the booking will not fail if it's empty or not sent</li>\t<li>visiblePerXXX is false AND requiredPerXXX is false: the field for this product is not visible, nor required, you can skip it - do not display it to a user</li></ul><ul>How to send the booking fields in a booking request:\t<li>fields XXXperParticipant are sent for each pax in the participants array, as \"fields\"</li> \t<li>fields XXXperBooking are sent only once, in the root booking object, as \"fields\"</li></ul></p>"
    },
    "BookingItemCreate": {
      "required": [
        "productCode",
        "quantities"
      ],
      "type": "object",
      "properties": {
        "productCode": {
          "type": "string",
          "description": "Unique Rezdy code of the product in this BookingItem"
        },
        "startTime": {
          "type": "string",
          "description": "Start time of the session for this BookingItem",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "description": "End time of the session for this BookingItem",
          "format": "date-time"
        },
        "startTimeLocal": {
          "type": "string",
          "description": "Start time of the session for this BookingItem in supplier's local timezone."
        },
        "endTimeLocal": {
          "type": "string",
          "description": "End time of the session for this BookingItem in supplier's local timezone."
        },
        "quantities": {
          "type": "array",
          "description": "List of quantities booked by this item. Each Quantity must be linked to a Product price option via its label or ID.If the product only has one price option, only 'Quantity.value' is required.",
          "items": {
            "$ref": "#/$defs/Quantity"
          }
        },
        "amount": {
          "type": "number",
          "description": "Amount charged for this BookingItem. This is automatically generated based on quantities, but you can override the amount by entering a value. If automated payment method is used for the booked product, the Amount of the booked item<br>has to be grater than Net Rate sum of the booked quantities and Rezdy processing fee.",
          "format": "float"
        },
        "extras": {
          "type": "array",
          "description": "List of Extras booked with this product",
          "items": {
            "$ref": "#/$defs/Extra"
          }
        },
        "participants": {
          "type": "array",
          "description": "List of participants. Each participant object contains all the booking fields for a single participant. ",
          "items": {
            "$ref": "#/$defs/Participant"
          }
        },
        "subtotal": {
          "type": "number",
          "description": "Subtotal is the BookingItem.amount plus extras costs plus taxes and fees",
          "format": "float"
        },
        "pickupLocation": {
          "$ref": "#/$defs/PickupLocation"
        }
      },
      "description": "An item inside a booking request to specify a unique product/startTime combination"
    },
    "BookingPayment": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of payment",
          "enum": [
            "PAYPAL",
            "PAYPAL_COMMERCE",
            "CASH",
            "CREDITCARD",
            "BANKTRANSFER",
            "BANKCHEQUE",
            "REFUND",
            "VOUCHER",
            "PROMO_CODE",
            "FREE",
            "OTHER",
            "INVOICE",
            "REZDY_PAYOUTS",
            "ALIPAY"
          ]
        },
        "amount": {
          "type": "number",
          "description": "Payment amount",
          "format": "float"
        },
        "currency": {
          "type": "string",
          "description": "Currency for this payment<br>Payments must be in the same currency than the order's totalCurrency.",
          "enum": [
            "AED",
            "ANG",
            "ARS",
            "AUD",
            "AWG",
            "AZN",
            "BGN",
            "BHD",
            "BOB",
            "BRL",
            "BYR",
            "CAD",
            "CHF",
            "CLP",
            "CNY",
            "COP",
            "CZK",
            "DKK",
            "EGP",
            "EUR",
            "FJD",
            "GBP",
            "GEL",
            "HKD",
            "HRK",
            "HUF",
            "IDR",
            "ILS",
            "INR",
            "ISK",
            "JOD",
            "JPY",
            "KES",
            "KRW",
            "KWD",
            "KZT",
            "LTL",
            "LVL",
            "MAD",
            "MKD",
            "MUR",
            "MXN",
            "MYR",
            "NGN",
            "NOK",
            "NZD",
            "PGK",
            "PHP",
            "OMR",
            "PEN",
            "PLN",
            "PYG",
            "QAR",
            "RON",
            "RSD",
            "RUB",
            "SAR",
            "SBD",
            "SEK",
            "SGD",
            "SRD",
            "SYP",
            "THB",
            "TOP",
            "TRY",
            "TWD",
            "UAH",
            "USD",
            "UYU",
            "VEF",
            "VUV",
            "WST",
            "XAF",
            "XOF",
            "XPF",
            "YER",
            "ZAR",
            "AFA",
            "ALL",
            "DZD",
            "AMD",
            "BSD",
            "BDT",
            "BBD",
            "BZD",
            "BMD",
            "BWP",
            "BND",
            "BIF",
            "KHR",
            "CVE",
            "KYD",
            "KMF",
            "BAM",
            "CRC",
            "CUP",
            "CYP",
            "DJF",
            "DOP",
            "XCD",
            "ECS",
            "SVC",
            "ERN",
            "EEK",
            "ETB",
            "FKP",
            "CDF",
            "GMD",
            "GHS",
            "GIP",
            "GTQ",
            "GNF",
            "GWP",
            "GYD",
            "HTG",
            "HNL",
            "IRR",
            "IQD",
            "JMD",
            "AOA",
            "KGS",
            "KIP",
            "LAK",
            "LBP",
            "LRD",
            "LYD",
            "LSL",
            "MOP",
            "MGF",
            "MGA",
            "MWK",
            "MVR",
            "MTL",
            "MRO",
            "MDL",
            "MNT",
            "MZM",
            "MMK",
            "NAD",
            "NPR",
            "NIO",
            "KPW",
            "PKR",
            "PAB",
            "RWF",
            "STD",
            "SCR",
            "SLL",
            "SKK",
            "SIT",
            "SOS",
            "LKR",
            "SHP",
            "SDD",
            "SZL",
            "TJS",
            "TZS",
            "TTD",
            "TND",
            "TMM",
            "UGX",
            "UZS",
            "VND",
            "YUM",
            "ZMK",
            "ZWD",
            "AFN",
            "MZN",
            "UYI",
            "ZMW",
            "GHC",
            "GGP",
            "IMP",
            "JEP",
            "TRL",
            "TVD",
            "BTC",
            "BTN",
            "BYN",
            "CLF",
            "CNH",
            "CUC",
            "MRU",
            "SDG",
            "SSP",
            "STN",
            "TMT",
            "XAG",
            "XAU",
            "XDR",
            "XPD",
            "XPT",
            "ZWL"
          ]
        },
        "date": {
          "type": "string",
          "description": "Date this payment was processed",
          "format": "date-time"
        },
        "label": {
          "type": "string",
          "description": "Reference or transaction code"
        },
        "recipient": {
          "type": "string",
          "description": "Payment recipient.",
          "enum": [
            "SUPPLIER",
            "RESELLER",
            "REZDY"
          ]
        }
      },
      "description": "Record of an already processed payment."
    },
    "CreditCard": {
      "type": "object",
      "properties": {
        "cardName": {
          "type": "string",
          "description": "Full name on the credit card"
        },
        "cardType": {
          "type": "string",
          "description": "Type of card",
          "enum": [
            "VISA",
            "MASTERCARD",
            "AMEX",
            "DINERS",
            "DISCOVER",
            "JCB"
          ]
        },
        "expiryMonth": {
          "type": "string",
          "description": "<ul>Expiry month of the card<li>01 : January</li><li>02 : February</li><li>03 : March</li><li>04 : April</li><li>05 : May</li><li>06 : June</li><li>07 : July</li><li>08 : August</li><li>09 : September</li><li>10 : October</li><li>11 : November</li><li>12 : December</li></ul>"
        },
        "expiryYear": {
          "type": "string",
          "description": "Expiry year of the card in 4 digits<br>(i.e 2015 / 2016 ...)"
        },
        "cardNumber": {
          "type": "string",
          "description": "Full Credit card number, no spaces or special characters"
        },
        "cardSecurityNumber": {
          "type": "string",
          "description": "Credit Card CVV / CVN"
        },
        "cardToken": {
          "type": "string",
          "description": " Credit card Token generated by client libraries. Use instead of other card attributes for supported gateways.<br>For example when using Stripe.js, only send the cardToken attribute. Do not send cardNumber or any other attribute."
        },
        "cardCountry": {
          "type": "string"
        }
      },
      "description": " Credit card details.<p>Used to send payment details for a booking</p>"
    },
    "Customer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Rezdy internal ID of the customer",
          "format": "int64"
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "middleName": {
          "type": "string",
          "description": "Middle name"
        },
        "lastName": {
          "type": "string",
          "description": "Last Name"
        },
        "name": {
          "type": "string",
          "description": "Full name - generated from first/middle/last names"
        },
        "email": {
          "type": "string",
          "description": "Email"
        },
        "companyName": {
          "type": "string",
          "description": "Company name"
        },
        "phone": {
          "type": "string",
          "description": "Preferred Phone number"
        },
        "mobile": {
          "type": "string",
          "description": "Mobile phone number"
        },
        "fax": {
          "type": "string",
          "description": "Fax number"
        },
        "skype": {
          "type": "string",
          "description": "Skype alias"
        },
        "dob": {
          "type": "string",
          "description": "Date of birth",
          "format": "date-time"
        },
        "preferredLanguage": {
          "type": "string",
          "description": "Preferred language. Should be a 2 letter ISO country code"
        },
        "newsletter": {
          "type": "boolean",
          "description": "Subscribe to the newsletter"
        },
        "marketing": {
          "type": "boolean",
          "description": "Agree to receive marketing emails"
        },
        "aboutUs": {
          "type": "string",
          "description": "How did you hear about us?"
        },
        "title": {
          "type": "string",
          "description": "Title",
          "enum": [
            "MR",
            "MS",
            "MRS",
            "MISS"
          ]
        },
        "gender": {
          "type": "string",
          "description": "Gender: MALE or FEMALE",
          "enum": [
            "MALE",
            "FEMALE"
          ]
        },
        "addressLine": {
          "type": "string",
          "description": "Address"
        },
        "addressLine2": {
          "type": "string",
          "description": "Extended Address"
        },
        "postCode": {
          "type": "string",
          "description": "Postcode / ZIP"
        },
        "city": {
          "type": "string",
          "description": "City/Town/Suburb"
        },
        "state": {
          "type": "string",
          "description": "State/County/Region"
        },
        "countryCode": {
          "type": "string",
          "description": "2 letter ISO country code"
        }
      },
      "description": "The customer is the person making the booking, and most of the time paying for it.<br>It differs from Participants, who are the people attending a tour"
    },
    "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."
    },
    "Participant": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "description": "List of BookingField for this participant",
          "items": {
            "$ref": "#/$defs/BookingField"
          }
        }
      },
      "description": "Details about a single participant for a single BookingItem.<br>The participant is a person attending a tour. It differs from the Customer, who is the person making the booking and most of the time paying for it. "
    },
    "PickupLocation": {
      "type": "object",
      "properties": {
        "locationName": {
          "type": "string",
          "description": "<p>Pickup location name - free text name for the location.</p>In a booking item object, it represents customer's pickup location name (if configured on product). It can be one name from pickup locations list of the booked product, or free text in case of the other pickup location option.<p>The value will be ignored, if the product does not allow pickups or if the location name does not match one of the product's pickup locations and 'other' pickup option is not enabled for the product pickup.</p>"
        },
        "address": {
          "type": "string",
          "description": "Address of the pickup location<br>In a booking item object, it represents a chosen pickup address for the booked item."
        },
        "latitude": {
          "type": "number",
          "description": "google maps calculated latitude of the pickup address",
          "format": "double"
        },
        "longitude": {
          "type": "number",
          "description": "google maps calculated latitude of the pickup address",
          "format": "double"
        },
        "minutesPrior": {
          "type": "integer",
          "description": "Pickup time in minutes, prior to the tour start time.",
          "format": "int32"
        },
        "additionalInstructions": {
          "type": "string",
          "description": "Additional instructions for the pickup location."
        },
        "pickupTime": {
          "type": "string",
          "description": "<p>Present only in booking service response</p>In a booking item object, it represents a calculated pickup time, in supplier's local timezone. Shown when the pickup was chosen for the booked item and pickup location contains duration."
        },
        "pickupInstructions": {
          "type": "string",
          "description": "<p>Present only in booking service response</p>Chosen pickup instructions (general and location specific). Shown when the pickup was chosen for the booked item."
        }
      },
      "description": "PickupLocation object. Holds information about the a pickup location from the pickup list configured for the product."
    },
    "Quantity": {
      "required": [
        "value"
      ],
      "type": "object",
      "properties": {
        "optionLabel": {
          "type": "string",
          "description": "Price option label"
        },
        "optionPrice": {
          "type": "number",
          "description": "Price option price for a single quantity",
          "format": "float"
        },
        "value": {
          "type": "integer",
          "description": "Quantity actually booked",
          "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"
          ]
        },
        "commissionType": {
          "type": "string",
          "description": "Commission type used for this booking item quantity",
          "enum": [
            "NET",
            "COMMISSION"
          ]
        },
        "commissionValue": {
          "type": "number",
          "description": "If commissionType is NET, commissionValue is net amount, if commissionType is COMMISSION, commissionValue is percentage commission",
          "format": "float"
        }
      },
      "description": "Quantity of a single price option attached to a BookingItem.<ul><li>If the product only has 1 price option, only \"Quantity.value\" is required.</li><li>If the product has multiple price options, \"Quantity.optionLabel\" is also required.</li><li>It is recommended to use \"Quantity.optionLabel\" and optionally \"Quantity.optionPrice\" instead of \"Quantity.optionId\" because the latter can vary depending on the session booked.</li></ul>I.e. enter optionLabel = \"Adult\", optionPrice = 100 and value = \"2\" to book for 2 x Adults ticket for 100"
    },
    "User": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Unique Rezdy user code"
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "email": {
          "type": "string",
          "description": "Email"
        }
      },
      "description": "Internal Rezdy user details. This is a Rezdy application user who belongs to a Rezdy agent or supplier company."
    }
  }
}