# Mobile Stempelung

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

Documented exception to the `data`-envelope standard (ADR 0005): the
payload stays flat for the mobile clients. `early` is only present when
the clock-in happened before the rostered start (milliseconds early).

## Request-Body

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `latitude` | number \| null | nein |
| `longitude` | number \| null | nein |
| `accuracy` | number \| null | nein |
| `queued_at` | string \| null | nein |
| `comment` | string \| null | nein |
| `metadata` | object | nein |
| `metadata.platform` | `ios`, `android`, `web`, `desktop` \| null | nein |
| `metadata.app_version` | string \| null | nein |
| `metadata.device_model` | string \| null | nein |
| `metadata.os_version` | string \| null | nein |

## Antworten

### 201: Stempelung erfasst

| Feld | Typ | Pflicht |
| --- | --- | --- |
| `id` | string | ja |
| `state` | string | ja |
| `timestamp` | string \| null | ja |
| `location` | boolean | ja |
| `early` | integer | nein |
| `target_duration_seconds` | integer | ja |
| `weekly_target_seconds` | integer | ja |
| `weekly_seconds` | integer | ja |
| `today_work_seconds` | integer | ja |
| `today_pause_seconds` | integer | ja |
| `overtime_account_seconds` | integer | ja |
| `overtime_month_seconds` | integer | ja |
| `company_name` | string | ja |

### 401: Unauthenticated

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

### 403: An error

An error

Inhaltstyp: application/json

### 422: Validation error

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