API Documentation
Holiday calendars ¶
Holiday calendars ¶
For more details on how to work with holiday calendars and holidays, please refer to Holidays Settings article. Holiday calendar is an entity that represents an outer container for multiple holidays. Holidays within the calendar define the persons availability and capacity on a particular date. For more details on how to work with holidays, please refer to Holidays documentation. A holiday calendar is associated with person’s cost rate (salary). Each cost rate has exactly one holiday calendar. You can find more about relationship between cost rates and holiday calendars in our help documentation: Understanding and Setting Up Cost Rates in Productive.
The following diagram shows holiday calendars in our data hierarchy:
Supported filter params
- id
Supported sort params
- id
GET /api/v2/holiday_calendars
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "102",
"type": "holiday_calendars",
"attributes": {
"name": "Croatian calendar",
"country": "Croatia",
"state": null,
"autogenerate_holidays": true
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "595"
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/holiday_calendars?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/holiday_calendars?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get all holiday calendarsGET/api/v2/holiday_calendars
GET /api/v2/holiday_calendars/103
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "103",
"type": "holiday_calendars",
"attributes": {
"name": "Croatian calendar",
"country": "Croatia",
"state": null,
"autogenerate_holidays": true
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "596"
}
}
}
},
"meta": {}
}
Get a holiday calendarGET/api/v2/holiday_calendars/{id}
- id
number
(required) Example: 1holiday calendar id
POST /api/v2/holiday_calendars
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "holiday_calendars",
"attributes": {
"name": "Croatian calendar",
"country": "Croatia",
"autogenerate_holidays": true
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "105",
"type": "holiday_calendars",
"attributes": {
"name": "Croatian calendar",
"country": "Croatia",
"state": null,
"autogenerate_holidays": true
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "597"
}
}
}
},
"meta": {}
}
POST /api/v2/holiday_calendars
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "holiday_calendars",
"attributes": {}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Create a holiday calendarPOST/api/v2/holiday_calendars
- name
string
(required) Example: Nameholiday calendar name
- country
string
(required) Example: USAholiday calendar country
- state
string
(optional) Example: New+Yorkholiday calendar state
- autogenerate_holidays
boolean
(optional) Example: trueare holidays going to be automatically generated
PATCH /api/v2/holiday_calendars/107
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "holiday_calendars",
"attributes": {
"name": "Serbian calendar"
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "107",
"type": "holiday_calendars",
"attributes": {
"name": "Serbian calendar",
"country": "Croatia",
"state": null,
"autogenerate_holidays": true
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "599"
}
}
}
},
"meta": {}
}
PATCH /api/v2/holiday_calendars/108
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "holiday_calendars",
"attributes": {
"name": null
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Update a holiday calendarPATCH/api/v2/holiday_calendars/{id}
- id
number
(required) Example: 1holiday calendar id
DELETE /api/v2/holiday_calendars/109
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Deletes a holiday calendarDELETE/api/v2/holiday_calendars/{id}
- id
number
(required) Example: 1holiday calendar id
Generated by aglio on 21 Jul 2025