These are the endpoints that are available under the /availability path, which show what hours your business has available to take new appointments.
Endpoint | Description |
---|---|
GET /availability/{YYYY}/{MM}/{staffId}/{locationId}/{reasonId}?duration={reason.visitMinutes} | Returns an object with properties that can be used to determine what days in the specified month a staff person has availability to fit an appointment with specified staffId, locationId, and reasonId, and with the duration passed as a parameter. This API call only provides the dates that offer open timeslots, and does not accurate calculation for each slot. Use the GET /availability/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} call to provide information about the details for that day. Can be used with reasonTypes of both SERVICE and CLASS. |
GET /availability/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId}?duration={reason.visitMinutes} | Returns an array of timeslot objects that display the times during the chosen day that the specified staff person has available to take an appointment for specified service at specified location. Can be used with reasonType of SERVICE. A separate endpoint should be used when determining timeslots for classes, since classes allow multiple customers to book for the same time slot. Please read our classschedule API documentation here. |
GET /availability/location/{locationId}/service/{reasonId} | Returns the dates of availability for all staff for the specified location and service in array format. Requires parameters startDate and endDate (described in table below) |
Data points passed on in the request URL portion of the API call that are used to filter the data being requested.
Parameter | Type | Endpoints to be used with | Description |
---|---|---|---|
duration | integer | GET /availability/{YYYY}/{MM}/{staffId}/{locationId}/{reasonId}, GET /availability/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} | Is set to the duration of the reason that you are looking to get the availability for. Typically this is the reason’s visitMinutes property but if the reason is a multi-duration service that has a durationList it could be any of the durations in the durationList. The data that is sent back from the availability GET calls when the duration parameter is filled in is filtered to make sure the appointment slots could accommodate this duration. |
resourceId | integer | GET /availability/{YYYY}/{MM}/{staffId}/{locationId}/{reasonId}, GET /availability/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId} | Is set to the resourceId you want to use for this appointment. The response in the GET call will be used to make sure that the days and timeslots sent back are when the resource is free and available for the appointment. |
startDate | string | GET /availability/location/{locationId}/service/{reasonId} | This parameter is required on this endpoint. Should be set to the start date of the range of dates that you want availability to return for. Must be passed as YYYY-MM-DD. |
endDate | string | GET /availability/location/{locationId}/service/{reasonId} | This parameter is required on this endpoint. Should be set to the end date of the range of dates that you want availability to return for. Must be passed as YYYY-MM-DD. |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "businessId": 43111, "currentMonth": 1675209600000, "endDate": { "date": 1708041600000, "dateId": null, "day": 16, "dayOfWeek": 5, "month": 2, "openSlotCount": 0, "year": 2024 }, "filledDays": [], "locationList": null, "month": 2, "openDays": [{ "date": 1676592000000, "dateId": null, "day": 17, "dayOfWeek": 5, "month": 2, "openSlotCount": 0, "year": 2023, }], "staffList": null, "startDate": { "date": 1676505600000, "dateId": null, "day": 16, "dayOfWeek": 4, "month": 2, "openSlotCount": 0, "year": 2023 }, vacationDays: [], year: 2023 }] |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "available": true, "deletedclientEndDate": false, "endDate": null, "endTime": 1700, "slotCount": 36, "slotMax": 36"2023-02-21", "clientEndTime": 1450, "staffEndTimeclientStartDate": 1700"2023-02-21", "staffStartTimeclientStartTime": 1400, "startTimeendTime": 14001450, "timeStringstaffEndDate": "02:00 PM - 05:00 PM", "units": [{ "locationId": 81181, "professionalId": 82275, "reasonId": 158196, "resourceId": 2556 }] }] | ||||||||
Code Block | ||||||||
| ||||||||
[{2023-02-21", "staffEndDateTimeUTC": 1677009000000, "staffEndTime": 1500, "staffStartDate": "2023-02-21", "staffStartDateTimeUTC": 1677006000000, "staffStartTime": 1400, "clusteredstartTime": false1400, "timeString": "date"14:00 "2018-12-11- 14:50 America/New_York (14:00 - 14:50 ET)", "timeSlotsunits": [{ "availablebundleResourceIdList": true[2556], "clientTimelocationId": 1200282639, "deletedprofessionalId": false298660, "endDatereasonId": null159330, "endTimeresourceId": 130016450, "slotCountroundRobin": 12false, "slotMaxtandemStaffIdList": 12,null }] }] |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "staffEndTimeclustered": 1300false, "staffStartTimedate": 1200, "2018-12-11", "startTimetimeSlots": 1200,[{ "timeStringavailable": "12:00 PM - 1:00 PM" true "clientTime": 1200, "unitsdeleted": [{ false, "professionalIdendDate": 41681null, "endTime": 1300, "locationIdslotCount": 2874512, "slotMax": 12, "reasonIdstaffEndTime": 937901300, "resourceIdstaffStartTime": null1200, }]"startTime": 1200, }], }] |
- For the class schedule availability endpoint, please refer to the Class Schedule API page.
availability/{YYYY}/{MM}/{staffId}/{locationId}/{reasonId}?duration={reason.visitMinutes}
businessId
integer
Provides unique numeric ID of the business offering availability.
endDate
object
Displays an object containing details about the end date of this period of availability. Definitions of the properties within this object are defined in the table below.
"timeString": "12:00 PM - 1:00 PM",
"units": [{
"professionalId": 41681,
"locationId": 28745,
"reasonId": 93790,
"resourceId": null
}],
}],
}] |
- For the class schedule availability endpoint, please refer to the Class Schedule API page.
availability/{YYYY}/{MM}/{staffId}/{locationId}/{reasonId}?duration={reason.visitMinutes}
Property name | Type | Description | |
---|---|---|---|
businessId | integer | Provides unique numeric ID of the business offering availability. | |
currentMonth | integer | Provides current month as calculated by milliseconds elapsed since January 1, 1970 00:00:00 UTC form. | |
endDate | object | Displays an object containing details about the end date of this period of availability. Definitions of the properties within this object are defined in the table below. | |
filledDays | array | Displays an array of of dates that no longer have open slots available. Definitions of properties within an object on this array are defined in the table below. | |
locationList | string | Displays a list of the locations that have availability. | |
month | integer | Displays a one or two digit number that indicates the month of availability. | |
openDays | array | Displays an array of | of dates that no longer the dates which still have open slots available and filledPercent below 100. Definitions of the properties within an object on this array are defined in the table below. locationList |
staffList | string | Displays a list of | the locationsstaff members that have availability. |
monthstartDate | integer | Displays a one or two digit number that indicates the month object | Displays an object containing details about the start date of this period of availability. openDaysDefinitions of the properties within this object are defined in the table below. |
vacationDays | array | Displays an array of | the dates which still have open slots available and filledPercent below 100dates set aside for staff time off. Definitions of the properties within an object on this array are defined in the table below. |
staffList | string | Displays a list of staff members that have availability. | |
startDate | object | Displays an object containing details about the start date of this period of availability. Definitions of the properties within this object are defined in the table below. | |
vacationDays | array | Displays an array of dates set aside for staff time off. Definitions of the properties within an object on this array are defined in the table below. | |
year | integer | Displays the year of the specified availability. |
availability/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId}?duration={reason.visitMinutes}
available
boolean
Indicates whether or not the specified session of availability is still available.
deleted
boolean
Indicates whether or not the specified session has been deleted.
endDate
integer
Displays the date that the specified session is set to end.
endTime
integer
Displays as the military time that the specified session ends, not including any buffer.
year | integer | Displays the year of the specified availability. |
Property name | Type | Description |
---|---|---|
date | integer | Displays the date of the specified day in milliseconds elapsed since January 1, 1970 00:00:00 UTC form. |
dateId | integer | Provides unique numeric ID for the specified date. |
day | integer | Displays as day of the month of the specified date. |
dayOfWeek | integer | Displays as day of the week of the specified day (where 0=Sunday, 1=Monday, ..., 6=Saturday). |
month | integer | Displays as the month of the specified day. |
openSlotCount | integer | Provides the number of open slots of availability for the specified day. |
year | integer | Displays as the year of the specified day. |
availability/{YYYY}/{MM}/{DD}/{staffId}/{locationId}/{reasonId}?duration={reason.visitMinutes}
Property name | Type | Description |
---|---|---|
clientEndDate | string | Displays as the date that the specified session ends for clients displayed as YYYY-MM-DD, excludes any buffer. |
clientEndTime | integer | Displays as the military time that the specified session ends for clients, excludes any buffer. |
clientStartDate | string | Displays as the date that the specified session begins for clients displayed as YYYY-MM-DD, excludes any buffer. |
clientStartTime | integer | Displays as the military time that the specified session begins for clients, excludes any buffer. |
endTime | integer | Displays as the military time that the specified session ends, excludes any buffer. |
staffEndDate | string | Displays as the date that the specified session ends for staff displayed as YYYY-MM-DD, includes any buffer. |
staffEndDateTimeUTC | integer | Displays as date & time that the specified session ends for staff in milliseconds elapsed since January 1 1970 UTC format, includes any buffer. |
staffEndTime | integer | Displays as the military time that the specified session ends for staff, includes any buffer. |
staffStartDate | string | Displays as the date that the specified session begins for staff displayed as YYYY-MM-DD, includes any buffer. |
staffStartDateTimeUTC | integer | Displays as date & time that the specified session begins for staff in milliseconds elapsed since January 1 1970 UTC format, includes any buffer. |
staffStartTime | integer | Displays as the military time that the specified session ends begins for staff, includes any buffer. |
staffStartTimestartTime | integer | Displays as the military time that the specified session begins for staff, includes excludes any buffer. |
timeString | string | Provides a string display of the start and end times of the specified session, using AM/PM format. |
units | array | Ties the staff, location, reason, and resource to the availability slot. Definitions of the properties within an object on this array are defined in the table below. |
Property name | Type | Description |
in the table below. |
Property name | Type | Description |
---|---|---|
bundleResourceIdList | array | Provides unique numeric ID of any resources connected to the specified session of availability in array format. |
locationId | integer | Provides unique numeric ID of the location connected to the specified session of availability. |
professionalId | integer | Provides unique numeric ID of the staff connected to the specified session of availability. |
reasonId | integer | Provides unique numeric ID of the service connected to the specified session of availability. |
resourceId | integer | Provides unique numeric ID of any resource connected to the specified session of availability. |
roundRobin | boolean | Indicates whether or not staff gets assigned to the specified session of availability via round robin. |
tandemStaffIdList | array | Provides unique numeric ID of any tandem staff connected to the specified session of availability in array format. |