ConnectCloud Developers

Save the working-time model valid from a date (hr:write)

POST /api/hr/v1/employees/{id}/schedules

Module: HR · operationId: createEmployeeSchedule · Tag: Working time · Auth: access token (Authorization: Bearer <accessToken>)

Without id a model starting on the same day is replaced; with id that model is changed and may move to another date (409 duplicate when another model already starts there).

Parameters

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

Request body

application/json (required)

  • dayMinutes (array of integer, required): Target minutes Monday … Sunday
  • vacationDays (number, required): Vacation days per year
  • validFrom (string (date), required): First day the model applies (YYYY-MM-DD)
  • createdAt (string (date-time), read-only): When the model was saved
  • createdBy (string, read-only): Who saved the model (e-mail)
  • employeeId (string, read-only): Id of the employee
  • federalState (string): Overrides the tenant's Bundesland
  • id (string, read-only): Id of the working-time model

Example:

{
  "createdAt": "2025-10-20T11:00:00Z",
  "createdBy": "clara.becker@muster-it.example",
  "dayMinutes": [
    300,
    300,
    300,
    300,
    300,
    0,
    0
  ],
  "employeeId": "d1f3b5c7-9e1a-4d3f-8b5c-7a9e1f3b5d08",
  "federalState": "BY",
  "id": "9e1a3c5e-7a9c-4e1a-8c3e-7a9c1e3a5c34",
  "vacationDays": 28,
  "validFrom": "2025-11-03"
}

Responses

  • 200 Saved (application/json)
  • 400 Error (application/json)

Fields of the 200 answer:

  • dayMinutes (array of integer, required): Target minutes Monday … Sunday
  • vacationDays (number, required): Vacation days per year
  • validFrom (string (date), required): First day the model applies (YYYY-MM-DD)
  • createdAt (string (date-time), read-only): When the model was saved
  • createdBy (string, read-only): Who saved the model (e-mail)
  • employeeId (string, read-only): Id of the employee
  • federalState (string): Overrides the tenant's Bundesland
  • id (string, read-only): Id of the working-time model

Example 200 answer:

{
  "createdAt": "2025-10-20T11:00:00Z",
  "createdBy": "clara.becker@muster-it.example",
  "dayMinutes": [
    300,
    300,
    300,
    300,
    300,
    0,
    0
  ],
  "employeeId": "d1f3b5c7-9e1a-4d3f-8b5c-7a9e1f3b5d08",
  "federalState": "BY",
  "id": "9e1a3c5e-7a9c-4e1a-8c3e-7a9c1e3a5c34",
  "vacationDays": 28,
  "validFrom": "2025-11-03"
}

Example request

curl -X POST 'https://api.mbcom.cloud/api/hr/v1/employees/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/schedules' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"createdAt":"2025-10-20T11:00:00Z","createdBy":"clara.becker@muster-it.example","dayMinutes":[300,300,300,300,300,0,0],"employeeId":"d1f3b5c7-9e1a-4d3f-8b5c-7a9e1f3b5d08","federalState":"BY","id":"9e1a3c5e-7a9c-4e1a-8c3e-7a9c1e3a5c34","vacationDays":28,"validFrom":"2025-11-03"}'

View as Markdown · Interactive reference · OpenAPI