API Documentation

API Endpoint

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:

Holiday Calendar diagram

Supported filter params

  • id

Supported sort params

  • id
GET /api/v2/holiday_calendars
Requestsreturns holiday calendars

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
Responses200
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 calendars
GET/api/v2/holiday_calendars


GET /api/v2/holiday_calendars/1
Requestsreturns holiday calendar

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
Responses200
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 calendar
GET/api/v2/holiday_calendars/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday calendar id


POST /api/v2/holiday_calendars
Requestscreates a holiday calendarreturns error

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
    }
  }
}
Responses201
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": {}
  }
}
Responses422
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 calendar
POST/api/v2/holiday_calendars

URI Parameters
HideShow
name
string (required) Example: Name

holiday calendar name

country
string (required) Example: USA

holiday calendar country

state
string (optional) Example: New+York

holiday calendar state

autogenerate_holidays
boolean (optional) Example: true

are holidays going to be automatically generated


PATCH /api/v2/holiday_calendars/1
Requestsupdates holiday calendarreturns error

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"
    }
  }
}
Responses200
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
    }
  }
}
Responses422
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 calendar
PATCH/api/v2/holiday_calendars/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday calendar id


DELETE /api/v2/holiday_calendars/1
Requestsdeletes a holiday calendar

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
Responses204
This response has no content.

Deletes a holiday calendar
DELETE/api/v2/holiday_calendars/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday calendar id


Generated by aglio on 21 Jul 2025