v1

latestOpenAPI 3.0.12026-07-133870165.8 KB
Availability

Get Available Times

Choose your search criteria carefully. Availability is an expensive call. If you search availability for all resources, you should only do so for a single date. If you search availability for multiple dates, you should only do so for a specific resource by specifying the optional resourceId parameter.

A serviceId is required. The startDate and endDate are required and are formatted as: YYYY-MM-DD

A resourceId is optional, it is recommended if known at the time of availability call.

timezoneName is optional, it allows you to specify the IANA formatted name for the end user's timezone to view availability. e.g., America/New_York. NOTE: This is the recommended approach for your implementation. The "tzOffset" parameter remains for backward compatibility. For JavaScript, use moment.js in your client for ease of timezone detection and selection. For iOS, use the name property of the NSTimeZone returned from the localTimeZone method. For .NET, consider NodaTime or TimeZoneConverter via NuGet.

duration should only be populated if you allow the end user to select a duration, otherwise the service's duration will be used.

startTime and endTime are optional and are specified in military time e.g., 800 = 8:00am, 2230 = 10:30pm. Note: You will only see availability within the boundary of your business location start and end times.

dayAvailability will return day level availability for the number of days requested from the start date. See GET /consumer/v1/availability/{serviceId}/{startDate}/{endDate}/days for details.

firstDayAvailable only works with day availability. If set to true it will look for the first day available within the range specified by the dayAvailability parameter. The two parameters together can be a clever way to display availability for a week or month. Tip - pass in the beginning of the week or month, and available times are displayed for the first available date if exists.

tzOffset allows you to pass in the timezone offset for the end user's timezone of choice, e.g., (-240) for EST. If you use this option, your application should be timezone aware. The requested timezone is specified as an offset (plus or minus) from GMT time.

Availability can be complex. For further troubleshooting refer to the: GET /consumer/v1/availability/{serviceId}/{startDate}/{endDate}/unavailable endpoint. This endpoint will show you all unavailable times for a given date range. Available times are created from any unblocked time periods. For more information: Availability Overview

get/consumer/v1/availability/{serviceId}/{startDate}/{endDate}

Path parameters

serviceIdstring required

Service Id for availability search

startDatestring date-time required

Format YYYY-MM-DD: Start Date for availability search

endDatestring date-time required

Format YYYY-MM-DD: End Date for availability search

Query parameters

startTimeinteger

Format Military Time Start Time for availability search. Defaults to Business Hours Start

endTimeinteger

Format Military Time. End Time for availability search. Defaults to Business Hours End

locationIdstring

Id of business location, defaults to primary business location

resourceIdstring

Resource Id for availability search

resourceGroupIdstring

Resource Group Id for availability search

resourceIdsstring

Comma separated Resource Id's for availability search

roundRobinstring

Round robin choice 0=none, 1=random, 2=balanced

durationinteger

Duration of the service if different from default

intervalinteger

Booking Interval if different than the default

timezoneNamestring

Requested IANA timezone Id to view availability

tzOffsetinteger

Request timezone offset to view availability

destinationstring

For calculating travel based availability, requires distance scope

dayAvailabilityStartDatestring date-time

Format YYYY-DD-YY: Start date for day availability, defaults to startDate

dayAvailabilityinteger

Number of days of day availability to return

firstDayAvailableboolean

Return available times for the first available day

Response

Success

urlstring nullable
objectstring nullable
businessNamestring nullable
locationIdstring nullable
serviceIdstring nullable
serviceNamestring nullable
serviceDescriptionstring nullable
serviceDurationinteger
startDatestring nullable
endDatestring nullable
resourceIdstring nullable
resourceIdsstring nullable
resourceNamestring nullable
resourceDescriptionstring nullable
calendarIdstring nullable
calendarResourceGroupIdstring nullable
timezoneNamestring nullable

Returns the Timezone Name in IANA format if a TimezoneName was passed into an Availability call; otherwise this property is hidden

tzRequestedinteger nullable

Returns the timezone offset if a tzOffset was supplied into an Availability call; null if a TimezoneName was passed; otherwise the Business timezone offset is returned

firstAvailableDatestring nullable