## Correct a vacation account (hr:absence:approve, or the person's managers and deputies)

`POST /api/hr/v1/employees/{id}/vacation/adjustments`

Module: HR · operationId: `adjustVacation` · Tag: Absences · Auth: access token (`Authorization: Bearer <accessToken>`)

Managers and deputies in the chain of command correct their team's accounts, never their own (`403`); people outside their team answer `404`. This team path needs the person's own sign-in session – API key and assistant tokens without hr:absence:approve answer `403`.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

### Request body

`application/json` (required)

- `days` (number, required): Half days, negative to deduct
- `note` (string, required): Reason of the correction
- `year` (integer, required): Year of the vacation account

Example:

```json
{
  "days": 1,
  "note": "Ausgleich für den Samstagseinsatz beim Rollout Donau Maschinenbau",
  "year": 2026
}
```

### Responses

- **201** The updated account (`application/json`)
- **400** Error (`application/json`)
- **403** Error (`application/json`)
- **404** Error (`application/json`)

Fields of the 201 answer:

- `adjustments` (number): Sum of the corrections in days
- `carryover` (number): Remaining days of the previous year
- `carryoverExpires` (string (date)): Day the carryover expires (YYYY-MM-DD)
- `carryoverForfeited` (number): Part of the carryover not used before it expired
- `employeeId` (string): Id of the employee
- `entitlement` (number): 1/12 of the yearly days per full month of employment, rounded up to half days
- `entries` (array of object): Corrections of the account
  - `createdAt` (string (date-time)): When it was entered
  - `createdBy` (string): Who entered it (e-mail)
  - `days` (number): Days added (negative: subtracted)
  - `id` (string): Id of the correction
  - `note` (string): Reason of the correction
  - `year` (integer): Year the correction counts for
- `planned` (number): Approved days (also with a pending cancellation) on dates after today
- `remaining` (number): Days left: entitlement + carryover − carryoverForfeited + adjustments − taken − planned − requested
- `requested` (number): Days of requests not decided yet (status requested)
- `taken` (number): Approved days (also with a pending cancellation) on dates up to and including today (tenant time zone); an absence spanning today counts its days up to today here
- `year` (integer): The year

Example 201 answer:

```json
{
  "adjustments": 1,
  "carryover": 2,
  "carryoverExpires": "2026-03-31",
  "carryoverForfeited": 0,
  "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
  "entitlement": 28,
  "entries": [
    {
      "createdAt": "2026-10-12T09:30:00Z",
      "createdBy": "martin.brandl@muster-it.example",
      "days": 1,
      "id": "7c9e1a3c-5e7a-4c9e-8a1c-5e7a9c1e3a33",
      "note": "Ausgleich für den Samstagseinsatz beim Rollout Donau Maschinenbau",
      "year": 2026
    }
  ],
  "planned": 0,
  "remaining": 5,
  "requested": 5,
  "taken": 21,
  "year": 2026
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/hr/v1/employees/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/vacation/adjustments' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"days":1,"note":"Ausgleich für den Samstagseinsatz beim Rollout Donau Maschinenbau","year":2026}'
```
