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 account 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 /timeOffBulk | 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 a timeOff object with the desired changes made. 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 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "businessIdappliesTo": 43111, "colorstaff": null, "createdDateassignedTo": "2018-08-03 14:39:38select", "createdUserbusinessId": "JoeSchmo43111", "description": "Need a break!", "endDate": "20182019-1002-0113", "endTime": 1200, "modifiedDate": "2018-08-07 15:10:27", "modifiedUser": "JoeSchmo" "1400", "reason": {Reason object for reason of time off - for more info, see servicesServices API page}, "recurringAppointmentIdrepeats": nullfalse, "staffstaffId": {Staff[ object for staff with time off-see staff API page}, "startDate": "2018-10-01", 0: 80891 "startTime": 1100], "statusstartDate": "Open2019-02-13", "timeOffIdstartTime": 17360947"1300" } |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "allDayappliesTo": true"staff", "businessId": 43111, "changeReason": null, "clientEndTime": "1400", "clientStartTime": "1100", "color": null, "createdDate": "20182019-0802-0311 2117:3927:3808", "createdUser": "JoeSchmo", "description": "NeedBabysitter an even longer break!got sick", "endDate": "20182019-1002-0113", "endTime": "1400", "modifiedDate": "20182019-0802-0711 1117:3427:5608", "modifiedUser": "JoeSchmo", "originalStartDatenote": "2018-10-01Babysitter got sick", "reason": {Reason object for reason of time off - for more info, see servicesServices API page}, "recurringAppointmentId": null, "staff": {Staff object for staff withof time off - for more info, see staffStaff API page}, "staffId": 80891, "startDate": "20182019-1002-0113", "startTime": "11001300", "status": "1100OPEN", "timeOffId": 1736094720050788 }}] |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "allDaybusinessId": true43111, "businessIdchangeReason": 43111null, "color": null, "createdDate": "2018-08-03 14:39:38", "createdUser": "JoeSchmo", "description": "Need a longer break!", "endDate": "2018-10-01", "endTime": "1400"1200, "modifiedDate": "2018-08-07 1115:3410:5627", "modifiedUser": "JoeSchmo", "originalStartDate": "2018-10-01", "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 -see stafffor APImore page}info, see Staff "staffId": 80891API page}, "startDate": "2018-10-01", "startTime": "1100", "status": "1100Open", "timeOffId": 17360947 } |
- For the appointments report endpoint, please refer to the Appointments API page.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
[{ "assignedTobusinessId": 43111, "changeReason": null, "color": null, "createdDate": "2018-08-03 21:39:38", "createdUser": "selectJoeSchmo", "businessIddescription": "43111Need an even longer break!", "endDate": "20192018-0210-1301", "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}, "repeats": falserecurringAppointmentId": null, "staff": {Staff object for staff with time off - for more info, see Staff API page}, "staffId": [80891], "startDate": "20192018-0210-1301", "startTime": "1100", "status": "1100", "1300timeOffId": 17360947 }}] |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "businessId": 43111, "changeReason": null, "color": null, "createdDate": "20192018-0208-1103 1714:2739:0838", "createdUser": "JoeSchmo", "description": "BabysitterNeed a gotlonger sickbreak!", "endDate": "20192018-0210-1301", "endTime": "1400", "modifiedDate": "20192018-0208-07 11 17:2734:0856", "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 ofwith time off - for more info, see Staff API page}, "staffId": 80891, "startDate": "20192018-0210-1301", "startTime": "13001100", "status": "OPEN1100", "timeOffId": 2005078817360947 } |
- 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 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. | ||
createdUser | string | Displays the username of user who created specified time off. | ||
description | string | Yes | Displays any description that was added to time off profile. | |
endDate | string | Yes | Yes | Provides the date that specified time off is set to end as YYYY-MM-DD. |
endTime | integer | Yes | Yes | Provides the time that specified time off ends displayed in military format. |
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 time off series, then this provides unique numeric ID of that series. | ||
staff | object | Yes | Yes | Displays the staff object connected to specified time off - for more info, see Staff API page. |
startDate | string | Yes | Yes | Provides the date that specified time off is set to begin as YYYY-MM-DD. |
startTime | integer | Yes | Yes | Provides the time that specified time off is set to begin displayed in military format. |
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. |