Price a booking before requesting it
Returns what a booking would cost and checks it against the resource’s rules, without booking anything. Send the resource, time and extras the request will carry. Whether the time is still free is checked only by the request, so it can still be refused after a preview succeeds. A discountCode that does not apply is not an error here: quote.discountCodeRefusal says why, and quote.amount is the price without it.
/v1/booking/booking-requests/previewAuthorizationOAuth2 access token · headerrequiredAn access token for an Application, from the client_credentials grant. An integration of your own uses the same grant. A connector from Hydda gets its token from the installation-token grant instead. Send it as Authorization: Bearer <token>.
application/jsonbookableResourceIdstring<uuid>requiredThe resource to book.
timeSpecobjectrequiredThe time a booking is for. Its model must match the resource's bookingRules.model, and each model sends a different shape.
Show propertiesHide properties
modelstringrequiredFor a resource booked by a start and an end time.
time_intervalstartsAtstring<date-time>requiredWhen the booking starts, as an ISO 8601 timestamp in UTC.
endsAtstring<date-time>requiredWhen the booking ends, as an ISO 8601 timestamp in UTC.
modelstringrequiredFor a resource booked as a stay between two dates.
date_intervalfromDatestring<date>requiredThe arrival date, as YYYY-MM-DD in the resource's time zone.
toDatestring<date>requiredThe departure date, as YYYY-MM-DD in the resource's time zone. After fromDate.
modelstringrequiredFor a resource booked one slot at a time.
time_slotsdatestring<date>requiredThe date of the slot, as YYYY-MM-DD in the resource's time zone.
startMinuteOfDayintegerrequiredThe slot's start, in minutes after local midnight, as the schedule lists it.
modelstringrequiredFor a resource booked by the date a fixed window starts on.
date_spandatestring<date>requiredThe date the window starts on, as YYYY-MM-DD in the resource's time zone.
discountCodestringA discount code. Matched ignoring case and spaces. A code that does not apply refuses the booking with the reason as its error code.
roomLayoutstringA furniture layout for a room: conference chairs facing the front, u_shape tables in a U, islands round tables with chairs around them.
conferenceu_shapeislandsaddOnLinesobject[]The extras to order with the booking.
Show propertiesHide properties
objectaddOnProductIdstring<uuid>requiredThe product to order, one of the resource's add-on products.
quantityintegerrequiredHow many units to order: people for a per-person product, orders otherwise.
deliveryAtstring<date-time>requiredWhen to deliver it, as an ISO 8601 timestamp in UTC. It must fall within the booking.
specialPortionsobject[]Parts of the quantity with dietary needs. Only catering takes them.
Show propertiesHide properties
objectcountintegerrequiredHow many of the ordered units need these options.
dietaryOptionsstring[]requiredThe dietary options these units must meet. Each must be one the product lists.
notestringA note for whoever prepares the order.
What the booking would cost.
startsAtstring<date-time>requiredWhen the booking would start, as an ISO 8601 timestamp in UTC.
endsAtstring<date-time>requiredWhen the booking would end, as an ISO 8601 timestamp in UTC.
quoteobjectrequiredWhat the booked time costs. unitPrice is the price of one pricing unit and amount the resource's price. When price windows priced the booking, unitPrice is amount divided by the hours. totalAmount adds the ordered extras.
Show propertiesHide properties
tenantGroupIdstring<uuid>The tenant group whose price applied, when a single group explains it.
pricingUnitstringrequiredHow the price is counted. hour is charged per hour, pro rata. session is one flat price per booking. night is charged per night of a stay.
hoursessionnightquantitynumberrequiredHow many pricing units the booking lasts: hours, sessions or nights. Hours can be fractional.
unitPriceobjectrequiredAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPamountobjectrequiredAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPdiscountobjectThe discount on the room's price. The booking's amount is already net of it, so the price before it is amount plus amountOff.
Show propertiesHide properties
bookingDiscountIdstring<uuid>requiredThe discount the booking took.
namestringrequiredThe discount's name when the booking took it.
entryKindstringrequiredpercent for a percentage or free, fixed for an amount off or a fixed price.
percentfixedbasisPointsintegerThe percentage in basis points, 2000 is 20%. Present exactly when entryKind is percent.
amountOffobjectrequiredWhat the discount took off the room's price.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPviaCodebooleanTrue when the booking took the discount through a shared or a personal code, false for an automatic discount.
amountBeforeDiscountobjectThe resource's price before discount. Present exactly when discount is.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPdiscountCodeRefusalstringWhy the typed code does not apply under this quote. amount is then the price without it, after any automatic discount.
not_foundnot_applicableused_upalready_usedno_reductionbaseHourlyPriceobjectThe price per hour outside every window, under the price that applied. Present exactly when priceWindows is not empty.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPpriceWindowsobject[]The times of the week priced apart from the base hourly price, under the price that applied. Absent when there are none.
Show propertiesHide properties
objectweekdaysstring[]requiredThe weekdays the window starts on.
startMinuteOfDayintegerrequiredWhen the window starts, in minutes after local midnight: 480 is 08:00.
endMinuteOfDayintegerrequiredWhen the window ends, in minutes after local midnight. An end at or before the start ends on the next day.
hourlyPriceobjectrequiredThe price per hour inside the window.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPpricePiecesobject[]What each part of the booked time costs. Absent when no price window priced any of it, and then amount is the hours times unitPrice.
Show propertiesHide properties
objectstartsAtstring<date-time>requiredWhen the part starts, as an ISO 8601 timestamp in UTC.
endsAtstring<date-time>requiredWhen the part ends, as an ISO 8601 timestamp in UTC.
minutesintegerrequiredHow long the part lasts, in minutes.
hourlyPriceobjectrequiredThe price per hour the part is charged at.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPamountobjectrequiredWhat the part costs.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPvatRateBasisPointsintegerrequiredThe VAT rate in basis points. 2500 is 25%.
vatTreatmentstringWhy a line is taxed at 0%: exempt when the supply is exempt from VAT, reverseCharge when the buyer accounts for the VAT.
exemptreverseChargetotalAmountobjectAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPvatBreakdownobject[]The total split by VAT rate and treatment, the resource included.
Show propertiesHide properties
objectvatRateBasisPointsintegerrequiredThe VAT rate in basis points. 2500 is 25%.
vatTreatmentstringWhy a line is taxed at 0%: exempt when the supply is exempt from VAT, reverseCharge when the buyer accounts for the VAT.
exemptreverseChargeamountobjectrequiredAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPcancellationDeadlinestring<date-time>The last moment the booking could be cancelled, as an ISO 8601 timestamp in UTC. The earliest of the resource's notice and every extra's cutoff.
addOnLinesobject[]requiredThe extras as they would be ordered, each with its price.
Show propertiesHide properties
objectidstring<uuid>requiredThe order line id.
addOnProductIdstring<uuid>requiredThe product ordered.
productNamestringrequiredThe product's name when it was ordered.
kindstringrequiredWhat kind of product it is.
cateringequipmentservicepricingUnitstringrequiredHow the price multiplies. per_person is charged per person, per_order once per order.
per_personper_orderquantityintegerrequiredHow many units were ordered.
deliveryAtstring<date-time>requiredWhen it is delivered, as an ISO 8601 timestamp in UTC.
specialPortionsobject[]requiredParts of the quantity with dietary needs. Empty when there are none.
Show propertiesHide properties
objectcountintegerrequiredHow many of the ordered units need these options.
dietaryOptionsstring[]requiredThe dietary options these units must meet. Each must be one the product lists.
notestringrequiredA note for whoever prepares the order. An empty string when there is none.
unitPriceobjectrequiredAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPamountobjectrequiredAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPvatRateBasisPointsintegerrequiredThe VAT rate in basis points. 2500 is 25%.
vatTreatmentstringWhy a line is taxed at 0%: exempt when the supply is exempt from VAT, reverseCharge when the buyer accounts for the VAT.
exemptreverseChargecancellationCutoffMinutesintegerrequiredHow many minutes before delivery the line can still be changed or cancelled.
cancellationDeadlinestring<date-time>requiredThe last moment the line can be changed or cancelled, as an ISO 8601 timestamp in UTC.
createdAtstring<date-time>requiredWhen the line was ordered, as an ISO 8601 timestamp in UTC.
chargeEmittedbooleanrequiredWhether the line has been sent for invoicing.
orderedByGuestbooleanTrue when the guest ordered it through the link in their booking email.
lateOrderLeadMinutesintegerThe product's order lead, in minutes, that staff ordered inside. Absent when the line was ordered in time.
addOnAmountobjectAn amount of money in one currency, never negative.
Show propertiesHide properties
minorUnitsintegerrequiredThe amount in minor units of the currency, such as öre for SEK. 0 means free.
currencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPThe request is not valid, or a business rule refused it. code names the rule.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request, when the failure has one. Match on this, not on detail.
VALIDATION_FAILEDBOOKING_TIME_SPEC_MODEL_MISMATCHBOOKING_SLOT_NOT_IN_SCHEDULEBOOKING_STAY_TOO_SHORTBOOKING_STAY_TOO_LONGBOOKING_DATE_INTERVAL_EMPTYBOOKING_DATE_SPAN_EMPTYBOOKING_IN_THE_PASTBOOKING_HORIZON_EXCEEDEDBOOKING_DURATION_CEILING_EXCEEDEDBOOKING_DURATION_TOO_SHORTBOOKING_DURATION_TOO_LONGBOOKING_DURATION_NOT_ON_INCREMENTBOOKING_START_NOT_ON_INCREMENTBOOKING_OUTSIDE_OPEN_HOURSBOOKING_NOTICE_TOO_SHORTBOOKING_ROOM_LAYOUT_NOT_OFFEREDBOOKING_ROOM_LAYOUT_CUTOFF_PASSEDBOOKING_ADD_ON_LINE_LIMIT_EXCEEDEDBOOKING_ADD_ON_NOT_OFFEREDBOOKING_ADD_ON_DELIVERY_OUTSIDE_BOOKINGBOOKING_ADD_ON_DELIVERY_OUTSIDE_AVAILABILITYBOOKING_ADD_ON_SPECIAL_PORTIONS_INVALIDBOOKING_ADD_ON_ORDER_LEAD_TOO_SHORTparametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
The access token is missing, expired or not valid.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request. Match on this, not on detail.
parametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
The token does not allow this request.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request. Match on this, not on detail.
parametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
The resource does not exist, or the token cannot see it.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request. Match on this, not on detail.
parametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.