API Documentation

API Endpoint

Holidays

Holidays

For more details on how to work with holidays please refer to: Holidays Settings.
The Holiday entity represents a specific holiday that can be defined within the holiday calendar. One holiday calendar includes multiple holidays. The primary function of the holiday entity is to define an employee’s availability on a specific calendar date based on their defined cost rate (Salary entity).

You can find out more about how holidays affect availability and capacity in our Help article: Capacity vs. Availability: What You Need To Know

The following diagram shows holidays in our data hierarchy:

Holiday diagram

Supported filter params

  • id

  • after

  • before

  • holiday_calendar_id

Supported sort params

  • id
GET /api/v2/holidays
Requestsreturns holidays

GET  /api/v2/holidays

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": "4",
      "type": "holidays",
      "attributes": {
        "name": "International Goof Off Day",
        "date": "2025-05-20"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "598"
          }
        },
        "holiday_calendar": {
          "meta": {
            "included": false
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "5",
      "type": "holidays",
      "attributes": {
        "name": "International Goof Off Day",
        "date": "2025-05-20"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "598"
          }
        },
        "holiday_calendar": {
          "meta": {
            "included": false
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "6",
      "type": "holidays",
      "attributes": {
        "name": "International Goof Off Day",
        "date": "2025-05-20"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "598"
          }
        },
        "holiday_calendar": {
          "meta": {
            "included": false
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/holidays?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/holidays?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get all holidays
GET/api/v2/holidays


GET /api/v2/holidays/1
Requestsreturns holiday

GET  /api/v2/holidays/7

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": "7",
    "type": "holidays",
    "attributes": {
      "name": "International Goof Off Day",
      "date": "2025-05-20"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "599"
        }
      },
      "holiday_calendar": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Get a holiday
GET/api/v2/holidays/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday id


POST /api/v2/holidays
Requestscreates the holidayreturns error

POST  /api/v2/holidays

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": "holidays",
    "attributes": {
      "name": "Dont Cry over Spilled Milk Day",
      "date": "2017-02-11",
      "holiday_calendar_id": 113
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "13",
    "type": "holidays",
    "attributes": {
      "name": "Dont Cry over Spilled Milk Day",
      "date": "2017-02-11"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "600"
        }
      },
      "holiday_calendar": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Create a holiday
POST/api/v2/holidays

URI Parameters
HideShow
name
string (required) Example: Name

name

date
date (required) Example: 2018-01-01

date


PATCH /api/v2/holidays/1
Requestsupdats holidayreturns error

PATCH  /api/v2/holidays/17

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": "holidays",
    "attributes": {
      "name": "Lame Duck Day",
      "date": "2017-02-06",
      "holiday_calendar_id": 115
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "17",
    "type": "holidays",
    "attributes": {
      "name": "Lame Duck Day",
      "date": "2017-02-06"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "602"
        }
      },
      "holiday_calendar": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Update a holiday
PATCH/api/v2/holidays/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday id


DELETE /api/v2/holidays/1
Requestsdeletes a holiday

DELETE  /api/v2/holidays/23

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
DELETE/api/v2/holidays/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday id


Generated by aglio on 20 May 2025