---
title: "POST /targethours"
method: POST
path: "/targethours"
tags: ["TargetHour"]
---

# POST /targethours

`POST /targethours`

## Request body

- object
  - `users_id` integer, required
  - `type` 'weekly' | 'monthly', required — Possible values: - `weekly`: Weekly - `monthly`: Monthly
  - `date_since` string, date, required
  - `date_until` string, date, nullable, required
  - `monday` number, float
  - `tuesday` number, float
  - `wednesday` number, float
  - `thursday` number, float
  - `friday` number, float
  - `saturday` number, float
  - `sunday` number, float
  - `monthly_target` number, float
  - `workday_monday` boolean
  - `workday_tuesday` boolean
  - `workday_wednesday` boolean
  - `workday_thursday` boolean
  - `workday_friday` boolean
  - `workday_saturday` boolean
  - `workday_sunday` boolean
  - `compensation_daily` integer — Automatic time compensation per day in minutes
  - `compensation_monthly` integer, required — Compensation for monthly target hours in minutes
  - `holiday_fixed_credit` 0 | 1
  - `surcharge_models_id` integer, nullable

## Response `200`

Successful operation

- object
  - `targethoursRow` union, required
    - TargetHourV1Weekly
      - `id` integer, required — The ID of the target hour settings
      - `users_id` integer, required — The related employee's ID
      - `surcharge_models_id` integer, nullable, required — The corresponding surcharge model
      - `type` 'weekly', required — Type of the target hours row
      - `date_since` string, date, required — Date from which on the target hours apply (Format YYYY-MM-DD)
      - `date_until` string, date, nullable, required — Date until which the target hours apply (Format YYYY-MM-DD)
      - `test_data` boolean, required — Defines if the Targethoursrow was generated as test data
      - `monday` number, required — Target hours for Monday
      - `tuesday` number, required — Target hours for Tuesday
      - `wednesday` number, required — Target hours for Wednesday
      - `thursday` number, required — Target hours for Thursday
      - `friday` number, required — Target hours for Friday
      - `saturday` number, required — Target hours for Saturday
      - `sunday` number, required — Target hours for Sunday
      - `absence_fixed_credit` boolean — true if credited absence hours are applied against the average target hours, false if credited absence hours match the target hours of the specific day
      - `compensation_daily` number, required — Automatic time compensation per day in minutes
      - `compensation_monthly` number, required — Automatic time compensation per month in hours
    - TargetHourV1Monthly
      - `id` integer, required — The ID of the target hour settings
      - `users_id` integer, required — The related employee's ID
      - `surcharge_models_id` integer, nullable, required — The corresponding surcharge model
      - `type` 'monthly', required — Type of the target hours row
      - `date_since` string, date, required — Date from which on the target hours apply (Format YYYY-MM-DD)
      - `date_until` string, date, nullable, required — Date until which the target hours apply (Format YYYY-MM-DD)
      - `test_data` boolean, required — Defines if the Targethoursrow was generated as test data
      - `workday_monday` boolean, required — Is Monday a work day?
      - `workday_tuesday` boolean, required — Is Tuesday a work day?
      - `workday_wednesday` boolean, required — Is Wednesday a work day?
      - `workday_thursday` boolean, required — Is Thursday a work day?
      - `workday_friday` boolean, required — Is Friday a work day?
      - `workday_saturday` boolean, required — Is Saturday a work day?
      - `workday_sunday` boolean, required — Is Sunday a work day?
      - `monthly_target` number, required — Monthly target hours to attain
      - `compensation_monthly` number, required — Automatic time compensation per month in hours

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.dev/clockodo/apis/clockodo-api-documentation.md) · [All operations](https://skmtc.dev/clockodo/apis/clockodo-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/clockodo/clockodo-api-documentation/revisions/38e281d50d6d/schema)
