## Add allowance rates of a country from a date on (hr:travel:manage)

`POST /api/hr/v1/travel-rates`

Module: HR · operationId: `createTravelRate` · Tag: Travel expenses · Auth: access token (`Authorization: Bearer <accessToken>`)

### Request body

`application/json` (required)

- `country` (string, required): ISO 3166-1 alpha-2 code of the country
- `validFrom` (string (date), required): First day the rates apply (YYYY-MM-DD)
- `breakfastPercent` (integer): Cut for breakfast in percent of the full-day rate (20)
- `dinnerPercent` (integer): Cut for dinner (40)
- `fullDayCents` (integer): 24-hour allowance
- `id` (string, read-only): Id of the rate row
- `lunchPercent` (integer): Cut for lunch (40)
- `mileageCentsPerKm` (integer): Mileage allowance (used from the home country's rate)
- `overnightCents` (integer): Lodging lump sum per night
- `partialDayCents` (integer): Allowance of departure/return days and single days over 8 hours
- `version` (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example:

```json
{
  "breakfastPercent": 20,
  "country": "AT",
  "dinnerPercent": 40,
  "fullDayCents": 5000,
  "id": "2b4d6f8b-0d2f-4b4d-8f6b-0d2f4b6d8f42",
  "lunchPercent": 40,
  "mileageCentsPerKm": 30,
  "overnightCents": 11700,
  "partialDayCents": 3300,
  "validFrom": "2026-01-01",
  "version": 1
}
```

### Responses

- **201** Created (`application/json`)
- **400** Error (`application/json`)
- **403** Error (`application/json`)
- **409** Error (`application/json`)

Fields of the 201 answer:

- `country` (string, required): ISO 3166-1 alpha-2 code of the country
- `validFrom` (string (date), required): First day the rates apply (YYYY-MM-DD)
- `breakfastPercent` (integer): Cut for breakfast in percent of the full-day rate (20)
- `dinnerPercent` (integer): Cut for dinner (40)
- `fullDayCents` (integer): 24-hour allowance
- `id` (string, read-only): Id of the rate row
- `lunchPercent` (integer): Cut for lunch (40)
- `mileageCentsPerKm` (integer): Mileage allowance (used from the home country's rate)
- `overnightCents` (integer): Lodging lump sum per night
- `partialDayCents` (integer): Allowance of departure/return days and single days over 8 hours
- `version` (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example 201 answer:

```json
{
  "breakfastPercent": 20,
  "country": "AT",
  "dinnerPercent": 40,
  "fullDayCents": 5000,
  "id": "2b4d6f8b-0d2f-4b4d-8f6b-0d2f4b6d8f42",
  "lunchPercent": 40,
  "mileageCentsPerKm": 30,
  "overnightCents": 11700,
  "partialDayCents": 3300,
  "validFrom": "2026-01-01",
  "version": 1
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/hr/v1/travel-rates' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"breakfastPercent":20,"country":"AT","dinnerPercent":40,"fullDayCents":5000,"id":"2b4d6f8b-0d2f-4b4d-8f6b-0d2f4b6d8f42","lunchPercent":40,"mileageCentsPerKm":30,"overnightCents":11700,"partialDayCents":3300,"validFrom":"2026-01-01","version":1}'
```
