# Einrichtungscode erstellen

`POST https://{tenant}.stamp.eu/rest/employees/{employee}/enrollment_tokens`

The plain token is returned exactly once, together with the ready-made
QR payload; the database only ever sees its SHA-256 hash.

## Pfadparameter

| Name | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `employee` | string | ja | The employee ID |

## Antworten

### 201

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `data` | object | ja |
| `data.id` | string | ja |
| `data.employee_id` | string | ja |
| `data.created_at` | string | ja |
| `data.expires_at` | string | ja |
| `data.redeemed_at` | string | ja |
| `data.redeemed_device` | string | ja |
| `data.status` | `redeemed`, `expired`, `open` | ja |
| `data.token` | string | ja |
| `data.qr_payload` | string | ja |

### 401: Unauthenticated

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

### 403: An error

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

### 404: Not found

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