API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · time_records

Time Record Schema

ID del esquema
time_record
Colección
time_records
Permisos
  • Leertime_record_view
  • Creartime_record_create
  • Modificartime_record_edit
  • Eliminartime_record_delete

Campos

Time Record Schema

time_records4 permisos

Schema for validating time record entities

userIduuidopcional

User ID who recorded this time entry

datedateobligatorio

Date of the time entry (ISO date format)

startTimedatetimeopcional

Start time for exact time tracking (ISO datetime)

admite null
endTimedatetimeopcional

End time for exact time tracking (ISO datetime)

admite null
durationMinutesintegerobligatorio

Total duration in minutes

≥ 0
breakMinutesintegeropcional

Break time in minutes

≥ 0Valor por defecto: 0
breakStartTimedatetimeopcional

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

admite null
breaksobject[]opcional

Multiple break entries with start time and duration

Valor por defecto: []
startTimedatetimeopcional

Break start time (ISO datetime)

admite null
durationMinutesintegerobligatorio

Break duration in minutes

≥ 0
descriptionstringobligatorio

Work description

1–5000 caracteres
internalNotestringopcional

Internal note not visible to customer

máx. 1000 caracteresadmite null
serviceTypeIduuidobligatorio

Service type UUID — primary classification for billing parameters

serviceNaturestringopcional

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
solo lecturaadmite null
entryTypestringopcional

Derived from serviceType.category (legacy compatibility)

WORKTRAVELREMOTEON_SITEPHONEADMINCONSULTINGMAINTENANCESUPPORTCUSTOMnull
admite null
locationstringopcional

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

OFFICECUSTOMER_SITEREMOTETRAVELnull
admite null
partyIduuidobligatorio

Company UUID — always required (own company or customer)

partyAddressIduuidopcional

Specific customer site (party.addresses[]._id) the work was performed at

admite null
isInternalbooleanopcional

If true, not visible to customer and not billable

Valor por defecto: false
referenceTypestringopcional

Type of linked entity (Auftrag)

TICKETPROJECTTASKCONTRACTPHONE_CALLCONTACT_PERSONASSETnull
admite null
referenceIduuidopcional

UUID of linked entity (Auftrag)

admite null
linkedProjectIduuidopcional

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

admite null
linkedTicketIduuidopcional

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

admite null
linkedTaskIduuidopcional

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

admite null
linkedContactPersonIdsuuid[]opcional

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

Valor por defecto: []admite null
linkedAssetIdsuuid[]opcional

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

Valor por defecto: []admite null
contractIduuidopcional

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

admite null
positionIduuidopcional

ADR 0310 / 0552: project_position this booking is billed against. Carries the position for referenceType=PROJECT (direct bookings, e.g. off a project appointment via calendar_event.positionId) AND referenceType=TICKET (bookings on a project sub-ticket, ticket.projectId). TASK bookings ignore this field — they inherit their position from task.positionId. Feeds the position Ist (consumedMinutes/consumedAmount). Mandatory (422) when the effective project bills standalone and has at least one non-CANCELLED position, unless the tenant opted out via settings.timeEntry.requireProjectPosition=false (ADR 0631).

admite null
bookedFromTicketIduuidopcional

ADR 0631: PURELY INFORMATIONAL origin marker — the ticket whose Zeiterfassung tab this booking was made from, when the booking targets a POSITION OF THE TICKET'S PROJECT (referenceType=TASK on a project task). Such a record has no other trace of the ticket: its anchor is the project task, so the ticket time list cannot find it and the user sees their own booking vanish. This field is what the ticket tab filters on to show it back, read-only. It deliberately does NOT participate in derivePrimaryReference, validateLinkHierarchy, billing, coverage or any rollup — linking the ticket via the typed linkedTicketId instead would flip the anchor from TASK to TICKET and move the booking out of the position rollup into the central Leistungserfassung. No backfill: records written before this field simply lack it and stay invisible in that block.

admite null
linkedComplaintIduuidopcional

ADR 1170: complaint this booking was performed for. INFORMATIONAL like bookedFromTicketId — it does NOT participate in derivePrimaryReference, validateLinkHierarchy, billing, coverage or budget; the booking stays an ordinary booking on its customer (partyId) and appears in the central Leistungserfassung. The complaint reads it to list its Leistungen and to value the unbilled share as complaint cost. Server-validated: the complaint must exist in the tenant, be readable by the writer and belong to the booked customer. No backfill: older records simply lack it.

admite null
linkedManagedEventIduuidopcional

ADR 1227: managed_event (Veranstaltung) this booking was performed for — selectable in the booking dialog like a project, prefilled from the event's „Leistungen" tab and from a duty. INFORMATIONAL like linkedComplaintId — it does NOT participate in derivePrimaryReference, validateLinkHierarchy, billing, coverage, contingents or budget; event billing runs via its positions/quotation. The event reads it to list its Leistungen. Server-validated on create and whenever it changes: the event must exist in the tenant, not be deleted and be readable by the writer. No party match is enforced. No backfill: older records simply lack it.

admite null
assetIduuidopcional

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

admite null
coverageModestringopcional

How this record is handled financially against a contract

INCLUDEDCONTINGENTCONTRACT_RATEBILLABLEnull
admite null
coverageContractIduuidopcional

Contract that covers this record (resolver result)

admite null
coverageAssignmentIduuidopcional

Contract assignment whose coverage rule applied

admite null
coverageContingentIduuidopcional

Contingent the work was deducted from (CONTINGENT mode)

admite null
coverageContractRatePerHourstringopcional

Frozen contract special rate snapshot (CONTRACT_RATE mode)

Patrónadmite null
coverageRateSourcestringopcional

Frozen rate-source snapshot for revision safety

CONTRACT_RATECONTINGENTINCLUDEDSTANDARDnull
admite null
coverageResolverVersionnumberopcional

Resolver logic version active when coverage was resolved

admite null
coverageResolvedAtdatetimeopcional

Timestamp the coverage was resolved

admite null
coverageAmbiguousbooleanopcional

Manual clarification needed. Set when the asset could not be determined unambiguously, and (ADR 0948) when the technician forced a mixed booking onto the contract but the covered assets point at more than one contract/contingent — the resolver then picks one (INCLUDED before CONTINGENT before CONTRACT_RATE, then slot order) and flags the record.

admite null
coverageOverridestringopcional

ADR 0948 — the technician's manual decision, overriding the automatic all-or-nothing rule in BOTH directions and surviving a re-resolution. `null` (default) = automatic: the booking goes onto the contract only when EVERY linked asset is covered. `CONTRACT` = put it on the contract anyway, `BILLABLE` = keep it off the contract. Protected on PATCH — the flip goes through POST /time-records/:id/coverage, which re-resolves the coverage and moves the contingent in the same step.

CONTRACTBILLABLEnull
solo lecturaadmite null
coverageMixedAssetsbooleanopcional

ADR 0948 — at the time of resolution, at least one linked asset was covered by the contract and at least one was not. Explains why an otherwise contract-covered booking came out BILLABLE; read-only resolver output.

solo lecturaadmite null
coverageContractPinIduuidopcional

Fixed contract assignment set by billing: the coverage resolver considers ONLY this contract as a candidate (its own rules, status and term still apply — a pinned contract that does not cover the asset yields no coverage, not the next-best contract). `null` (default) = every covering contract of the customer, most specific rule wins. Survives every re-resolution, so a later approval or reference change cannot silently move the booking back. Protected on PATCH — written only by POST /time-records/:id/coverage-contract, which validates the target and re-resolves the coverage in the same step.

solo lecturaadmite null
overageBlockedbooleanopcional

Contingent overage was blocked by policy — overhang billed regularly

admite null
overageSurchargeAmountstringopcional

Surcharge amount for the contingent overhang (ALLOW_WITH_SURCHARGE)

Patrónadmite null
coveragePartialbooleanopcional

This record mixes covered + billable shares. When true, billing invoices only `billableMinutes - coveredMinutes` (ADR 0932 — in every document path, not just the tiles). Two origins: (a) the contingent ran out mid-booking, so the covered part is the remaining balance rounded up to the booking grid and the overhang is billed (ADR 0358/0932) — still produced today; (b) historically, a reference linked several assets and coverage was split across them (ADR 0164) — NO LONGER produced since ADR 0948, which decides per booking all-or-nothing. Existing (b) records keep their value and keep billing net; nothing is backfilled.

admite null
coveredMinutesnumberopcional

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

admite null
coverageAllocationsobject[]opcional

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.

admite null
assetIdstringopcional
admite null
contractIdstringopcional
admite null
contingentIdstringopcional
admite null
billingModestringobligatorio
INCLUDEDCONTINGENTCONTRACT_RATEBILLABLE
shareMinutesnumberobligatorio
consumedAmountstringopcional
Patrónsolo lecturaadmite null
unitstringopcional
admite null
overageBlockedbooleanopcional
admite null
sourceTypestringopcional

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). MESSAGE (ADR 0779) marks a record booked off a sent mail; the CRUD hook writes `messages.bookedAsTimeRecordId` back, like it does for PHONE_CALL/REMOTE_SESSION.

PHONE_CALLREMOTE_SESSIONCALENDAR_EVENTMESSAGEnull
admite null
sourceIduuidopcional

Origin entity ID this time record was booked from

admite null
sourceTimerIdstringopcional

Timer this time record converts (ADR 1179). Lets a converted own timer be booked for today while a daily-closing lock of level 3 or higher applies.

máx. 100 caracteresadmite null
sourceOccurrenceDatedateopcional

Local calendar day (YYYY-MM-DD) of the booked OCCURRENCE when `sourceId` points to a recurring calendar_event series (RFC 5545 RECURRENCE-ID, day granularity). A series is one document, so `sourceId` alone cannot tell which occurrence was booked. Readers fall back to `date` when absent (records booked before the field existed) — see ADR 0957.

admite null
billableTypestringopcional

Billability classification

FULLNONEPARTIAL
Valor por defecto: "FULL"
billablebooleanopcional

Derived: true when billableType !== NONE

Valor por defecto: true
billableAmountintegeropcional

Billable minutes when billableType is PARTIAL

≥ 0admite null
billablePercentnumberopcional

Billable percentage when billableType is PARTIAL

0 – 100admite null
billableMinutesintegeropcional

Computed billable minutes (after rounding and inclusive deduction)

≥ 0Valor por defecto: 0
nonBillableMinutesintegeropcional

Non-billable minutes

≥ 0Valor por defecto: 0
nonBillableReasonstringopcional

Reason why time is not billable

máx. 500 caracteresadmite null
nonBillableReasonIduuidopcional

Id of the picked non_billable_reason — the display text itself stays in nonBillableReason

admite null
ratePerHourstringopcional

Hourly rate in EUR as decimal string

Patrónadmite null
appliedRatePerHourstringopcional

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.

Patrónsolo lecturaadmite null
appliedRateSourcestringopcional

Provenance of the frozen base rate (ADR 0415): position = price of the sold order line the booking sits on (ADR 1056, see appliedPositionTerms), 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 (position- and contract-driven rates never are). Null on legacy records (treated conservatively: frozen rate kept).

positioncontractparty_overrideparty_discountarticleservice_typenull
solo lecturaadmite null
appliedPositionTermsobjectopcional
solo lecturaadmite null
positionIduuidobligatorio
salesOrderItemIdstringobligatorio
máx. 64 caracteres
unitPricestringobligatorio
Patrón
discountPercentstringopcional
Patrónadmite null
weclappArticleIdstringopcional
máx. 64 caracteresadmite null
consumedAmountstringopcional

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

Patrónsolo lecturaadmite null
weclappTimeRecordIdstringopcional

Linked weclapp time-record ID after successful push

solo lecturaadmite null
weclappSyncStatestringopcional

Sync state of this time-record against weclapp. `deferred` (ADR 0634) = die Buchung gehört zu einem Projekt im Positionsersatz-Modus; sie wird bewusst NICHT einzeln nach weclapp geschrieben, sondern beim Abrechnungsabschluss gesammelt als Auftragsposition gerendert.

pendingsyncederrordeferrednull
solo lecturaadmite null
weclappLastSyncedAtdatetimeopcional

Last successful weclapp push timestamp

solo lecturaadmite null
weclappLastSyncErrorstringopcional

Last weclapp push error message

máx. 1000 caracteressolo lecturaadmite null
weclappBatchTransferredAtdatetimeopcional

ADR 0634 — wann diese Buchung als Teil der gesammelten Buchungspositionen in den weclapp-Auftrag übertragen wurde (Positionsersatz-Modus). Null = noch nicht übertragen (`deferred`). Adresse der Position ist NICHT hier, sondern projektweit in project.weclappBillingItemIds: bei Gruppierung pro Ticket / eine Position speisen mehrere Buchungen dieselbe Auftragsposition, ein Rückzug einzelner Buchungen ist deshalb gar nicht adressierbar.

solo lecturaadmite null
weclappOrderItemIdstringopcional

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.

máx. 200 caracteressolo lecturaadmite null
weclappTravelOrderItemIdsstring[]opcional

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

solo lecturaadmite null
isFlatRatebooleanopcional

Whether this is a flat-rate billing entry

Valor por defecto: false
flatRateAmountstringopcional

Flat rate amount in EUR as decimal string

Patrónadmite null
assignmentTypestringopcional

Assignment target type

CUSTOMEREMPLOYEEASSETORG_UNITnull
admite null
assignmentIduuidopcional

Assignment target UUID

admite null
orgUnitIduuidopcional

Associated org unit (department/team) UUID

admite null
costCenterIduuidopcional

Associated cost center UUID

admite null
sourcestringopcional

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.

máx. 50 caracteresValor por defecto: nulladmite null
sourceRefobjectopcional

Referenz auf das Quellsystem, aus dem dieser Datensatz importiert wurde

Valor por defecto: nulladmite null
systemstringobligatorio

Quellsystem (z. B. tanss)

idstringobligatorio

ID im Quellsystem

externalOwnershipstringopcional

Übernahme einer TANSS-Buchung in die Codemeta-Abrechnung (ADR 0432, für Zeitbuchungen ADR 0911). `"LOCAL"` hebt den Ausschluss über `NOT_EXTERNALLY_BILLED` auf und lässt den TANSS-Sync die Buchung überspringen; `source`/`sourceRef` bleiben als Herkunft stehen. Fehlt das Feld (Altbestand), gilt die Buchung als fremd abgerechnet — kein Backfill nötig. Nur über POST /time-records/:id/reopen-tanss setzbar (in `protectedFields`).

LOCALnull
Valor por defecto: nullsolo lecturaadmite null
externalOwnershipTakenAtdatetimeopcional

Zeitpunkt der Übernahme (ADR 0432 / ADR 0911).

Valor por defecto: nullsolo lecturaadmite null
externalOwnershipTakenBystringopcional

Interne User-Id, die die Übernahme ausgelöst hat (ADR 0432 / ADR 0911).

Valor por defecto: nullsolo lecturaadmite null
externalOwnershipTagstringopcional

Tag, der bei der Übernahme im Fremdsystem gesetzt wurde. Beim Wiederöffnen einer TANSS-Buchung (ADR 0911) immer `null`: in TANSS ist die Leistung bereits verbucht, dort wird nichts markiert.

Valor por defecto: nullsolo lecturaadmite null
tanssReopenedAtdatetimeopcional

Zeitpunkt, zu dem die aus TANSS als „Fakturiert" importierte Buchung wieder geöffnet wurde (ADR 0911). Nur über POST /time-records/:id/reopen-tanss setzbar.

Valor por defecto: nullsolo lecturaadmite null
tanssReopenedBystringopcional

Interne User-Id, die die Buchung wieder geöffnet hat (ADR 0911).

Valor por defecto: nullsolo lecturaadmite null
tanssReopenReasonstringopcional

Pflicht-Begründung für das Wiederöffnen (ADR 0911). Wird im Bearbeiten-Dialog angezeigt und steht zusätzlich in den Metadaten des History-Eintrags.

máx. 1000 caracteresValor por defecto: nullsolo lecturaadmite null
statusstringopcional

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

DRAFTSUBMITTEDAPPROVEDREJECTEDRECORDEDINVOICEDCREDITED
Valor por defecto: "DRAFT"
approvedByIduuidopcional

User who approved this entry

admite null
approvedAtdatetimeopcional

Timestamp when approved (ISO datetime)

admite null
rejectionReasonstringopcional

Reason for rejection if status is REJECTED

máx. 500 caracteresadmite null
budgetHoldbooleanopcional

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'.

Valor por defecto: falsesolo lectura
budgetHoldReasonstringopcional

Why more time than the ticket budget allows was needed (ADR 0886). Captured from the technician in the "Trotzdem speichern" dialog and carried into the budget-increase approval request, where it is the only context the approving lead gets. Set on create through the budget branch; never client-writable afterwards.

máx. 1000 caracteressolo lecturaadmite null
budgetHoldEstimatedRemainingMinutesnumberopcional

Technician estimate of how much MORE time the ticket still needs beyond this entry (ADR 0886, minutes). Informational only — the approval request asks for the held minutes, not this estimate — but it tells the lead whether a minimal increase will do. Set on create through the budget branch; never client-writable afterwards.

≥ 0solo lecturaadmite null
serviceBlockHoldbooleanopcional

Parked because of a customer service block (Leistungssperre, ADR 0815). Set server-side on create when the booked party is service-blocked and the referenced ticket has no exemption. The entry stays status DRAFT (never billed, still counts as booked for the daily closing) until it is released — by a user holding party_block who is not the booking user, or automatically when the ticket gets an exemption, moves to an unblocked customer, or the manual block is lifted. Never client-writable.

Valor por defecto: falsesolo lectura
serviceBlockHoldReasonstringopcional

Block reason captured when the entry was parked (ADR 0815). Server-set.

máx. 1000 caracteressolo lecturaadmite null
serviceBlockReleasedAtstringopcional

When the service-block hold was released (ISO datetime, ADR 0815). Server-set.

solo lecturaadmite null
serviceBlockReleasedBystringopcional

Internal users._id of whoever released the hold — for an automatic release the user whose change triggered it (ticket exemption, ticket moved, block lifted); the trigger itself is in the history metadata (ADR 0815). Server-set.

solo lecturaadmite null
isUnclearbooleanopcional

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.

Valor por defecto: false
unclearNotestringopcional

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

máx. 500 caracteresadmite null
consultationTaskIdsuuid[]opcional

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

Valor por defecto: []solo lecturaadmite null
performanceRecordIduuidopcional

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

solo lecturaadmite null
invoiceIduuidopcional

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

solo lecturaadmite null
closedWithoutInvoicebooleanopcional

ADR 0929 — `true` while the Leistungsnachweis this record is booked onto (status RECORDED, `performanceRecordId`) is closed without an invoice. Such a booking is settled, not "nicht fakturiert": the customer draft overview skips it, and its drilldown sends `closedWithoutInvoice__ne=true`. Set only by POST /performance-records/:id/close-without-invoice; removed by …/reopen and by the billing-link revert when the Leistungsnachweis is deleted. Absent otherwise (no backfill). Server-owned (`protectedFields`).

solo lectura
isOvertimebooleanopcional

Whether this time entry is overtime (outside regular hours)

Valor por defecto: false
isWeekendbooleanopcional

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

Valor por defecto: false
isEmergencyServicebooleanopcional

Whether this time entry was emergency/on-call service

Valor por defecto: false
overtimeReasonstringopcional

Reason explaining why overtime/weekend/emergency service was necessary

máx. 500 caracteresadmite null
overtimeScopeobjectopcional

Which parts of a booking flagged as overtime/weekend/emergency are requested: `travelBefore` = outbound leg (placed directly before the start), `service` = the service itself, `travelAfter` = return leg (placed directly after the end). The leg minutes come from `travels` (`travelLegMinutes`). Missing/null = service only, the behaviour before travel became requestable — no backfill.

admite null
travelBeforebooleanopcional
Valor por defecto: false
servicebooleanopcional
Valor por defecto: true
travelAfterbooleanopcional
Valor por defecto: false
flatRateServiceIduuidopcional

Reference to a flat rate service (Pauschalleistung)

admite null
appliedSurchargesobject[]opcional

Surcharges applied to this time record

Valor por defecto: []
surchargeIdstringobligatorio

Reference to the surcharge definition ID

namestringobligatorio

Surcharge name at time of application

máx. 100 caracteres
percentChangenumberobligatorio

Percentage change applied

autoAppliedbooleanopcional

Whether this surcharge was auto-applied based on time rules

Valor por defecto: false
appliedMinutesintegeropcional

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).

≥ 0admite null
surchargeSegmentationobjectopcional

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

solo lecturaadmite null
basisstringobligatorio

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
stackingModestringobligatorio

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

ADDITIVEMAX
effectiveFactornumberobligatorio

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

≥ 0
segmentsobject[]opcional
Valor por defecto: []
datedateobligatorio
fromTimestringobligatorio

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

Patrón
toTimestringobligatorio
Patrón
minutesintegerobligatorio
≥ 1
surchargeIdsstring[]opcional

Surcharges covering this segment. Empty = base rate.

Valor por defecto: []
percentTotalnumberopcional

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

ratePerHourstringobligatorio

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.

Patrón
tripIdsuuid[]opcional

References to trip entities linked to this time record

Valor por defecto: []
travelsobject[]opcional

All trips of this booking (supersedes the single `travel`)

Valor por defecto: []
modestringobligatorio

Mode of transportation

CARPUBLIC_TRANSPORTFLIGHTTAXIBIKEWALK
distanceKmnumberobligatorio

Distance in kilometers

≥ 0
durationMinutesintegerobligatorio

Travel duration in minutes

≥ 0
isRoundTripbooleanobligatorio

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

Valor por defecto: false
legstringopcional

Direction of a one-way trip: OUTBOUND (before the booking, default when missing) or RETURN (after it). Ignored when isRoundTrip is true. Affects placement only, never distance, duration or billing.

OUTBOUNDRETURN
distanceBillablebooleanobligatorio

Whether distance/mileage is billable

Valor por defecto: true
timeBillablebooleanobligatorio

Whether travel time is billable

Valor por defecto: true
ratePerKmstringopcional

Rate per kilometer in EUR as decimal string

Patrónadmite null
timeBillingModestringopcional

How travel time is billed when timeBillable=true

HOURLYFLAT_RATEnull
admite null
timeRatePerHourstringopcional

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

Patrónadmite null
timeFlatRateAmountstringopcional

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

Patrónadmite null
parkingCoststringopcional

Parking costs in EUR as decimal string

Patrónadmite null
tollCoststringopcional

Toll costs in EUR as decimal string

Patrónadmite null
startLocationstringopcional

Start location (free text)

máx. 200 caracteresadmite null
endLocationstringopcional

End location (free text)

máx. 200 caracteresadmite null
vehicleInfostringopcional

Vehicle information (license plate, description)

máx. 100 caracteresadmite null
vehicleIduuidopcional

Selected fleet vehicle UUID (source of `vehicleInfo`)

admite null
billingModestringopcional

How the distance is billed: per kilometer or as a flat rate

DISTANCE_BASEDFLAT_RATEnull
admite null
travelAllowanceIduuidopcional

Selected travel-allowance band UUID (when billingMode=FLAT_RATE)

admite null
flatRateAmountstringopcional

Flat-rate travel amount in EUR (when billingMode=FLAT_RATE)

Patrónadmite null
travelobjectopcional

Legacy single trip — read-only fallback, superseded by `travels`

admite null
modestringobligatorio

Mode of transportation

CARPUBLIC_TRANSPORTFLIGHTTAXIBIKEWALK
distanceKmnumberobligatorio

Distance in kilometers

≥ 0
durationMinutesintegerobligatorio

Travel duration in minutes

≥ 0
isRoundTripbooleanobligatorio

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

Valor por defecto: false
legstringopcional

Direction of a one-way trip: OUTBOUND (before the booking, default when missing) or RETURN (after it). Ignored when isRoundTrip is true. Affects placement only, never distance, duration or billing.

OUTBOUNDRETURN
distanceBillablebooleanobligatorio

Whether distance/mileage is billable

Valor por defecto: true
timeBillablebooleanobligatorio

Whether travel time is billable

Valor por defecto: true
ratePerKmstringopcional

Rate per kilometer in EUR as decimal string

Patrónadmite null
timeBillingModestringopcional

How travel time is billed when timeBillable=true

HOURLYFLAT_RATEnull
admite null
timeRatePerHourstringopcional

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

Patrónadmite null
timeFlatRateAmountstringopcional

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

Patrónadmite null
parkingCoststringopcional

Parking costs in EUR as decimal string

Patrónadmite null
tollCoststringopcional

Toll costs in EUR as decimal string

Patrónadmite null
startLocationstringopcional

Start location (free text)

máx. 200 caracteresadmite null
endLocationstringopcional

End location (free text)

máx. 200 caracteresadmite null
vehicleInfostringopcional

Vehicle information (license plate, description)

máx. 100 caracteresadmite null
vehicleIduuidopcional

Selected fleet vehicle UUID (source of `vehicleInfo`)

admite null
billingModestringopcional

How the distance is billed: per kilometer or as a flat rate

DISTANCE_BASEDFLAT_RATEnull
admite null
travelAllowanceIduuidopcional

Selected travel-allowance band UUID (when billingMode=FLAT_RATE)

admite null
flatRateAmountstringopcional

Flat-rate travel amount in EUR (when billingMode=FLAT_RATE)

Patrónadmite null
tagsstring[]opcional

Time entry tags

Valor por defecto: []

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/time_records — Lista, paginada y filtrable
  • GET /api/v1/time_records/<id> — Una entidad
  • POST /api/v1/time_records — Crear
  • PATCH /api/v1/time_records/<id> — Actualización parcial
  • DELETE /api/v1/time_records/<id> — Eliminación lógica
  • GET /api/v1/time_records/<id>/timeline — Auditoría y actividades

Búsqueda