# Retrieves daily absence period breakdowns for a given absence period. Retrieves daily absence period breakdowns for a given absence period. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "Absence Period API", "version": "2.0.0", "description": "Read API for Absence Entities." }, "servers": [ { "url": "https://api.personio.de" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Absence Periods Breakdowns", "description": "Endpoints to retrieve absence periods' breakdowns." } ], "paths": { "/v2/absence-periods/{id}/breakdowns": { "get": { "summary": "Retrieves daily absence period breakdowns for a given absence period.", "description": "Retrieves daily absence period breakdowns for a given absence period.", "tags": [ "Absence Periods Breakdowns" ], "parameters": [ { "$ref": "#/components/parameters/AbsencePeriodId" }, { "$ref": "#/paths/~1v2~1absence-types/get/parameters/0" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 28, "default": 28, "example": 28 }, "description": "The number of period breakdowns returned per request." } ], "x-path-examples": { "200 Valid request": { "value": "/papi/v2/absence-periods/fd19f19d-a272-4ea5-b46a-07ecdfc05be3/breakdowns", "query": "limit=3" }, "404 Not found": { "value": "/papi/v2/absence-periods/fd19f19d-a272-4ea5-b46a-07ecdfc05be3/breakdowns" }, "403 Forbidden": { "value": "/papi/v2/absence-periods/fd19f19d-a272-4ea5-b46a-07ecdfc05be3/breakdowns" }, "400 Invalid cursor": { "value": "/papi/v2/absence-periods/fd19f19d-a272-4ea5-b46a-07ecdfc05be3/breakdowns", "query": "cursor=invalid-cursor-string" } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "type": "object", "description": "A daily breakdown of an absence period indicating how much absence balance is consumed for each day of\nthe absence period.\n\nThere will be one entry for each day in the absence period, ordered chronologically. If an absence\nperiod is ongoing (it has `ends_at = null`), breakdowns will exist for every completed day up to the\ncurrent day.\n", "properties": { "_data": { "type": "array", "items": { "$ref": "#/components/schemas/AbsencePeriodBreakdown" } }, "_meta": { "$ref": "#/paths/~1v2~1absence-types/get/responses/200/content/application~1json/schema/properties/_meta" } } }, "examples": { "200 Valid request": { "$ref": "#/components/examples/GetAbsencePeriodBreakdownsResponse" } } } } }, "400": { "$ref": "#/components/responses/BadRequestInvalidCursorErrorResponse" }, "403": { "$ref": "#/components/responses/ForbiddenErrorResponse" }, "404": { "$ref": "#/components/responses/ResourceNotFound" } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "examples": { "GetAbsencePeriodBreakdownsResponse": { "value": { "_data": [ { "date": "2024-07-01", "effective_duration": { "value": 240, "unit": "MINUTE" } }, { "date": "2024-07-02", "effective_duration": { "value": 480, "unit": "MINUTE" } }, { "date": "2024-07-03", "effective_duration": { "value": 480, "unit": "MINUTE" } } ], "_meta": { "links": { "self": { "href": "https://api.personio.de/v2/absence-periods/fd19f19d-a272-4ea5-b46a-07ecdfc05be3/breakdowns" }, "next": { "href": "https://api.personio.de/v2/absence-periods/fd19f19d-a272-4ea5-b46a-07ecdfc05be3/breakdowns?cursor=cur_234ls0f02lalfdd" } } } } } }, "parameters": { "AbsencePeriodId": { "name": "id", "in": "path", "description": "The ID of the absence period.", "required": true, "example": "493eff0a-2c5a-467e-8966-f70b4e3805a6", "schema": { "type": "string" } } }, "schemas": { "AbsencePeriodBreakdown": { "type": "object", "description": "Details about how a single day within an absence period affects absence balance accounting.", "properties": { "date": { "type": "string", "description": "The day which this breakdown describes, in the timezone referenced by the periods `timezone_id` field.\n", "format": "date", "example": "2024-07-06" }, "effective_duration": { "type": "object", "description": "The amount of time that is subtracted from the employee's absence balance as a result of this day in the\nabsence period.\n\nThis number takes into account the working days, hours and public holidays of the employee. For example\nit will be 0 on Saturdays and Sundays if the employee does not work at weekends.\n", "properties": { "value": { "type": "number", "description": "The effective duration of the period, in the units specified by `unit`.", "example": 30 }, "unit": { "type": "string", "description": "The units used in the `value` field.\n* DAY: `value` represents the effective duration as a fractional number of days such as 1.0 or 0.5.\n* MINUTE: `value` represents the effective duration as a number of minutes, such as 60 or 480\n", "enum": [ "DAY", "MINUTE" ], "example": "DAY" } } } } } }, "responses": { "BadRequestInvalidCursorErrorResponse": { "description": "Bad request.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/ForbiddenErrorResponse/content/application~1problem%2Bjson/schema" }, "examples": { "400 Invalid cursor": { "value": { "personio_trace_id": "8b46fa09-d8fe-4de0-be03-f0a1d48df766", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Invalid cursor", "detail": "The provided cursor is not valid." } ] } } } } } }, "ResourceNotFound": { "description": "Resource not found.", "content": { "application/problem+json": { "schema": { "description": "This object is used to describe the use case where a specific requested resource does not exist.", "x-papi-gateway-errors": [ { "code": "common.requested_resource_not_found", "description": "The requested resource was not found. The resource could have been deleted or never existed in our system\"" } ], "properties": { "schema": { "$ref": "#/components/responses/ForbiddenErrorResponse/content/application~1problem%2Bjson/schema" } } }, "examples": { "404 Not found": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30+00:00", "errors": [ { "title": "Resource not found", "detail": "The requested resource was not found. The resource could have been deleted or never existed in our system.", "type": "https://developer.personio.de/reference/errors#common.requested_resource_not_found" } ] } } } } } }, "ForbiddenErrorResponse": { "description": "Access to this endpoint is denied.", "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": { "403 Forbidden": { "value": { "personio_trace_id": "8b46fa09-d8fe-4de0-be03-f0a1d48df766", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Access Denied", "detail": "Access to this endpoint is denied." } ] } } } } } } } } } ```