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 an array of appointments. 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 time off object on a business' account. Request body/payload: Must pass a full time off object. { "businessId": 43111, "endDate": "2018-09-26", "endTime": "1100", "reason": {Reason object for reason of time off-see services API}, "staffId": [82275], "startDate": "2018-09-26", "startTime": "1100" } |
PUT /timeOff/{timeOffId} | Updates an existing time off object. Request body/payload: Must pass a time off object with the desired changes made. |
DELETE /timeOff/{timeOffId} | Deletes a time off object from a business' account. |
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
Property name | Type | Description |
---|---|---|
businessId | integer | Provides unique numeric ID of the business offering specified time off. (Required) |
color | string | 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 | Displays any description that was added to time off profile. |
endDate | string | Displays the date that specified time off is set to end as YYYY-MM-DD. (Required) |
endTime | integer | Displays as military time that specified time off ends. (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 | Displays the reason object connected to specified time off. (Required) |
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 | Displays the staff object connected to specified time off. (Required) |
startDate | string | Displays the date that specified time off is set to begin as YYYY-MM-DD. (Required) |
startTime | integer | Displays as military time that specified time off is set to begin. (Required) |
status | string | Displays the status of time off. Possible values include Open, Closed, or Cancelled. (Required) |
timeOffId | integer | Provides unique numeric ID of specified time off. (Required) |
Add Comment