# Vorlage erstellen

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

## Request-Body

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `name` | string | ja |
| `kind` | `0`, `1` \| null | nein |
| `cycle_length_weeks` | integer | ja |
| `unit_id` | string \| null | nein |
| `pattern` | object | ja |
| `pattern.groups` | object[] | ja |
| `pattern.groups[].name` | string | ja |
| `pattern.groups[].employee_ids` | string[] \| null | nein |
| `pattern.groups[].pattern` | object[] | ja |

## Antworten

### 201: `RosterTemplateResource`

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `data` | object | ja |
| `data.id` | string | ja |
| `data.name` | string | ja |
| `data.kind` | string | ja |
| `data.cycle_length_weeks` | string | ja |
| `data.pattern` | string | ja |
| `data.unit_id` | string | ja |
| `data.group_count` | integer | ja |
| `data.entries_count` | integer | 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. |
