Vacation

The Vacation API is used to access, create, and modify the periods of vacation taken on your business' account. The Vacation API is connected to the Locations API, as periods of vacation are used to close a location for a company-wide period of time off, whereas the Time Off API is used by staff to take time off at an individual level.


On this page




Vacation API Endpoints

These are the endpoints that are available under the /vacation path, which shows what hours your locations have been closed down for a vacation. 

Endpoint

Description

GET /vacation/{vacationId}Returns a JSON object for the specified vacation.
POST /vacation

Creates a new vacation object on an account.

Request body/payload: Must pass a vacation object.

For these calls, you need to pass a vacation 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 vacation object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

PUT /vacation/{vacationId}

Updates an existing vacation object.

Request body/payload: Must pass a vacation object with the desired changes made.

For these calls, you need to pass a vacation 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 vacation object in the responses section below and have indicated the required fields in the object values table at the bottom of this page.

DELETE /vacation/{vacationId}Removes a vacation object from view by setting its active property to false




Vacation API Parameters

There are no parameters included with vacation calls.




Vacation API Request Body/Payloads


The objects below represent the minimum viable objects to pass that are needed to create or update a vacation 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.

POST /vacation
{
    "businessId": "43111",
    "endDate": "2019-02-14",
    "endTime": "2400",
    "location": {Location object for location of vacation - for more info, see Locations API page},
    "reason": {Reason object for reason of vacation - for more info, see Services API page},
    "repeats": false,
    "staff": null,
    "startDate": "2019-02-14",
    "startTime": "0000",
    "status": "Open"
}
PUT /vacation
{
    "appliesTo": "location",
    "assignedTo": "select",
    "businessId": 43111,
    "color": null,
    "createdDate": "2023-10-11 15:56:08",
    "createdUser": "JoeSchmo",
    "description": null,
    "endDate": "2023-10-11",
    "endTime": 2400,
    "location": {Location object for location of vacation - for more info, see Locations API page},
    "locationGroup": {Groups object for location group of vacation - for more info, see Groups API page},
    "modifiedDate": "2023-10-11 15:56:08",
    "modifiedUser": null,
    "reason": {Reason object for reason of vacation - for more info, see Services API page},
    "repeats": false,
    "staff": null,
    "startDate": "2023-10-11",
    "startTime": 0,
    "status": "Open",
    "vacationId": 8246670
}




Vacation API Responses

GET /vacation/{vacationId}
{
    "businessId": 43111,
    "color": null,
    "createdDate": "2018-05-16 11:25:44",
    "createdUser": "JoeSchmo",
    "description": null,
    "endDate": "2018-08-20",
    "endTime": 2400,
    "location": {Location object for location of vacation - for more info, see Locations API page},
    "modifiedDate": "2018-07-11 15:56:08",
    "modifiedUser": "JoeSchmo",
    "reason": {Reason object for reason of vacation - for more info, see Services API page},
    "staff": null,
    "startDate": "2018-08-06",
    "startTime": 0,
    "status": "Open",
    "vacationId": 8077468
}
POST /vacation
{
    "businessId": "43111",
    "color": null,
    "createdDate": null,
    "createdUser": null,
    "description": null,
    "endDate": "2019-01-04",
    "endTime": 2400,
    "location": {Location object for location of vacation - for more info, see Locations API page},
    "modifiedDate": null,
    "modifiedUser": null,
    "reason": {Reason object for reason of vacation - for more info, see Services API page},
    "staff": null,
    "startDate": "2018-12-24",
    "startTime": 0,
    "status": "Open",
    "vacationId": 808042
}
PUT /vacation/{vacationId}
{
    "businessId": 43111,
    "color": "#4C8052",
    "createdDate": "2018-06-07 13:17:44",
    "createdUser": "JoeSchmo"
    "description": "Take some time to be with your families.",
    "endDate": "2018-08-27",
    "endTime": 2400,
    "location": {Location object for location of vacation-see locations API page},
    "modifiedDate": "2018-07-21 12:45:09",
    "modifiedUser": "JoeSchmo"
    "reason": {Reason object for reason of vacation-see services API page},
    "staff": null,
    "startDate": "2018-08-06",
    "startTime": 0,
    "status": "Open",
    "vacationId": 8077468
}




Vacation Object Values

Property nameTypeRequiredWritableDescription
businessIdintegerYes
Provides unique numeric ID of the business offering the specified vacation. 
colorstring
YesDisplays any color chosen to override the specified vacation on the backoffice calendar.
createdDatestring

Displays as the date the specified vacation was created as YYYY-MM-DD with time after.

createdUserstring

Displays the username of the user who created the specified vacation.
descriptionstring
YesDisplays any description that was added to the specified vacation.
endDatestringYesYesProvides the date that the specified vacation is set to end as YYYY-MM-DD.
endTimeintegerYesYesProvides the time that the specified vacation is set to end displayed in military format. Automatically gets set to 2400. 
modifiedDatestring

Displays as the date the specified vacation was last modified as YYYY-MM-DD with time after.
modifiedUserstring

Displays the username of the user who last modified the specified vacation.
reasonobjectYesYesDisplays the reason object connected to the specified vacation - for more info, see Services API page. 
staffobject
YesDisplays the staff object connected to the specified vacation - for more info, see Staff API page. 
startDatestringYesYesProvides the date that the specified vacation is set to begin as YYYY-MM-DD.
startTimeintegerYesYes

Provides the time that the specified vacation is set to begin displayed in military format. Automatically gets set to 0.

statusstringYesYesDisplays the status of the specified vacation. Possible values include Open, Closed, or Cancelled.
vacationIdintegerYes, on PUT calls
Provides unique numeric ID of the specified vacation.