These are the endpoints that are available under the /timeOff path, which shows what hours your staff has taken off. Please note that to create new periods of time off, you POST to the /timeOffBulk path, and also note that you can view multiple time offs by simply posting a GET call to the /appointments/report path with the excludeTimeOff parameter set to false and the onlyTimeOff parameter set to 1. For more information about GET /appointments/report calls, please refer to the Appointments API page.
Endpoint | Description |
---|---|
GET /appointments/report | Returns all appointment objects on an array of appointments with specified statusaccount in array format. To get time offs to return, set the excludeTimeOff parameter to false and set the onlyTimeOff parameter to 1. |
GET /timeOff/{timeOffId} | Returns a JSON object for specified time off. |
POST /appointmentstimeOffBulk | Creates a new timeOff object on an' account. Request body/payload: Must pass a full timeOff object. For these calls, you need to pass a timeOff object with all required fields and any fields you want to set filled in the body of the payload. We have an example of a timeOff object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
PUT /timeOff/{timeOffId} | Updates an existing time off object. Request body/payload: Must pass an appointment a timeOff object with the desired changes made. |
PUT /appointments/{appointmentId}/cancel/{sendStaffEmail}/{sendClientEmail} | Sets an appointment to a substatus of CANCEL and alters boolean flag accordingly to notify the client via email. Effectively cancels an appointment with the option to send an email to the staff and the client. Request body/payload: Must pass an appointment object with substatus set to CANCEL. | PUT /appointments/{appointmentId}/noshow/{sendClientEmail} |
Code Block |
---|
{"reason" : ""} |
PUT /appointments/{appointmentId}/completed/{sendClientEmail}
Sets an appointment to a substatus of COMPLETED and alters boolean flag accordingly to send a thank you email to the client.
Request body/payload: Must pass an appointment object with substatus set to COMPLETED.
This endpoint also requires a JSON POST body of an empty string for the Reason property of the appointment:
Code Block |
---|
{"reason" : ""} |
To aid with page load time, we have included pageNumber and pageSize parameters for server side pagination. The pageSize parameter will be the number of items shown per page.
Parameter | Type | Endpoints to be used with | Description |
---|---|---|---|
clientId | integer | GET /appointments/report | Displays unique numeric ID of client of appointment to be returned following a GET report call. |
classScheduleId | integer | GET /appointments/report | Displays unique numeric ID of client of appointment to be returned following a GET report call. |
endDate | string | GET /appointments/report | Displays the end date of appointments to be returned following a GET report call, formatted as YYYY-MM-DD. |
excludeTimeOff | boolean | GET /appointments/report | If TRUE then the GET report call does not return appointments that are set for reasons of reasonType PERSONAL; if FALSE then it does return appointments that are set for reasons of reasonType PERSONAL. |
onlyTimeOff | integer | GET /appointments/report | Can be set to 0 or 1; if set to 0 then reads as essentially false; if set to 1 then only appointments that are set for reasons that are of reasonType PERSONAL will return. |
order_field | string | GET /appointments/report | Displays the field that appointments returned following a GET report call should be ordered by. |
order_mode | string | GET /appointments/report | Displays the mode ('asc'ending or 'desc'ending) in which appointments returned following a GET report call should appear. |
pageNumber | integer | GET /appointments/report | Works with the pageSize parameter to determine how appointments get returned following a GET report call. The pageNumber value represents the number of pages on which the class sessions that get returned appear. |
pageSize | integer | GET /appointments/report | Works with the pageNumber parameter to determine how appointments gets returned following a GET report call. The pageSize value represents the number of class sessions appearing on each page of class sessions that gets returned. |
staffIdList | integer | GET /appointments/report | Displays a comma-separated list of unique numeric IDs of staff of appointments to be returned following a GET report call. |
startDate | string | GET /appointments/report | Displays the start date of appointments to be returned following a GET report call, formatted as YYYY-MM-DD. |
locationIdList | integer | GET /appointments/report | Displays a comma-separated list of locationIds connected to the appointments you want returned following a GET report call. |
statusList | string | GET /appointments/report | Displays a comma-separated list of statuses of the appointments you want returned following a GET report call. Has acceptable values of OPEN, CLOSED, INPROGRESS, COMPLETED, READ_ONLY, PENDING, PENDING_CONFIRMATION, PENDING_WAITLIST, CHECKEDIN, CANCELLED, and CONFIRMED. |
waitListIds | string | PUT /appointments/{appointmentId} | Displays a comma-separated list of waitListIds to be invited to claim the spot of a cancelled appointment. |
override | integer | POST /appointments | Can be set to 0 or 1; if set to 0 then staff for specified appointment is free during that time slot; if set to 1 you are overriding the staff's work schedule and effectively double booking him or her. For these calls, you need to pass a timeOff object with all required fields and any fields you want to update filled in the body of the payload. We have an example of a timeOff object in the responses section below and have indicated the required fields in the object values table at the bottom of this page. |
DELETE /timeOff/{timeOffId} | Removes a timeOff object from view by setting its active property to false. |
How to Get List of Time Offs
- You set the parameter onlyTimeOff to 1
- The parameter excludeTimeOff is set to false
- the serviceIdList parameter is either sent in as null or only includes ids for reasons that are of reasonType PERSONAL
The objects below represent the minimum viable objects to pass that are needed to create or update a timeOff object. Check whether or not a property can be written to by looking at the Object Values table below to see if the property is writable.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{
"appliesTo": "staff",
"assignedTo": "select",
"businessId": "43111",
"endDate": "2019-02-13",
"endTime": "1400",
"reason": {Reason object for reason of time off - for more info, see Services API page},
"repeats": false,
"staffId": [
0: 80891
],
"startDate": "2019-02-13",
"startTime": "1300"
} |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{
"appliesTo": "staff",
"businessId": 43111,
"changeReason": null,
"clientEndTime": "1400",
"clientStartTime": "1100",
"color": null,
"createdDate": "2019-02-11 17:27:08",
"createdUser": "JoeSchmo",
"description": "Babysitter got sick",
"endDate": "2019-02-13",
"endTime": "1400",
"modifiedDate": "2019-02-11 17:27:08",
"modifiedUser": "JoeSchmo",
"note": "Babysitter got sick",
"reason": {Reason object for reason of time off - for more info, see Services API page},
"recurringAppointmentId": null,
"staff": {Staff object for staff of time off - for more info, see Staff API page},
"staffId": 80891,
"startDate": "2019-02-13",
"startTime": "1300",
"status": "OPEN",
"timeOffId": 20050788
} |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "businessId": 43111, "changeReason": null, "color": null, "createdDate": "2018-08-03 14:39:38", "createdUser": "JoeSchmo", "description": "Need a break!", "endDate": "2018-10-01", "endTime": 1200, "modifiedDate": "2018-08-07 15:10:27", "modifiedUser": "JoeSchmo", "reason": {Reason object for reason of time off - for more info, see servicesServices API page}, "recurringAppointmentId": null, "staff": {Staff object for staff with time off - for more info, see staffStaff API page}, "startDate": "2018-10-01", "startTime": 1100, "status": "Open", "timeOffId": 17360947 } |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "appliesTobusinessId": "staff"43111, "businessIdchangeReason": 43111null, "color": null, "createdDate": "2018-08-03 1421:39:38", "createdUser": "JoeSchmo", "description": "Need aan even longer break!", "endDate": "2018-10-01", "endTime": "1400", "modifiedDate": "2018-08-07 11:34:56", "modifiedUser": "JoeSchmo", "originalStartDate": "2018-10-01", "reason": {Reason object for reason of time off - for more info, see Services API page}, "recurringAppointmentId": null, "staff": {Staff object for staff with time off - for more info, see Staff API page}, "staffId": 80891, "note "startDate": "2018-10-01", "startTime": "1100", "status": "1100", "timeOffId": 17360947 }}] |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "businessId": 43111, "changeReason": null, "color": null, "createdDate": "2018-08-03 14:39:38", "createdUser": "JoeSchmo", "description": "Need a longer break!", "originalStartDateendDate": "2018-10-01", "endTime": "1400", "modifiedDate": "2018-08-07 11:34:56", "modifiedUser": "JoeSchmo", "reason": {Reason object for reason of time off - for more info, see servicesServices API page}, "recurringAppointmentId": null, "staff": {Staff object for staff with time off - for more info, see staffStaff API page}, "staffId": 80891, "startDate": "2018-10-01", "startTime": "1100", "status": "1100", "timeOffId": 17360947 } |
- For the appointments report endpoint, please refer to the Appointments API page.
Property name | Type | Required | Writable | Description |
---|---|---|---|---|
businessId | integer | Yes | Provides unique numeric ID of the business offering availability. (Required)specified time off. | |
changeReason | boolean | Indicates whether or not the reason of the specified time off has been changed. | ||
color | string | Yes | Displays any color chosen to override specified time off on the backoffice calendar. | |
createdDate | string | Displays as date specified time off was created as YYYY-MM-DD with time after. (Required) | ||
createdUser | string | Displays the username of user who created specified time off. (Required) | ||
description | string | Yes | Displays any description that was added to time off profile. | |
endDate | string | Yes | Yes | Displays Provides the date that specified time off is set to end as YYYY-MM-DD. |
endTime | integer | Displays as military Yes | Yes | Provides the time that specified session endstime off ends displayed in military format. (Required) |
modifiedDate | string | Displays as date specified time off was last modified as YYYY-MM-DD with time after. | ||
modifiedUser | string | Displays the username of user who last modified specified time off. | ||
reason | object | Yes | Yes | Displays the reason object connected to specified time off - for more info, see Services API page. |
recurringAppointmentId | integer | If specified time off is part of a repeating appointment time off series, then this provides unique numeric ID of that repeating appointment series. | ||
staff | object | Yes | Yes | Displays the staff object connected to specified time off - for more info, see Staff API page. |
startDate | string | Yes | Displays Yes | Provides the date that specified time off is set to begin as YYYY-MM-DD. |
startTime | integer | Displays as military Yes | Yes | Provides the time that specified session time off is set to begin displayed in military format. (Required) |
status | string | Yes | Yes | Displays the status of time off. Possible values include Open, Closed, or Cancelled. |
timeOffId | integer | Yes, on PUT calls | Provides unique numeric ID of specified time off. |