Skip to content

Holidays

Holidays API

Find public holidays for employee in dates range.

Request

Find public holidays for employee in dates range.

Expect error codes:

  1. INVALID_EMPLOYEE - when invalid employee id provided
  2. INVALID_DATE_FROM - when invalid time in filter provided
  3. INVALID_DATE_TO - when invalid time in filter provided

Security
basicAuth
Bodyapplication/json
employeestringrequired

Employee e-mail or login

Example:"john.white@mycompany.com"
fromstring, (date)required

Start date of dates range to search in ISO format

Example:"2017-01-10"
tostring, (date)required

End date of dates range to search in ISO format

Example:"2017-01-15"
curl -i -X POST \
  -u '<username>:<password>' \
  https://awesome-company.calamari.io/api/holiday/v1/find \
  -H 'Content-Type: application/json' \
  -d '{
    "employee": "john.white@mycompany.com",
    "from": "2017-01-10",
    "to": "2017-01-15"
  }'

Responses

successful operation

Bodyapplication/json
Array [
namestringrequired

Public holiday name

Example:"Holiday name"
startstring, (date)required

First day of the holiday

Example:"2017-02-20"
endstring, (date)required

Last day of the holiday

Example:"2017-02-20"
halfDaybooleanrequired

Half day holiday

halfdayPeriodstringrequired

If halfDay is true halfdayPeriod tells which part of day is non-working

Enum:"AM""PM"
]
Response
[ { "name": "Holiday name", "start": "2017-02-20", "end": "2017-02-20", "halfDay": true, "halfdayPeriod": "AM" } ]