Approve confirmed entries (line managers and deputies for their team, hr:work:manage for everyone)
POST /api/hr/v1/work-entries/approve
Module: HR · operationId: approveWorkEntries · Tag: Work entries · Auth: access token (Authorization: Bearer <accessToken>)
All or none, each at its version. Own entries only with the tenant's selfApproval (403 self_approval;
line managers never approve their own). Entries of people the caller does not decide for answer 404; an
entry that is not confirmed or still running 409 work_state. Approved entries are locked.
Request body
application/json (required)
entries(array of object, required): Entries at the versions the caller saw; all or noneid(string (uuid), required): Id of the work entryversion(integer, required): Version of the entry the caller saw
Example:
{
"entries": [
{
"id": "5e7a9c1e-3a5c-4e7a-9c1e-3a5c7e9a1c51",
"version": 1
},
{
"id": "7a9c1e3a-5c7e-4a9c-9e3a-5c7e9a1c3e53",
"version": 1
}
]
}
Responses
- 200 Approved (
application/json) - 400 Error (
application/json) - 403 Error (
application/json) - 404 Error (
application/json) - 409 Error (
application/json)
Fields of the 200 answer:
items(array of WorkEntry, required): The changed entriesapprovedAt(string (date-time), nullable): When the entry was approvedapprovedBy(string): Who approved the entry (e-mail; the platform team acting in the tenant: „Plattformbetrieb (MBCOM) · “)article(WorkArticleRef | null): Masterdata article a flat-rate entry is billed asbatchId(string (uuid), nullable): Billing batch the entry is billed inbillableMinutes(integer): Minutes billedbilledRate(number, nullable): Hourly rate (or article price) the entry was billed atbilling(string): Key of a billing typecontract(WorkContractRef | null): Trade contract that decides billingcorrectionOf(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 createdcreatedBy(string): Who booked the entry (e-mail)customer(WorkCustomerRef | null): Customer the work is billed todescription(string): What was donedurationSeconds(integer): The exact length in seconds (the stopwatch's seconds, elseminutes× 60)employeeId(string (uuid)): Id of the employeeemployeeName(string): Display name of the employee – only inlistApprovableWorkEntriesendedAt(string (date-time), nullable):nullfor the running stopwatch and for an entry without a spanid(string (uuid)): Id of the work entrykind(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>orcomms:calendar:<id>; omitted for other work. Booked at most once per tenant (409 already_booked)project(WorkProjectRef | null): Project the work counts forrunning(boolean): The running stopwatch entry (start, no end)source(string): How the entry was booked (one ofmanual,stopwatch,interaction,calendar,correction)startedAt(string (date-time), nullable):nullfor an entry booked as a length onlystate(string): suggested → confirmed → approved → billed (one ofsuggested,confirmed,approved,billed)subject(string): What was worked on:desk:item:<id>,forge:item:<id>,crm:activity:<id>, a projectdesk:project:<id>/forge:project:<id>; empty for work on the customer only or internal worksubjectLabel(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 changedversion(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)
Example 200 answer:
{
"items": [
{
"approvedAt": "2026-11-17T08:05:00Z",
"approvedBy": "martin.brandl@muster-it.example",
"billableMinutes": 15,
"billing": "quota",
"createdAt": "2026-11-16T09:30:00Z",
"createdBy": "sophie.huber@muster-it.example",
"durationSeconds": 900,
"employeeId": "e5a1c3d7-2b4f-4c6e-8a0b-1d3f5b7c9e02",
"endedAt": "2026-11-16T09:27:00Z",
"id": "5e7a9c1e-3a5c-4e7a-9c1e-3a5c7e9a1c51",
"kind": "remote",
"minutes": 15,
"running": false,
"source": "interaction",
"startedAt": "2026-11-16T09:12:00Z",
"state": "approved",
"subject": "desk:item:6a8c0e2a-4b6d-4f8a-9c1e-3b5d7f9a1c3e",
"subjectLabel": "#214 WLAN im Restaurant fällt aus",
"updatedAt": "2026-11-17T08:05:00Z",
"version": 2,
"workDate": "2026-11-16"
}
]
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/hr/v1/work-entries/approve' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"entries":[{"id":"5e7a9c1e-3a5c-4e7a-9c1e-3a5c7e9a1c51","version":1},{"id":"7a9c1e3a-5c7e-4a9c-9e3a-5c7e9a1c3e53","version":1}]}'