Versions Compared

Key

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

Anchor
topOfPage
topOfPage
The Calendar API is used to access the different events that appear on the calendar of upcoming appointments on your business' account. 

You can either build your own calendar to display events or use a third-party plugin to make calls to the calendar API to show appointment, class session, and time off events in a calendar format


Info
titleOn this page

Table of Contents





Calendar API Endpoints


These are the endpoints that are available under the /calendar path, which lists all the different events you have scheduled on your business' calendar.

Endpoint

Description

GET /calendar/range/{staffIdList}Return events as determined by the parameters that get passed in the URL in array format. The staffIdList is passed in the URL as a comma-separated list of staff IDs.
GET /calendar/event/{eventType}/{eventId}Returns an array of 1 event object. Possible values for eventType include "APPOINTMENT", "CLASS", "TIME_OFF", and "VACATION".





Calendar API Parameters

Data points passed on in the request URL portion of the API call that are used to filter the data being requested. 

Parameter

TypeRequiredEndpoints to be used with

Description

endDatestringYesGET /calendar/range/{staffIdList}Should be set as the end date of the calendar range to be displayed - formatted as YYYY-MM-DD. 
hideEmptyClassesinteger
GET /calendar/range/{staffIdList}Can be set to 0 or 1; if set to 0 then classes with no attendees WILL return, if set to 0 then classes with no attendees WILL NOT return.
locationGroupIdListinteger array
GET /calendar/range/{staffIdList}Should be set as a comma-separated list of locationGroupIds connected to the events you want returned.
locationIdListinteger array
GET /calendar/range/{staffIdList}Should be set as a comma-separated list of locationIds connected to the events you want returned.
serviceIdListinteger array
GET /calendar/range/{staffIdList}Should be set as a comma-separated list of reasonIds connected to the events you want returned.
showBufferboolean
GET /calendar/range/{staffIdList}, GET /calendar/{eventType}/{eventId}If set to true, the GET call will return events that reflect the startTime and endTime properties. If set to false, the GET call will return events that reflect the clientStartTime and clientEndTime properties.
showPaidinteger
GET /calendar/range/{staffIdList}Can be set to 0 or 1; if set to 0, the backend will check whether or not the appointment has been assigned to an invoice and if that invoice is closed which will set the paid boolean property of the calendar event object to true or false conditionally. If it is set to 0, then there is no check on the backend and the paid property will just always return as false.
showTimeOffboolean
GET /calendar/range/{staffIdList}If set to true, GET calls will return events of eventType = TIME_OFF. If set to false, GET calls will not return these events. 
startDatestring
GET /calendar/range/{staffIdList}Should be set as the start date of the calendar range to be displayed - formatted as YYYY-MM-DD. 
statusListstring array
GET /calendar/range/{staffIdList}Should be set as a comma-separated list of appointment subStatuses to be displayed. Should be sent to endpoint as they are directly stored in the database as retrieved from the GET status endpoint - for more info, see Status API page.





Calendar API Responses


Code Block
languagejs
titleGET /calendar/range/{staffIdList}
linenumberstrue
collapsetrue
[{
    "allDay": false,
    "appointmentType": "CLASS",
    "attendees": ["Jonny Beok", "Simon Sez", "Jimmy Begood", "Jim Brown", "Jane Deer", "Jay Kay"],
    "color": "#668CD9",
    "end": "Thu Jan 31 2019 12:00:00 UTC+0000",
    "endDateTimeUTC": "Thu Jan 31 2019 12:00:00 UTC+0000",
    "id": 34432800,
    "paid": false,
    "readOnly": false,
    "recurringAppointmentId": null,
    "start": "Thu Jan 31 2019 09:00:00 UTC+0000",
    "startDateTimeUTC": "Thu Jan 31 2019 09:00:00 UTC+0000",
    "status": "OPEN",
    "subStatus": "OPEN",
    "title": "[6/8] Fox Taming Jonny Beok↵Simon Sez↵Jimmy Begood↵Jim Brown↵Jane Deer↵Jay Kay",
    "uninvoiced": false
}]


Code Block
languagejs
titleGET /calendar/event/{eventType}/{eventId}
linenumberstrue
collapsetrue
[{
    "allDay": false,
    "appointmentType": "APPOINTMENT",
    "attendees": null,
    "color": "#668CD9",
    "end": "Thu Jan 31 2019 11:00:00 UTC+0000",
    "endDateTimeUTC": "Thu Jan 31 2019 11:00:00 UTC+0000",
    "id": 18750296,
    "paid": false,
    "readOnly": false,
    "recurringAppointmentId": 148121,
    "start": "Thu Jan 31 2019 10:00:00 UTC+0000",
    "startDateTimeUTC": "Thu Jan 31 2019 10:00:00 UTC+0000",
    "status": "OPEN",
    "subStatus": "CHECKEDIN",
    "title": "Jane Deer for Dog Training with Mr. Biscuits",
    "uninvoiced": false
}]





Calendar Object Values


Property nameTypeDescription
allDaybooleanIndicates whether or not the specified event is set as an all day event on your appointments calendar.
appointmentTypestringDisplays as the appointment type of the specified event. Has available options "APPOINTMENT", "CLASS", "TIME_OFF", and "VACATION".
attendeesarrayDisplays as an array of all the class attendees for the specified event - this array only gets filled for events of appointmentType = CLASS.
colorstringDisplays as the hexadecimal code representing the color used to show the specified event.
endstringDisplays as when the specified event is set to end - takes the form of a js date object.
endDateTimeUTCstringDisplays as when the specified event is set to end - takes the form of a js date object.
idintegerProvides a unique numeric ID for the specified event.
paidbooleanIndicates whether or not the specified event has been assigned to an invoice that is set to a status of CLOSED.
readOnlybooleanIndicates whether or not the specified event is classified as read only and thus cannot be edited. This typically occurs when an event is created using one of the third-party plugins.
recurringAppointmentIdintegerIf the specified event makes up part of a recurring appointment series, this property displays as the ID of that series.
startstringDisplays as when the specified event is set to start - takes the form of a js date object.
startDateTimeUTCstringDisplays as when the specified event is set to start - takes the form of a js date object.
statusstringDisplays as the status of the specified event.
subStatusstringDisplays as the substatus of the specified event.
titlestringDisplays as the title of the specified event - by default takes the form "(Client name) for (service name) with (staff name)".
uninvoicedbooleanIndicates whether or not the specified event is uninvoiced.