# Abwesenheitsart erstellen

`POST https://{tenant}.stamp.eu/rest/absence_types`

Create a custom absence type

## Request-Body

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `slug` | string | ja |
| `name` | string | ja |
| `color` | string \| null | nein |
| `icon` | string \| null | nein |
| `category` | `standard`, `productive` | ja |
| `unit` | `day`, `hour` | ja |
| `half_day_allowed` | boolean | nein |
| `affects_vacation` | boolean | nein |
| `target_work_factor` | number | nein |
| `working_time_flag` | integer \| null | nein |
| `requires_approval` | boolean | nein |
| `is_paid` | boolean | nein |
| `certificate_required` | boolean | nein |
| `certificate_deadline_days` | integer \| null | nein |
| `substitute_option` | `disabled`, `optional`, `required` | ja |
| `count_weekdays_only` | boolean | nein |
| `sort_order` | integer | nein |

## Antworten

### 201: `AbsenceTypeResource`

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `data` | object | ja |
| `data.id` | string | ja |
| `data.slug` | string | ja |
| `data.name` | string | ja |
| `data.color` | string | ja |
| `data.icon` | string | ja |
| `data.is_system` | string | ja |
| `data.category` | string | ja |
| `data.unit` | string | ja |
| `data.half_day_allowed` | string | ja |
| `data.affects_vacation` | string | ja |
| `data.target_work_factor` | number | ja |
| `data.working_time_flag` | string | ja |
| `data.requires_approval` | string | ja |
| `data.is_paid` | string | ja |
| `data.certificate_required` | string | ja |
| `data.certificate_deadline_days` | string | ja |
| `data.substitute_option` | string | ja |
| `data.count_weekdays_only` | string | ja |
| `data.is_active` | string | ja |
| `data.sort_order` | string | ja |

### 401: Unauthenticated

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Error overview. |

### 422: Validation error

| Feld | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `message` | string | ja | Errors overview. |
| `errors` | object | ja | A detailed description of each field that failed validation. |
