v1

latestOpenAPI 3.1.02026-07-26549156879.0 KB
Timeoff > BlockedPeriod

Updates a Blocked period

Updates a blocked period

put/api/2026-07-01/resources/timeoff/blocked_periods/{id}

Path parameters

idstring required

Request body

idstring required
namestring required

Name of the blocked period.

leave_type_idsstring[] required

List of leave type identifiers for which employees can not request timeoff edited

strategystring required

Type of access group

membersstring[]

List of employees manually selected

querystring
team_idsstring[]

List of team identifiers which the selected employees belong to

location_idsstring[]

List of locations workplace identifiers where the employees are located

legal_entity_idsstring[]

List of legal entity identifiers which the selected employees belong to

Example request

{
  "name": "Onboarding period edited",
  "leave_type_ids": [
    "1",
    "2"
  ],
  "time_periods_attributes": [
    {
      "name": "Product offsite updated",
      "period_type": "by_contract_start_date",
      "duration": 2,
      "duration_unit": "months",
      "start_on": "2024-01-02",
      "finish_on": "2024-02-28"
    }
  ],
  "strategy": "fqlmultiselect",
  "members": [
    "25",
    "22",
    "23"
  ],
  "team_ids": [
    "1",
    "2"
  ],
  "location_ids": [
    "1",
    "2"
  ],
  "legal_entity_ids": [
    "1",
    "2"
  ]
}

Response

OK

idstring required

Unique identifier of the blocked period

company_idstring required

Company id of the blocked period

namestring required

Name of the blocked period.

leave_type_idsstring[] required

Leave types for which absence request has been blocked

strategystring required

Type of access group

membersstring[] required

Employees whose timeoff will be affected

location_idsstring[]

List of locations workplace identifiers where the employees are located

team_idsstring[]

List of team identifiers which the selected employees belong to

legal_entity_idsstring[]

List of legal entity identifiers which the selected employees belong to

Example response

{
  "id": "1",
  "company_id": "1",
  "name": "Onboarding period",
  "leave_type_ids": [
    "1",
    "2"
  ],
  "time_periods": [
    {
      "name": "Product offsite",
      "period_type": "by_contract_start_date",
      "duration": 2,
      "duration_unit": "months",
      "start_on": "2024-01-01",
      "finish_on": "2024-02-28"
    }
  ],
  "strategy": "everyone",
  "members": [
    "1",
    "2"
  ],
  "location_ids": [
    "1",
    "2"
  ],
  "team_ids": [
    "1",
    "2"
  ],
  "legal_entity_ids": [
    "1",
    "2"
  ]
}