Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
topOfPage
topOfPage
The Time Off API is used to access, create, and modify the periods of time off taken on your business' account.

The Appointments API is connected to the Locations, StaffServices, and Resources APIs as appointments include all of those APIs. Since appointments are the main way your business will make money,  it is crucial for you to familiarize yourself with how to get, create, and update the different appointments on your account.




Info
titleOn this page

Table of Contents





Time Off API Endpoints


Endpoint

Description


Returns an array of appointments with specified status.

GET /timeOff/{timeOffId}Returns a JSON object for specified time off.
POST /appointments

Creates a new appointment on a business' account.

Request body/payload: Must pass a full appointment object.

PUT /timeOff/{timeOffId}

Updates an existing time off.

Request body/payload: Must pass an appointment 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}

Sets an appointment to a substatus of NO_SHOW and alters boolean flag accordingly to notify the client via email.

Request body/payload: Must pass an appointment object with substatus set to NO_SHOW.

This endpoint also requires a JSON POST body of an empty string for the Reason property of the appointment:

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" : ""}






Time Off Parameters

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.

classScheduleId to be returned following a GET report call.Displays a comma-separated list of unique numeric IDs of staff of 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

Parameter

TypeEndpoints to be used with

Description

clientId

integerGET /appointments/report

Displays unique numeric ID of client of appointment to be returned following a GET report call.

integerGET /appointments/report

Displays unique numeric ID of client of appointment

endDatestringGET /appointments/reportDisplays the end date of appointments to be returned following a GET report call, formatted as YYYY-MM-DD. 
excludeTimeOffbooleanGET /appointments/reportIf 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.
onlyTimeOffintegerGET /appointments/reportCan 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_fieldstringGET /appointments/reportDisplays the field that appointments returned following a GET report call should be ordered by.
order_modestringGET /appointments/reportDisplays the mode ('asc'ending or 'desc'ending) in which appointments returned following a GET report call should appear.
pageNumberintegerGET /appointments/reportWorks 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.
pageSizeintegerGET /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.

staffIdListintegerGET /appointments/report

to be returned following a GET report call

startDatestringGET /appointments/reportDisplays the start date of appointments to be returned following a GET report call, formatted as YYYY-MM-DD. 
locationIdListintegerGET /appointments/reportDisplays a comma-separated list of locationIds connected to the appointments you want returned following a GET report call.
statusListstring GET /appointments/reportDisplays 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. 
waitListIdsstring

PUT /appointments/{appointmentId}

Displays a comma-separated list of waitListIds to be invited to claim the spot of a cancelled appointment.
overrideintegerPOST /appointments

.





Time Off API Responses



Code Block
languagejs
titleGET /timeOff/{timeOffId}
linenumberstrue
collapsetrue
{
    "businessId": 43111,
    "color":
    "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-see services API page},
    "recurringAppointmentId": null,
    "staff": {Staff object for staff with time off-see staff API page},
    "startDate": "2018-10-01",
    "startTime": 1100,
    "status": "Open",
    "timeOffId": 17360947
}


Code Block
languagejs
titlePUT /timeOff/{timeOffId}
linenumberstrue
collapsetrue
{
    "appliesTo": "staff",
    "businessId": 43111,
    "color": null,
    "createdDate": "2018-08-03 14:39:38",
    "createdUser": "JoeSchmo",
    "description": "Need a longer break!",
    "endDate": "2018-10-01",
    "endTime": "1400",
    "modifiedDate": "2018-08-07 11:34:56",
    "modifiedUser": "JoeSchmo",
    "note": "Need a longer break!",
    "originalStartDate": "2018-10-01",
    "reason": {Reason object for reason of time off-see services API page},
    "recurringAppointmentId": null,
    "staff": {Staff object for staff with time off-see staff API page},
    "staffId": 80891,
    "startDate": "2018-10-01",
    "startTime": "1100",
    "status": "1100",
    "timeOffId": 17360947
}





Time Off Object Values


Property nameTypeDescription
businessIdintegerProvides unique numeric ID of the business offering availability. (Required)
colorstringDisplays any color chosen to override specified time off on the backoffice calendar.
createdDatestring

Displays as date specified time off was created as YYYY-MM-DD with time after. (Required)

createdUserstringDisplays the username of user who created specified time off. (Required)
descriptionstringDisplays any description that was added to time off profile.
endDatestringDisplays the date that specified time off is set to end.
endTimeintegerDisplays as military time that specified session ends. (Required)
modifiedDatestringDisplays as date specified time off was last modified as YYYY-MM-DD with time after.
modifiedUserstringDisplays the username of user who last modified specified time off.
reasonobjectDisplays the reason object connected to specified time off.
recurringAppointmentIdintegerIf specified time off is part of a repeating appointment series, then this provides unique numeric ID of that repeating appointment series.
staffobjectDisplays the staff object connected to specified time off.
startDatestringDisplays the date that specified time off is set to begin.
startTimeintegerDisplays as military time that specified session is set to begin. (Required)
statusstring
timeOffIdinteger