# Retrieves an absence type by ID. Retrieves an absence type by ID. # 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 Types", "description": "Endpoints to retrieve absence types." } ], "paths": { "/v2/absence-types/{id}": { "get": { "summary": "Retrieves an absence type by ID.", "description": "Retrieves an absence type by ID.", "tags": [ "Absence Types" ], "parameters": [ { "$ref": "#/components/parameters/AbsenceTypeId" } ], "x-path-examples": { "200 Valid request": { "value": "/papi/v2/absence-types/abc6fa09-d8fe-4de0-be03-f0a1d48df766" }, "404 Not found": { "value": "/papi/v2/absence-types/abc6fa09-d8fe-4de0-be03-f0a1d48df766" }, "403 Forbidden": { "value": "/papi/v2/absence-types/abc6fa09-d8fe-4de0-be03-f0a1d48df766" } }, "responses": { "200": { "description": "Successful response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AbsenceType" }, "examples": { "200 Valid request": { "$ref": "#/components/examples/GetAbsenceTypeResponse" } } } } }, "403": { "$ref": "#/components/responses/ForbiddenErrorResponse" }, "404": { "$ref": "#/components/responses/ResourceNotFound" } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "examples": { "GetAbsenceTypeResponse": { "value": { "id": "abc6fa09-d8fe-4de0-be03-f0a1d48df766", "name": "Vacation", "category": "PAID_VACATION", "unit": "DAY" } } }, "parameters": { "AbsenceTypeId": { "name": "id", "in": "path", "description": "The ID of the absence type.", "required": true, "example": "137a2048-41e9-4d49-9201-e6a032521495", "schema": { "type": "string" } } }, "schemas": { "AbsenceType": { "type": "object", "description": "AbsenceType represents a classification of absence periods.", "properties": { "id": { "type": "string", "description": "A unique identifier for this absence type.", "example": "abc6fa09-d8fe-4de0-be03-f0a1d48df766" }, "name": { "type": "string", "description": "The name of the absence type.", "example": "Parental Leave (UK)" }, "category": { "type": "string", "description": "The category of the absence type.", "example": "SICK_LEAVE" }, "unit": { "type": "string", "description": "The units used for measuring this type of absence. See `AbsencePeriod` time range documentation for details\nabout how the absence type unit relates to valid and invalid time ranges for a period.\n* DAY: Absence periods of this type are specified in days or half days\n* HOUR: Absence periods of this type can have durations of less than 24 hours\n", "enum": [ "DAY", "HOUR" ], "example": "DAY" } } } }, "responses": { "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." } ] } } } } } } } } } ```