Employment Hero LogoEmployment Hero

Public Holiday Calendar

This endpoint retrieves a paginated list of public holiday calendars for the organisation.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars

Path Parameters

organisation_iduuidrequired

The ID of the organisation (UUID).

Query Parameters

yearinteger

Only return calendars for this year.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100

Response Body

A JSON object with a data property that contains an array of public holiday calendar objects and pagination information.

dataobject
itemsobject[]
iduuid

Unique identifier for the public holiday calendar.

namestring

Name of the public holiday calendar.

yearinteger

The year the calendar covers.

typeenum<string>

Whether the calendar is created from a template (standard) or has holidays defined by you (custom).

template_iduuid

Unique identifier of the template the calendar was created from. Null for custom calendars.

exclude_part_time_employeeboolean

Whether part-time employees are excluded from the public holidays in this calendar.

work_locationsobject[]

Work locations the calendar applies to.

work_sitesobject[]

Work sites the calendar applies to.

public_holidaysobject[]

Public holidays in the calendar.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100
total_itemsnumber

Total items

total_pagesnumber

Total pages

Example

curl -X GET \  "https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"

Response

{  "data": {    "items": [      {        "id": "3f2b8c1e-5a47-4d0e-9b61-2c7d8e9f0a12",        "name": "Australia 2027",        "year": 2027,        "type": "standard",        "template_id": "8a1d4e6f-2b3c-4a5d-9e7f-0123456789ab",        "exclude_part_time_employee": false,        "work_locations": [          {            "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",            "name": "Sydney Office",            "country": "Australia"          }        ],        "work_sites": [          {            "id": "d5e6f7a8-b9c0-4d1e-9f2a-3b4c5d6e7f80",            "name": "Sydney CBD"          }        ],        "public_holidays": [          {            "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8091",            "name": "New Year's Day",            "date": "2027-01-01"          },          {            "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2",            "name": "Australia Day",            "date": "2027-01-26"          }        ]      },      {        "id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d",        "name": "Company Holidays 2027",        "year": 2027,        "type": "custom",        "template_id": null,        "exclude_part_time_employee": true,        "work_locations": [          {            "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",            "name": "Sydney Office",            "country": "Australia"          }        ],        "work_sites": [],        "public_holidays": [          {            "id": "1b2c3d4e-5f6a-4b7c-9d8e-9f0a1b2c3d4e",            "name": "Founders Day",            "date": "2027-03-15"          }        ]      }    ],    "page_index": 1,    "item_per_page": 20,    "total_items": 2,    "total_pages": 1  }}

This endpoint retrieves a single public holiday calendar.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/:calendar_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation (UUID).

calendar_iduuidrequired

The ID of the public holiday calendar (UUID).

Response Body

Returns the public holiday calendar object.

dataobject
iduuid

Unique identifier for the public holiday calendar.

namestring

Name of the public holiday calendar.

yearinteger

The year the calendar covers.

typeenum<string>

Whether the calendar is created from a template (standard) or has holidays defined by you (custom).

template_iduuid

Unique identifier of the template the calendar was created from. Null for custom calendars.

exclude_part_time_employeeboolean

Whether part-time employees are excluded from the public holidays in this calendar.

work_locationsobject[]

Work locations the calendar applies to.

work_sitesobject[]

Work sites the calendar applies to.

public_holidaysobject[]

Public holidays in the calendar.

Example

curl -X GET \  "https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/:calendar_id" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"

Response

{  "data": {    "id": "3f2b8c1e-5a47-4d0e-9b61-2c7d8e9f0a12",    "name": "Australia 2027",    "year": 2027,    "type": "standard",    "template_id": "8a1d4e6f-2b3c-4a5d-9e7f-0123456789ab",    "exclude_part_time_employee": false,    "work_locations": [      {        "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",        "name": "Sydney Office",        "country": "Australia"      }    ],    "work_sites": [      {        "id": "d5e6f7a8-b9c0-4d1e-9f2a-3b4c5d6e7f80",        "name": "Sydney CBD"      }    ],    "public_holidays": [      {        "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8091",        "name": "New Year's Day",        "date": "2027-01-01"      },      {        "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2",        "name": "Australia Day",        "date": "2027-01-26"      }    ]  }}

This endpoint creates a standard calendar from a template, or a custom calendar with your own holidays.

POST
https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars

Path Parameters

organisation_iduuidrequired

The ID of the organisation (UUID).

Request Body

typeenum<string>

Calendar type. Defaults to standard. A standard calendar is created from a template; a custom calendar has holidays supplied by you.

namestringrequired

Name of the calendar. Must be unique among the calendars of the organisation for the same year.

work_location_idsuuid[]required

IDs of the work locations (UUIDs) the calendar applies to. Cannot be empty.

work_site_idsuuid[]

IDs of the work sites (UUIDs) the calendar applies to.

exclude_part_time_employeeboolean

Whether part-time employees are excluded from the public holidays in this calendar.

template_iduuid

Required for standard calendars. Must be one of the IDs returned by the Get Public Holiday Calendar Templates endpoint for the organisation's country.

disabled_public_holiday_idsuuid[]

IDs of template public holidays (UUIDs) to disable in a standard calendar.

yearinteger

The year the calendar covers. Used for custom calendars.

public_holidaysobject[]

Public holidays for a custom calendar.

Response Body

Returns HTTP 201 Created with the created public holiday calendar object.

dataobject
iduuid

Unique identifier for the public holiday calendar.

namestring

Name of the public holiday calendar.

yearinteger

The year the calendar covers.

typeenum<string>

Whether the calendar is created from a template (standard) or has holidays defined by you (custom).

template_iduuid

Unique identifier of the template the calendar was created from. Null for custom calendars.

exclude_part_time_employeeboolean

Whether part-time employees are excluded from the public holidays in this calendar.

work_locationsobject[]

Work locations the calendar applies to.

work_sitesobject[]

Work sites the calendar applies to.

public_holidaysobject[]

Public holidays in the calendar.

Example

curl -X POST \  "https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \  -H "Content-Type: application/json" \  -d '{    "type": "custom",    "name": "Company Holidays 2027",    "work_location_ids": [      "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f"    ],    "work_site_ids": [],    "exclude_part_time_employee": true,    "year": 2027,    "public_holidays": [      {        "name": "Founders Day",        "date": "2027-03-15"      }    ]  }'

Response

{  "data": {    "id": "3f2b8c1e-5a47-4d0e-9b61-2c7d8e9f0a12",    "name": "Australia 2027",    "year": 2027,    "type": "standard",    "template_id": "8a1d4e6f-2b3c-4a5d-9e7f-0123456789ab",    "exclude_part_time_employee": false,    "work_locations": [      {        "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",        "name": "Sydney Office",        "country": "Australia"      }    ],    "work_sites": [      {        "id": "d5e6f7a8-b9c0-4d1e-9f2a-3b4c5d6e7f80",        "name": "Sydney CBD"      }    ],    "public_holidays": [      {        "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8091",        "name": "New Year's Day",        "date": "2027-01-01"      },      {        "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2",        "name": "Australia Day",        "date": "2027-01-26"      }    ]  }}

This endpoint updates a calendar.

Note

Holidays can only be added, changed or removed on a custom calendar. For a standard calendar, use enabled_public_holiday_ids and disabled_public_holiday_ids to enable or disable template holidays.

PATCH
https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/:calendar_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation (UUID).

calendar_iduuidrequired

The ID of the public holiday calendar to update (UUID).

Request Body

namestring

New name of the calendar. Must be unique among the calendars of the organisation for the same year.

work_location_idsuuid[]

IDs of the work locations (UUIDs) the calendar applies to. Cannot be empty.

work_site_idsuuid[]

IDs of the work sites (UUIDs) the calendar applies to.

exclude_part_time_employeeboolean

Whether part-time employees are excluded from the public holidays in this calendar.

enabled_public_holiday_idsuuid[]

IDs of public holidays (UUIDs) to enable. A holiday cannot be in both enabled_public_holiday_ids and disabled_public_holiday_ids.

disabled_public_holiday_idsuuid[]

IDs of public holidays (UUIDs) to disable. A holiday cannot be in both enabled_public_holiday_ids and disabled_public_holiday_ids.

public_holidaysobject[]

Holidays to add, change or remove. Only allowed on a custom calendar.

Response Body

Returns HTTP 200 OK with the updated public holiday calendar object.

dataobject
iduuid

Unique identifier for the public holiday calendar.

namestring

Name of the public holiday calendar.

yearinteger

The year the calendar covers.

typeenum<string>

Whether the calendar is created from a template (standard) or has holidays defined by you (custom).

template_iduuid

Unique identifier of the template the calendar was created from. Null for custom calendars.

exclude_part_time_employeeboolean

Whether part-time employees are excluded from the public holidays in this calendar.

work_locationsobject[]

Work locations the calendar applies to.

work_sitesobject[]

Work sites the calendar applies to.

public_holidaysobject[]

Public holidays in the calendar.

Example

curl -X PATCH \  "https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/:calendar_id" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \  -H "Content-Type: application/json" \  -d '{    "name": "Company Holidays 2027",    "work_location_ids": [      "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f"    ],    "public_holidays": [      {        "id": "1b2c3d4e-5f6a-4b7c-9d8e-9f0a1b2c3d4e",        "date": "2027-03-16"      },      {        "name": "Team Day",        "date": "2027-06-01"      }    ]  }'

Response

{  "data": {    "id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d",    "name": "Company Holidays 2027",    "year": 2027,    "type": "custom",    "template_id": null,    "exclude_part_time_employee": true,    "work_locations": [      {        "id": "c4d5e6f7-a8b9-4c0d-8e1f-2a3b4c5d6e7f",        "name": "Sydney Office",        "country": "Australia"      }    ],    "work_sites": [],    "public_holidays": [      {        "id": "1b2c3d4e-5f6a-4b7c-9d8e-9f0a1b2c3d4e",        "name": "Founders Day",        "date": "2027-03-15"      }    ]  }}

This endpoint deletes a public holiday calendar.

DELETE
https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/:calendar_id

Path Parameters

organisation_iduuidrequired

The ID of the organisation (UUID).

calendar_iduuidrequired

The ID of the public holiday calendar to delete (UUID).

Response Body

Returns HTTP 204 No Content on success. No response body is included.

Example

curl -X DELETE \  "https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/:calendar_id" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"

Response

This endpoint does not return a response body.

This endpoint retrieves the public holiday calendar templates available for creating a standard calendar.

GET
https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/templates

Path Parameters

organisation_iduuidrequired

The ID of the organisation (UUID).

Query Parameters

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100

Response Body

A JSON object with a data property that contains the public holiday calendar templates available for the organisation's country.

dataobject
itemsobject[]
iduuid

Unique identifier for the template.

namestring

Name of the template.

yearinteger

The year the template covers.

public_holidaysobject[]

Public holidays in the template.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100
total_itemsnumber

Total items

total_pagesnumber

Total pages

Example

curl -X GET \  "https://api.employmenthero.com/api/v1/organisations/:organisation_id/public_holiday_calendars/templates" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"

Response

{  "data": {    "items": [      {        "id": "8a1d4e6f-2b3c-4a5d-9e7f-0123456789ab",        "name": "Australia 2027",        "year": 2027,        "public_holidays": [          {            "id": "e6f7a8b9-c0d1-4e2f-8a3b-4c5d6e7f8091",            "name": "New Year's Day",            "date": "2027-01-01"          },          {            "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2",            "name": "Australia Day",            "date": "2027-01-26"          }        ]      }    ],    "page_index": 1,    "item_per_page": 20,    "total_items": 1,    "total_pages": 1  }}