API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · time_records

Time Record Schema

Schema-ID
time_record
Collection
time_records
Permissions
  • Lesentime_record_view
  • Anlegentime_record_create
  • Änderntime_record_edit
  • Löschentime_record_delete

Felder

Time Record Schema

time_records4 Permissions

Schema for validating time record entities

userIduuidoptional

User ID who recorded this time entry

datedateerforderlich

Date of the time entry (ISO date format)

startTimedatetimeoptional

Start time for exact time tracking (ISO datetime)

nullable
endTimedatetimeoptional

End time for exact time tracking (ISO datetime)

nullable
durationMinutesintegererforderlich

Total duration in minutes

≥ 0
breakMinutesintegeroptional

Break time in minutes

≥ 0Default: 0
breakStartTimedatetimeoptional

When the break started (ISO datetime) — legacy, first break

nullable
breaksobject[]optional

Multiple break entries with start time and duration

Default: []
startTimedatetimeoptional

Break start time (ISO datetime)

nullable
durationMinutesintegererforderlich

Break duration in minutes

≥ 0
descriptionstringerforderlich

Work description

1–5000 Zeichen
internalNotestringoptional

Internal note not visible to customer

max 1000 Zeichennullable
serviceTypeIduuiderforderlich

Service type UUID — primary classification for billing parameters

serviceNaturestringoptional

Snapshot von service_type.serviceNature zum Buchungszeitpunkt (SUPPORT = im Full-Service enthalten, ORDER_BASED = auftragsbezogen). Server-gesetzt (protected), als direktes Feld in der Analytics-Auswertung gruppierbar. Null = nicht klassifiziert.

SUPPORTORDER_BASEDnull
read-onlynullable
entryTypestringoptional

Derived from serviceType.category (legacy compatibility)

WORKTRAVELREMOTEON_SITEPHONEADMINCONSULTINGMAINTENANCESUPPORTCUSTOM
nullable
locationstringoptional

Location where work was performed (defaults from serviceType.defaultLocation)

OFFICECUSTOMER_SITEREMOTETRAVEL
nullable
partyIduuiderforderlich

Company UUID — always required (own company or customer)

isInternalbooleanoptional

If true, not visible to customer and not billable

Default: false
referenceTypestringoptional

Type of linked entity (Auftrag)

TICKETPROJECTTASKCONTRACTPHONE_CALLCONTACT_PERSONASSET
nullable
referenceIduuidoptional

UUID of linked entity (Auftrag)

nullable
linkedProjectIduuidoptional

Linked project UUID (max. one; primary reference when set)

nullable
linkedTicketIduuidoptional

Linked ticket UUID (max. one; must belong to linkedProjectId when both set)

nullable
linkedTaskIduuidoptional

Linked task UUID (max. one; must belong to linkedTicketId/linkedProjectId when set)

nullable
linkedContactPersonIdsuuid[]optional

Linked contact person (PERSON party) UUIDs — informational, never billing-relevant while a work-item link exists

Default: []nullable
linkedAssetIdsuuid[]optional

Linked asset UUIDs — informational, never billing-relevant while a work-item link exists

Default: []nullable
contractIduuidoptional

Associated contract UUID (can be set alongside referenceType/Id)

nullable
positionIduuidoptional

ADR 0310: project_position this direct-on-project booking is billed against. Set when time is booked off a project appointment (calendar_event.positionId) so the position Ist (consumedMinutes/consumedAmount) reflects it. Only meaningful for direct project bookings (referenceType=PROJECT); task bookings already carry their position via task.positionId.

nullable
assetIduuidoptional

Asset the work was performed on (inherited from the linked ticket)

nullable
coverageModestringoptional

How this record is handled financially against a contract

INCLUDEDCONTINGENTCONTRACT_RATEBILLABLE
nullable
coverageContractIduuidoptional

Contract that covers this record (resolver result)

nullable
coverageAssignmentIduuidoptional

Contract assignment whose coverage rule applied

nullable
coverageContingentIduuidoptional

Contingent the work was deducted from (CONTINGENT mode)

nullable
coverageContractRatePerHourstringoptional

Frozen contract special rate snapshot (CONTRACT_RATE mode)

Patternnullable
coverageRateSourcestringoptional

Frozen rate-source snapshot for revision safety

CONTRACT_RATECONTINGENTINCLUDEDSTANDARD
nullable
coverageResolverVersionnumberoptional

Resolver logic version active when coverage was resolved

nullable
coverageResolvedAtdatetimeoptional

Timestamp the coverage was resolved

nullable
coverageAmbiguousbooleanoptional

Asset could not be determined unambiguously — manual clarification needed

nullable
overageBlockedbooleanoptional

Contingent overage was blocked by policy — overhang billed regularly

nullable
overageSurchargeAmountstringoptional

Surcharge amount for the contingent overhang (ALLOW_WITH_SURCHARGE)

Patternnullable
coveragePartialbooleanoptional

A reference linked multiple assets, so coverage was split across them and this record mixes covered + billable shares (ADR 0164). When true, billing invoices only `billableMinutes - coveredMinutes`.

nullable
coveredMinutesnumberoptional

Sum of per-asset share minutes resolving to INCLUDED/CONTINGENT coverage (ADR 0164). Subtracted from billable minutes for coveragePartial records so covered work is not double-charged.

nullable
coverageAllocationsobject[]optional

Per-asset coverage split snapshot when a reference links multiple assets (ADR 0164). Display/audit only — the actual contingent deduction lives in contingent_ledger / contingent_usages.

nullable
assetIdstringoptional
nullable
contractIdstringoptional
nullable
contingentIdstringoptional
nullable
billingModestringerforderlich
INCLUDEDCONTINGENTCONTRACT_RATEBILLABLE
shareMinutesnumbererforderlich
consumedAmountstringoptional
Patternread-onlynullable
unitstringoptional
nullable
overageBlockedbooleanoptional
nullable
sourceTypestringoptional

Origin entity type this time record was booked from. CALENDAR_EVENT marks records booked off a calendar appointment via "Zeit buchen" — the source event is then hidden in the calendar (the time record renders in its place).

PHONE_CALLREMOTE_SESSIONCALENDAR_EVENT
nullable
sourceIduuidoptional

Origin entity ID this time record was booked from

nullable
billableTypestringoptional

Billability classification

FULLNONEPARTIAL
Default: "FULL"
billablebooleanoptional

Derived: true when billableType !== NONE

Default: true
billableAmountintegeroptional

Billable minutes when billableType is PARTIAL

≥ 0nullable
billablePercentnumberoptional

Billable percentage when billableType is PARTIAL

0 – 100nullable
billableMinutesintegeroptional

Computed billable minutes (after rounding and inclusive deduction)

≥ 0Default: 0
nonBillableMinutesintegeroptional

Non-billable minutes

≥ 0Default: 0
nonBillableReasonstringoptional

Reason why time is not billable

max 500 Zeichennullable
ratePerHourstringoptional

Hourly rate in EUR as decimal string

Patternnullable
appliedRatePerHourstringoptional

Snapshot of the hourly rate that was effective when this time record was created. Read-only after insert (ADR 0139 — Snapshot-Pattern analog ADR 0128a). Sourced from serviceType.billing.pricing[] or articlePrices[] depending on priceSource.

Patternread-onlynullable
appliedRateSourcestringoptional

Provenance of the frozen base rate (ADR 0415): contract = contract.conditions.serviceRates / CONTRACT_RATE, party_override / party_discount = customer conditions (party.serviceTypeOverrides), article = article.articlePrices, service_type = tenant-wide mask price. Server-set alongside appliedRatePerHour; billing uses it to decide whether a BILLING_DATE re-resolve may replace the frozen rate (a contract-driven rate never is). Null on legacy records (treated conservatively: frozen rate kept).

contractparty_overrideparty_discountarticleservice_typenull
read-onlynullable
consumedAmountstringoptional

Snapshot of billable amount = durationMinutes/60 * appliedRatePerHour, computed once on insert. Drives task.consumedAmount aggregation for limitMode=amount tasks (ADR 0139).

Patternread-onlynullable
weclappTimeRecordIdstringoptional

Linked weclapp time-record ID after successful push

read-onlynullable
weclappSyncStatestringoptional

Sync state of this time-record against weclapp

pendingsyncederrornull
read-onlynullable
weclappLastSyncedAtdatetimeoptional

Last successful weclapp push timestamp

read-onlynullable
weclappLastSyncErrorstringoptional

Last weclapp push error message

max 1000 Zeichenread-onlynullable
weclappOrderItemIdstringoptional

weclapp salesOrderItem id of the TIME position appended to the sales order for this booking (non-service-position time, ADR 0412). Dedupe key for retries and the removal address when the approval is revoked.

max 200 Zeichenread-onlynullable
weclappTravelOrderItemIdsstring[]optional

weclapp salesOrderItem ids of the TRAVEL positions appended to the sales order for this booking (ADR 0412).

read-onlynullable
isFlatRatebooleanoptional

Whether this is a flat-rate billing entry

Default: false
flatRateAmountstringoptional

Flat rate amount in EUR as decimal string

Patternnullable
assignmentTypestringoptional

Assignment target type

CUSTOMEREMPLOYEEASSETORG_UNIT
nullable
assignmentIduuidoptional

Assignment target UUID

nullable
orgUnitIduuidoptional

Associated org unit (department/team) UUID

nullable
costCenterIduuidoptional

Associated cost center UUID

nullable
sourcestringoptional

Herkunftsmarker (z. B. TANSS). Entspricht der Wert einem `externalMaster`-Provider, ist der Datensatz ein read-only Spiegel (ADR 0377) und nur vom Sync pflegbar; Bearbeitungsversuche scheitern mit 423. Der Guard wirkt pro Dokument — lokal erfasste Zeitbuchungen tragen kein `source` und bleiben normal bearbeitbar.

max 50 ZeichenDefault: nullnullable
sourceRefobjectoptional

Referenz auf das Quellsystem, aus dem dieser Datensatz importiert wurde

Default: nullnullable
systemstringerforderlich

Quellsystem (z. B. tanss)

idstringerforderlich

ID im Quellsystem

statusstringoptional

Unified lifecycle status: DRAFT → SUBMITTED → APPROVED → RECORDED → INVOICED. Branches: REJECTED, CREDITED.

DRAFTSUBMITTEDAPPROVEDREJECTEDRECORDEDINVOICEDCREDITED
Default: "DRAFT"
approvedByIduuidoptional

User who approved this entry

nullable
approvedAtdatetimeoptional

Timestamp when approved (ISO datetime)

nullable
rejectionReasonstringoptional

Reason for rejection if status is REJECTED

max 500 Zeichennullable
budgetHoldbooleanoptional

Parked over-limit draft (ADR 0223): this entry was recorded against a ticket whose budget cap (Obergrenze) is already reached. It stays a permanent DRAFT, is EXCLUDED from budget.consumedMinutes and from billing, and blocks the ticket from being closed until the cap is raised (which auto-converts it back to a normal draft) or it is deleted. Distinct from a regular status:'DRAFT'.

Default: false
isUnclearbooleanoptional

Employee flagged this entry as unclear/needing clarification at recording time (e.g. unsure how to bill it, missing context). Surfaced to the team lead in the draft overview so it can be resolved before approval. Client-editable by the recorder.

Default: false
unclearNotestringoptional

Optional note describing what is unclear about this entry (set alongside isUnclear).

max 500 Zeichennullable
consultationTaskIdsuuid[]optional

Task UUIDs of Rücksprache (consultation) tasks raised for this entry. Owned by the request-consultation endpoint — never client-editable.

Default: []read-onlynullable
performanceRecordIduuidoptional

Leistungsnachweis this record was booked onto (set when status becomes RECORDED, cleared when the Leistungsnachweis is deleted)

read-onlynullable
invoiceIduuidoptional

Invoice this record was billed on (set when status becomes INVOICED, cleared when the invoice attempt is rolled back)

read-onlynullable
isOvertimebooleanoptional

Whether this time entry is overtime (outside regular hours)

Default: false
isWeekendbooleanoptional

Whether this time entry was performed on a weekend or public holiday

Default: false
isEmergencyServicebooleanoptional

Whether this time entry was emergency/on-call service

Default: false
overtimeReasonstringoptional

Reason explaining why overtime/weekend/emergency service was necessary

max 500 Zeichennullable
flatRateServiceIduuidoptional

Reference to a flat rate service (Pauschalleistung)

nullable
appliedSurchargesobject[]optional

Surcharges applied to this time record

Default: []
surchargeIdstringerforderlich

Reference to the surcharge definition ID

namestringerforderlich

Surcharge name at time of application

max 100 Zeichen
percentChangenumbererforderlich

Percentage change applied

autoAppliedbooleanoptional

Whether this surcharge was auto-applied based on time rules

Default: false
appliedMinutesintegeroptional

Minutes of this booking the surcharge actually covers (ADR 0431). Absent on records booked before the minute-accurate split, and on records resolved without clock times (only all-day rules could apply, so there is no minute share to report).

≥ 0nullable
surchargeSegmentationobjectoptional

Minute-accurate surcharge split of this booking (ADR 0431) — the breakdown behind the blended `ratePerHour`.

read-onlynullable
basisstringerforderlich

MINUTE = split from real clock times. DAY = the booking had no start/end, so only all-day rules were evaluated and `segments` is empty.

MINUTEDAY
stackingModestringerforderlich

Stacking mode in force at booking time, frozen — the contract/service-type setting can change later.

ADDITIVEMAX
effectiveFactornumbererforderlich

Minute-weighted multiplier on the base rate. `ratePerHour` = base × this, rounded to 2 decimals.

≥ 0
segmentsobject[]optional
Default: []
datedateerforderlich
fromTimestringerforderlich

Local wall-clock start. "24:00" marks end-of-day.

Pattern
toTimestringerforderlich
Pattern
minutesintegererforderlich
≥ 1
surchargeIdsstring[]optional

Surcharges covering this segment. Empty = base rate.

Default: []
percentTotalnumberoptional

Percent applied after stacking (not necessarily the sum of all hits).

ratePerHourstringerforderlich

This segment's own hourly rate, frozen. Stored rather than recomputed from base × factor: the base rate may change, and an amount already shown to a customer must not move retroactively (same freeze rule as `ratePerHour`, ADR 0139/0163). NOTE: summing minutes × these rates can differ from the invoiced amount by cents — the invoice bills `billableMinutes × ratePerHour` (the blended rate), and these are the breakdown shown alongside it.

Pattern
tripIdsuuid[]optional

References to trip entities linked to this time record

Default: []
travelobjectoptional

Travel information when entryType includes travel

nullable
modestringerforderlich

Mode of transportation

CARPUBLIC_TRANSPORTFLIGHTTAXIBIKEWALK
distanceKmnumbererforderlich

Distance in kilometers

≥ 0
durationMinutesintegererforderlich

Travel duration in minutes

≥ 0
isRoundTripbooleanerforderlich

If true, distanceKm is one-way and will be doubled for billing

Default: false
distanceBillablebooleanerforderlich

Whether distance/mileage is billable

Default: true
timeBillablebooleanerforderlich

Whether travel time is billable

Default: true
ratePerKmstringoptional

Rate per kilometer in EUR as decimal string

Patternnullable
timeBillingModestringoptional

How travel time is billed when timeBillable=true

HOURLYFLAT_RATE
nullable
timeRatePerHourstringoptional

Hourly rate for travel time in EUR (when timeBillingMode=HOURLY)

Patternnullable
timeFlatRateAmountstringoptional

Flat-rate amount for travel time in EUR (when timeBillingMode=FLAT_RATE)

Patternnullable
parkingCoststringoptional

Parking costs in EUR as decimal string

Patternnullable
tollCoststringoptional

Toll costs in EUR as decimal string

Patternnullable
startLocationstringoptional

Start location (free text)

max 200 Zeichennullable
endLocationstringoptional

End location (free text)

max 200 Zeichennullable
vehicleInfostringoptional

Vehicle information (license plate, description)

max 100 Zeichennullable
tagsstring[]optional

Time entry tags

Default: []

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/time_records — Liste, paginiert + filterbar
  • GET /api/v1/time_records/<id> — Einzelne Entity
  • POST /api/v1/time_records — Anlegen
  • PATCH /api/v1/time_records/<id> — Teil-Update
  • DELETE /api/v1/time_records/<id> — Soft-Delete
  • GET /api/v1/time_records/<id>/timeline — Audit + Aktivitäten

Suche