## The caller's day – attendance, work entries, totals and what is not booked yet (tenant:access)

`GET /api/hr/v1/my-day`

Module: HR · operationId: `getMyDay` · Tag: Work entries · Auth: access token (`Authorization: Bearer <accessToken>`)

„Mein Tag“: the attendance day of the timesheet, the finished work entries of the work day (corrections
included) and the running stopwatch, the totals (attended = the attendance's actual time, booked,
billable, internal, gap = max(0, attended − booked); suggestions do not count) and the open items – the
caller's calls, meetings and remote sessions (not internal) and Microsoft 365 appointments (not all-day) that
are not booked yet, oldest first; private appointments without a label. comms is asked with the e-mail of the
caller's employee record. comms failing never fails the page: `openUnavailable` is set and `open` keeps what
arrived; `openTruncated` when comms listed only part of the day. Without an employee record `403 no_employee`.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `date` | query | string (date) |  | Day (default today in the tenant's time zone) |

### Responses

- **200** The day (`application/json`)
- **400** Error (`application/json`)
- **403** Error (`application/json`)

Fields of the 200 answer:

- `attendance` (TimesheetDay, required): One day of a timesheet (minutes)
  - `absence` (object): The absence on the day, if any
    - `fraction` (number): Share of the day the absence covers (1 or 0.5)
    - `id` (string): Id of the absence
    - `status` (string): State of the absence
    - `typeId` (string): Id of the absence type
  - `actual` (integer): Worked minutes
  - `break` (integer): Break minutes
  - `counted` (boolean): The day lies before today (tenant time zone) and counts in the totals and the time account. Today shows its live target, actual and credit but is not counted yet; later days show their target only
  - `credit` (integer): Minutes absences count as worked
  - `date` (string (date)): The day (YYYY-MM-DD)
  - `delta` (integer): actual + credit − target, in minutes; 0 on days not counted (today and later)
  - `entries` (array of TimeEntry): Time entries of the day
    - `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)
  - `holiday` (Holiday)
    - `custom` (boolean): A holiday of the tenant's own (omitted when false)
    - `date` (string (date)): Date (YYYY-MM-DD)
    - `fraction` (number): 1 for a full day, 0.5 for a half day (e.g. 24.12.) (one of `0.5`, `1`)
    - `name` (string): Name of the holiday
  - `running` (boolean): A segment of the day is still open
  - `target` (integer): Scheduled minutes (minus holidays and unpaid absences)
  - `violations` (array of Violation): Working-time rule warnings (ArbZG); never blocking
    - `breakMinutes` (integer): Break that counts under §4 ArbZG: interruptions of 15 minutes or more plus booked breaks (break_6h, break_9h)
    - `code` (string): auto_ended is no ArbZG rule: a segment HR ended at midnight whose times need checking (one of `break_6h`, `break_9h`, `max_10h`, `rest_11h`, `sunday_holiday`, `open_entry`, `auto_ended`)
    - `entryId` (string): The open or auto-ended entry (open_entry, auto_ended)
    - `excessMinutes` (integer): Worked time above the maximum (max_10h)
    - `message` (string): Human-readable text of the warning (German)
    - `requiredMinutes` (integer): Limit of the rule: required break (30/45), maximum worked time (600) or minimum rest (660)
    - `restMinutes` (integer): Rest since the previous work (rest_11h)
    - `since` (string (date-time)): End of the previous work (rest_11h) or start of the open or auto-ended entry (open_entry, auto_ended)
    - `workedMinutes` (integer): Worked time of the day (break_6h, break_9h, max_10h, sunday_holiday)
- `attendanceHidden` (boolean, required): The caller sees the work but not the attendance of this person (`hr:work:manage` alone): `attendance` is empty, attended and gap minutes are 0
- `date` (string (date), required): The day (YYYY-MM-DD)
- `employeeId` (string (uuid), required): Id of the employee
- `entries` (array of WorkEntry, required): Finished entries of the work day, corrections included
  - `approvedAt` (string (date-time), nullable): When the entry was approved
  - `approvedBy` (string): Who approved the entry (e-mail; the platform team acting in the tenant: „Plattformbetrieb (MBCOM) · <Name>“)
  - `article` (WorkArticleRef | null): Masterdata article a flat-rate entry is billed as
  - `batchId` (string (uuid), nullable): Billing batch the entry is billed in
  - `billableMinutes` (integer): Minutes billed
  - `billedRate` (number, nullable): Hourly rate (or article price) the entry was billed at
  - `billing` (string): Key of a billing type
  - `contract` (WorkContractRef | null): Trade contract that decides billing
  - `correctionOf` (string (uuid), nullable): The approved or billed entry this one corrects; its minutes are the difference (may be negative)
  - `createdAt` (string (date-time)): When the work entry was created
  - `createdBy` (string): Who booked the entry (e-mail)
  - `customer` (WorkCustomerRef | null): Customer the work is billed to
  - `description` (string): What was done
  - `durationSeconds` (integer): The exact length in seconds (the stopwatch's seconds, else `minutes` × 60)
  - `employeeId` (string (uuid)): Id of the employee
  - `employeeName` (string): Display name of the employee – only in `listApprovableWorkEntries`
  - `endedAt` (string (date-time), nullable): `null` for the running stopwatch and for an entry without a span
  - `id` (string (uuid)): Id of the work entry
  - `kind` (string): Key of a work kind (`getWorkEntrySettings`)
  - `km` (number): Kilometres travelled (kinds that allow travel)
  - `minutes` (integer): The length in minutes that sums and billing use (a correction's difference, may be negative; 0 for a stopwatch run that rounded to nothing)
  - `origin` (string): The call or appointment the time comes from: `comms:interaction:<id>` or `comms:calendar:<id>`; omitted for other work. Booked at most once per tenant (`409 already_booked`)
  - `project` (WorkProjectRef | null): Project the work counts for
  - `running` (boolean): The running stopwatch entry (start, no end)
  - `source` (string): How the entry was booked (one of `manual`, `stopwatch`, `interaction`, `calendar`, `correction`)
  - `startedAt` (string (date-time), nullable): `null` for an entry booked as a length only
  - `state` (string): suggested → confirmed → approved → billed (one of `suggested`, `confirmed`, `approved`, `billed`)
  - `subject` (string): What was worked on: `desk:item:<id>`, `forge:item:<id>`, `crm:activity:<id>`, a project `desk:project:<id>` / `forge:project:<id>`; empty for work on the customer only or internal work
  - `subjectLabel` (string): The subject's name at booking time (the origin's without a subject)
  - `travelMinutes` (integer): Travel time in minutes (kinds that allow travel)
  - `updatedAt` (string (date-time)): When the work entry was last changed
  - `version` (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)
  - `workDate` (string (date)): The day the work counts for (the person's choice; with a start its day in the tenant's time zone)
- `open` (array of OpenItem, required): Not booked yet (own day only)
  - `customer` (WorkCustomerRef | null, required): The customer comms suggests
  - `end` (string (date-time), required): End
  - `kind` (string, required): Kind of the item (one of `call`, `meeting`, `remote_session`, `calendar`)
  - `label` (string, required): Subject or other side; empty for a private appointment (busy time)
  - `private` (boolean, required): A private appointment (no label)
  - `start` (string (date-time), required): Start
  - `subject` (string, required): `comms:interaction:<id>` or `comms:calendar:<id>`
- `openTruncated` (boolean, required): comms listed only part of the day
- `openUnavailable` (boolean, required): comms could not be asked; `open` holds what arrived
- `running` (WorkEntry | null, required): The running stopwatch entry, whatever day it started
- `totals` (MyDayTotals, required)
  - `attendedMinutes` (integer, required): The attendance's actual time
  - `billableMinutes` (integer, required): Billable minutes of the finished entries
  - `bookedMinutes` (integer, required): Finished entries, corrections with their sign (as `getWorkSummary`)
  - `gapMinutes` (integer, required): max(0, attended − booked)
  - `internalMinutes` (integer, required): Booked on non-billable billing types

Example 200 answer:

```json
{
  "attendance": {
    "actual": 145,
    "break": 0,
    "counted": false,
    "credit": 0,
    "date": "2026-11-19",
    "delta": 0,
    "entries": [
      {
        "autoEnded": false,
        "breakMinutes": 0,
        "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
        "endedForBreak": false,
        "id": "5c7e9a1c-3e5a-4c7e-8a9c-3e5a7c9e1a37",
        "source": "clock",
        "start": "2026-11-19T06:31:00Z",
        "version": 1
      }
    ],
    "running": true,
    "target": 480,
    "violations": []
  },
  "attendanceHidden": false,
  "date": "2026-11-19",
  "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
  "entries": [
    {
      "billableMinutes": 0,
      "billing": "none",
      "createdAt": "2026-11-19T07:21:00Z",
      "createdBy": "sophie.huber@muster-it.example",
      "description": "Ticket-Queue gesichtet und verteilt",
      "durationSeconds": 2700,
      "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
      "endedAt": "2026-11-19T07:20:00Z",
      "id": "0f2b4d6f-8b0d-4f2b-9d6f-8b0d2f4b6d57",
      "kind": "internal",
      "minutes": 45,
      "running": false,
      "source": "manual",
      "startedAt": "2026-11-19T06:35:00Z",
      "state": "confirmed",
      "subject": "",
      "updatedAt": "2026-11-19T07:21:00Z",
      "version": 1,
      "workDate": "2026-11-19"
    }
  ],
  "open": [
    {
      "customer": {
        "id": "1b3d5f7b-9d1f-4b3d-8f5b-9d1f3b5d7f50",
        "name": "Kanzlei Hofmann \u0026 Partner"
      },
      "end": "2026-11-19T08:13:00Z",
      "kind": "call",
      "label": "Florian Pichler",
      "private": false,
      "start": "2026-11-19T08:05:00Z",
      "subject": "comms:interaction:2d4f6b8d-0f2b-4d4f-8b8d-0f2b4d6f8b56"
    }
  ],
  "openTruncated": false,
  "openUnavailable": false,
  "running": {
    "billableMinutes": 0,
    "billing": "hourly",
    "createdAt": "2026-11-19T08:40:00Z",
    "createdBy": "sophie.huber@muster-it.example",
    "customer": {
      "id": "1b3d5f7b-9d1f-4b3d-8f5b-9d1f3b5d7f50",
      "name": "Kanzlei Hofmann \u0026 Partner"
    },
    "description": "Drucker im Empfang einrichten",
    "durationSeconds": 0,
    "employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
    "endedAt": null,
    "id": "9c1e3a5c-7e9a-4c1e-8a5c-7e9a1c3e5a54",
    "kind": "remote",
    "minutes": 0,
    "running": true,
    "source": "stopwatch",
    "startedAt": "2026-11-19T08:40:00Z",
    "state": "confirmed",
    "subject": "desk:item:8c0e2a4c-6e8a-4c0e-9a2c-4e6a8c0e2a55",
    "subjectLabel": "#231 Neuer Drucker am Empfang",
    "updatedAt": "2026-11-19T08:40:00Z",
    "version": 1,
    "workDate": "2026-11-19"
  },
  "totals": {
    "attendedMinutes": 145,
    "billableMinutes": 0,
    "bookedMinutes": 45,
    "gapMinutes": 100,
    "internalMinutes": 45
  }
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/hr/v1/my-day' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
