## Time entries of an employee (own, or any with hr:time:manage)

`GET /api/hr/v1/time-entries`

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

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `employeeId` | query | string |  | Empty or `me` for the caller |
| `from` | query | string (date) | yes |  |
| `to` | query | string (date) | yes |  |

### Responses

- **200** Entries (`application/json`)
- **400** Error (`application/json`)

Fields of the 200 answer:

- `items` (array of TimeEntry, required): Time entries of the range
  - `autoEnded` (boolean): HR ended the segment at midnight because nobody clocked out (setting `autoEndAtMidnight`). It counts no working time until it is corrected; any change clears the mark.
  - `breakMinutes` (integer): Break inside the segment in minutes (manual entries)
  - `createdAt` (string (date-time)): When the time entry was created
  - `createdBy` (string): Who created the time entry (e-mail of the caller)
  - `employeeId` (string): Id of the employee
  - `end` (string (date-time)): Missing while running
  - `endedForBreak` (boolean): The segment was closed by starting a break
  - `id` (string): Id of the time entry
  - `note` (string): Note on the entry
  - `source` (string): clock: stamped, manual: entered by hand (one of `clock`, `manual`)
  - `start` (string (date-time)): Start of the segment
  - `updatedAt` (string (date-time)): When the time entry was last changed
  - `updatedBy` (string): Who last changed the time entry (e-mail of the caller)
  - `version` (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example 200 answer:

```json
{
  "items": [
    {
      "autoEnded": false,
      "breakMinutes": 30,
      "createdAt": "2026-11-18T06:28:00Z",
      "createdBy": "sophie.huber@muster-it.example",
      "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
      "end": "2026-11-18T15:00:00Z",
      "endedForBreak": false,
      "id": "3a5c7e9a-1c3e-4a5c-9e7a-1c3e5a7c9e36",
      "source": "clock",
      "start": "2026-11-18T06:28:00Z",
      "updatedAt": "2026-11-18T15:00:00Z",
      "updatedBy": "sophie.huber@muster-it.example",
      "version": 1
    },
    {
      "autoEnded": false,
      "breakMinutes": 0,
      "createdAt": "2026-11-19T06:31:00Z",
      "createdBy": "sophie.huber@muster-it.example",
      "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
      "endedForBreak": false,
      "id": "5c7e9a1c-3e5a-4c7e-8a9c-3e5a7c9e1a37",
      "source": "clock",
      "start": "2026-11-19T06:31:00Z",
      "updatedAt": "2026-11-19T06:31:00Z",
      "updatedBy": "sophie.huber@muster-it.example",
      "version": 1
    }
  ]
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/hr/v1/time-entries?from=2026-03-02&to=2026-03-02' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
