Read a resource's free time
Returns the free time over a run of local dates, at most 31 days, shaped by the resource’s booking model. Use it to draw a calendar or a slot picker. The answer is a guide: a request checks every rule again and can still be refused, most often on a resource with several units.
/v1/booking/resources/{resourceId}/availabilityAuthorizationOAuth2 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>.
resourceIdstring<uuid>requiredThe resource id, as the resource list returns it.
fromDatestring<date>requiredThe first date to read, as YYYY-MM-DD in the resource's time zone.
toDatestring<date>requiredThe last date to read, included, as YYYY-MM-DD in the resource's time zone. The run covers at most 31 days.
The free time over the dates asked for.
modelstringrequiredThe resource is booked by a start and an end time.
time_intervalwindowsobject[]requiredThe free time a request can fit inside. A request starts on the increment grid and lasts within the duration bounds.
Show propertiesHide properties
objectstartsAtstring<date-time>requiredWhen the free time starts, as an ISO 8601 timestamp in UTC.
endsAtstring<date-time>requiredWhen the free time ends, as an ISO 8601 timestamp in UTC.
modelstringrequiredThe resource is booked one slot at a time.
time_slotsslotsobject[]requiredEvery slot nobody holds.
Show propertiesHide properties
objectstartsAtstring<date-time>requiredWhen the free time starts, as an ISO 8601 timestamp in UTC.
endsAtstring<date-time>requiredWhen the free time ends, as an ISO 8601 timestamp in UTC.
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.
modelstringrequiredThe resource is booked as a stay between two dates.
date_intervalfreeNightsstring<date>[]requiredEach local date whose night nobody holds. A stay is any run of free nights within the minimum and maximum nights.
modelstringrequiredThe resource is booked by the date a fixed window starts on.
date_spandaysobject[]requiredEvery date whose window has a unit left.
Show propertiesHide properties
objectstartsAtstring<date-time>requiredWhen the free time starts, as an ISO 8601 timestamp in UTC.
endsAtstring<date-time>requiredWhen the free time ends, as an ISO 8601 timestamp in UTC.
datestring<date>requiredThe local date the window starts on, as YYYY-MM-DD.
remainingintegerrequiredHow many units are still free for this window.
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.
The 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_FAILEDparametersobjectValues 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.