{"openapi":"3.0.3","info":{"title":"Holidays API","version":"2.0.0","description":"Read API for the public and company holidays that apply to persons."},"servers":[{"url":"https://api.personio.de"}],"security":[{"BearerAuth":[]}],"tags":[{"name":"Holidays","description":"Endpoints to retrieve the public and company holidays that apply to persons."}],"paths":{"/v2/holidays":{"get":{"operationId":"listHolidays","summary":"List the holidays of persons.","description":"- This endpoint returns the holidays that apply to the given persons within a date range: one entry per person and date, from the holiday calendars assigned to each person (through their office or the company) on that date.\n- The `person.id`, `date.gte` and `date.lte` filters are required, except with `cursor`, which carries them to the next pages: recurring holidays have no end, so the date range bounds the result. It can start at most 2 years ago and end at most 1 year from today. Up to 50 persons per request. Filters are combined using the logical \"AND\" operator.\n- Results are grouped by person: sorted by person, then by date.\n- It supports cursor-based pagination.\n- This endpoint requires the personio:absences:read scope.\n","tags":["Holidays"],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"example":50},"description":"The maximum number of holidays returned per request."},{"in":"query","name":"cursor","example":"cur_82sQwR2eZvKilo2duNh219Kw","required":false,"schema":{"type":"string"},"description":"The pagination cursor to navigate over to the next list of resources. If you pass a specific limit to your  request, or you rely on the default value of the number of resources to be returned, then your subsequent call has to include the cursor in order to retrieve the next list of resources. If cursor is missing,  the first page is returned."},{"name":"person.id","in":"query","required":false,"schema":{"type":"array","maxItems":50,"items":{"type":"string"}},"description":"Filter results matching any of the provided persons' ids. Repeat the parameter for several persons, for example `person.id=123&person.id=456`. Up to 50 ids. Required unless `cursor` is given.\n","example":["123","456"]},{"name":"date.gte","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Matches holidays on or after (inclusive) the provided date, at most 2 years ago. Required unless `cursor` is given.\n","example":"2026-01-01"},{"name":"date.lte","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Matches holidays on or before (inclusive) the provided date, at most 1 year from today. Required unless `cursor` is given.\n","example":"2026-12-31"}],"x-path-examples":{"200 Valid request":{"value":"/papi/v2/holidays","query":"person.id=123&date.gte=2026-12-01&date.lte=2026-12-31"},"200 Valid request with limit":{"value":"/papi/v2/holidays","query":"person.id=123&date.gte=2026-12-01&date.lte=2026-12-31&limit=1"},"200 Valid request with cursor":{"value":"/papi/v2/holidays","query":"cursor=cur_234ls0f02lalfddabcdef=="},"400 Invalid Cursor":{"value":"/papi/v2/holidays","query":"cursor=invalid-cursor-string"},"400 Invalid filter":{"value":"/papi/v2/holidays","query":"person.id=123&date.gte=invalid&date.lte=2026-12-31"},"400 Missing filter":{"value":"/papi/v2/holidays","query":"date.gte=2026-01-01&date.lte=2026-12-31"},"403 Forbidden":{"value":"/papi/v2/holidays","query":"person.id=123&date.gte=2026-12-01&date.lte=2026-12-31"},"422 Inconsistent filter":{"value":"/papi/v2/holidays","query":"person.id=123&date.gte=2026-12-31&date.lte=2026-01-01"}},"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"description":"A page of holidays.","properties":{"_data":{"type":"array","description":"The holidays on this page.","items":{"$ref":"#/components/schemas/Holiday"}},"_meta":{"description":"This object represents the metadata information for an object. It's a set of arbitrary key/value attributes such as `links`.","type":"object","readOnly":true,"properties":{"links":{"type":"object","additionalProperties":{"description":"This objects represents a hyperlink.","type":"object","readOnly":true,"properties":{"href":{"type":"string","format":"uri"}},"additionalProperties":true},"example":{"links":{"self":{"href":"https://api.personio.de/v2/person?cursor=<current-cursor>"}}}}}}}},"examples":{"200 Valid request":{"$ref":"#/components/examples/ListHolidaysResponse"},"200 Valid request with limit":{"$ref":"#/components/examples/ListHolidaysWithLimitResponse"},"200 Valid request with cursor":{"$ref":"#/components/examples/ListHolidaysWithCursorResponse"}}}}},"400":{"description":"Bad request.","content":{"application/problem+json":{"schema":{"type":"object","description":"This object represents an error response.","properties":{"personio_trace_id":{"type":"string","example":"aswo3f-a202lfso-312123sld-1230ddd","description":"A unique ID that was created for this error."},"timestamp":{"type":"string","format":"date-time","example":"2021-05-28T11:17:30.000Z","description":"The timestamp of when the error occurred."},"errors":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","example":"Not found","description":"The title of the error."},"detail":{"type":"string","example":"The requested resource was not found.","description":"A short description about the error."},"type":{"type":"string","format":"uri","example":"https://developer.personio.de/reference/errors#common.requested_resource_not_found","description":"A link to the developer hub where more information can be found for the encountered error."},"_meta":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"examples":{"400 Invalid Cursor":{"$ref":"#/components/examples/InvalidCursor"},"400 Invalid filter":{"$ref":"#/components/examples/InvalidFilter"},"400 Missing filter":{"$ref":"#/components/examples/MissingFilter"}}}}},"403":{"$ref":"#/components/responses/ForbiddenErrorResponse"},"422":{"description":"Unprocessable content.","content":{"application/problem+json":{"schema":{"$ref":"#/paths/~1v2~1holidays/get/responses/400/content/application~1problem+json/schema"},"examples":{"422 Inconsistent filter":{"$ref":"#/components/examples/InconsistentFilter"}}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"examples":{"ListHolidaysResponse":{"value":{"_data":[{"id":"123:101810892:2026","person":{"id":"123"},"date":"2026-12-24","name":"Christmas Eve","duration":"SECOND_HALF","category":"CUSTOM"},{"id":"123:101810893:2026","person":{"id":"123"},"date":"2026-12-25","name":"Christmas Day","duration":"FULL_DAY","category":"PUBLIC"}],"_meta":{"links":{"self":{"href":"https://api.personio.de/v2/holidays?person.id=123&date.gte=2026-12-01&date.lte=2026-12-31"}}}}},"ListHolidaysWithLimitResponse":{"value":{"_data":[{"id":"123:101810892:2026","person":{"id":"123"},"date":"2026-12-24","name":"Christmas Eve","duration":"SECOND_HALF","category":"CUSTOM"}],"_meta":{"links":{"self":{"href":"https://api.personio.de/v2/holidays?person.id=123&date.gte=2026-12-01&date.lte=2026-12-31&limit=1"},"next":{"href":"https://api.personio.de/v2/holidays?cursor=cur_234ls0f02lalfdd"}}}}},"ListHolidaysWithCursorResponse":{"value":{"_data":[{"id":"123:101810894:2026","person":{"id":"123"},"date":"2026-12-31","name":"New Year's Eve","duration":"UNKNOWN_HALF","category":"CUSTOM"}],"_meta":{"links":{"self":{"href":"https://api.personio.de/v2/holidays?cursor=cur_234ls0f02lalfddabcdef=="},"next":{"href":"https://api.personio.de/v2/holidays?cursor=cur_234ls0f02lalfdd"}}}}},"InvalidFilter":{"value":{"personio_trace_id":"8b46fa09-d8fe-4de0-be03-f0a1d48df766","timestamp":"2026-11-03T11:17:30+00:00","errors":[{"title":"Bad Request","detail":"Failed to convert 'date.gte' with value: 'invalid'"}]}},"MissingFilter":{"value":{"personio_trace_id":"8b46fa09-d8fe-4de0-be03-f0a1d48df766","timestamp":"2026-11-03T11:17:30+00:00","errors":[{"title":"Bad Request","detail":"Query parameter 'person.id' is required."}]}},"InconsistentFilter":{"value":{"personio_trace_id":"8b46fa09-d8fe-4de0-be03-f0a1d48df766","timestamp":"2026-11-03T11:17:30+00:00","errors":[{"title":"Inconsistent filter","detail":"'date.gte' must not be after 'date.lte'."}]}},"InvalidCursor":{"value":{"personio_trace_id":"8b46fa09-d8fe-4de0-be03-f0a1d48df766","timestamp":"2026-11-03T11:17:30+00:00","errors":[{"title":"Invalid cursor","detail":"The provided cursor is not valid."}]}}},"schemas":{"PersonId":{"type":"object","description":"ID of a Person.","required":["id"],"properties":{"id":{"type":"string","description":"A unique identifier for a Person."}}},"Holiday":{"type":"object","description":"A holiday that applies to a person on a given date.","required":["id","person","date","duration","category"],"properties":{"id":{"type":"string","description":"A unique identifier for this holiday of this person."},"person":{"$ref":"#/components/schemas/PersonId"},"date":{"type":"string","format":"date","description":"The date of the holiday.","example":"2026-12-24"},"name":{"type":"string","description":"The name of the holiday.","example":"Christmas Eve"},"duration":{"type":"string","description":"Which part of the day the holiday covers.\n* FULL_DAY: The whole day.\n* FIRST_HALF: The first half of the day.\n* SECOND_HALF: The second half of the day.\n* UNKNOWN_HALF: Half of the day, but not which half. Holidays set up as half days before the part of the day could be chosen.\n","enum":["FULL_DAY","FIRST_HALF","SECOND_HALF","UNKNOWN_HALF"]},"category":{"type":"string","description":"Who defines the holiday.\n* PUBLIC: A public holiday, defined by the government or authorities.\n* CUSTOM: A holiday defined by the company.\n","enum":["PUBLIC","CUSTOM"]}}}},"responses":{"ForbiddenErrorResponse":{"description":"Access to this endpoint is denied.","content":{"application/problem+json":{"schema":{"$ref":"#/paths/~1v2~1holidays/get/responses/400/content/application~1problem+json/schema"},"examples":{"403 Forbidden":{"value":{"personio_trace_id":"8b46fa09-d8fe-4de0-be03-f0a1d48df766","timestamp":"2026-11-03T11:17:30Z","errors":[{"title":"Access Denied","detail":"Access to this endpoint is denied."}]}}}}}}}}}