API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · performance_records

Performance Record Schema

ID du schéma
performance_record
Collection
performance_records
Autorisations
  • Lireperformance_record_view
  • Créerperformance_record_create
  • Modifierperformance_record_edit
  • Supprimerperformance_record_delete

Champs

Performance Record Schema

performance_records4 autorisations

Schema for validating Leistungsnachweis entities

documentLanguagestringfacultatif

Language the document (PDF) is rendered in. Decided when the document is created (explicit → customer language → tenant default → de) and never re-derived. Missing = de.

deenesfrnlnull
nullable
partyIduuidobligatoire

Customer party UUID

contractIduuidfacultatif

Associated contract UUID

nullable
projectIduuidfacultatif

Project this record was generated for (per-project standalone billing run). Null/absent for collective and per-ticket runs and for legacy records.

lecture seulenullable
ticketIduuidfacultatif

ADR 0963 — ticket this record was generated for (per-ticket standalone billing run). Null/absent for collective and per-project runs and for records created before ADR 0963 (those count as a collective record when the weclapp commission is chosen).

lecture seulenullable
performanceRecordNumberstringfacultatif

Auto-generated sequence number

max. 1000 caractèreslecture seulenullable
performanceRecordDatedatefacultatif

Date of the performance record

nullable
servicePeriodFromdateobligatoire

Service period start date

servicePeriodTodateobligatoire

Service period end date

statusstringobligatoire

Lifecycle status. CLOSED_WITHOUT_INVOICE (ADR 0929, ADR 1065) = a record that was deliberately settled without an invoice (any net value, with a mandatory reason); its time records stay RECORDED. Set and lifted only via POST /performance-records/:id/close-without-invoice and …/reopen.

OPENRECORDEDDOCUMENT_CREATEDCLOSED_WITHOUT_INVOICECANCELLED
Par défaut : "OPEN"
closedWithoutInvoiceAtdatetimefacultatif

ADR 1065 — when the record was closed without an invoice. Cleared on reopen. Missing on records closed before ADR 1065 (the UI falls back to the history).

lecture seulenullable
closedWithoutInvoiceBystringfacultatif

ADR 1065 — internal user id (users._id) who closed the record without invoice.

lecture seulenullable
closedWithoutInvoiceReasonstringfacultatif

ADR 1065 — mandatory reason given when closing without invoice.

max. 1000 caractèreslecture seulenullable
reopenedAtdatetimefacultatif

ADR 1065 — when a close-without-invoice was last lifted.

lecture seulenullable
reopenedBystringfacultatif

ADR 1065 — internal user id (users._id) who last reopened the record.

lecture seulenullable
reopenedReasonstringfacultatif

ADR 1065 — mandatory reason given when reopening.

max. 1000 caractèreslecture seulenullable
kindstringfacultatif

ADR 0914 — billing stream this record was generated for. EMERGENCY = a Notdienst-Leistungsnachweis holding only emergency-service bookings (isEmergencyService) of a customer whose emergency billing is SEPARATE. Missing on documents created before ADR 0914 (= STANDARD).

STANDARDEMERGENCY
Par défaut : "STANDARD"lecture seule
titlestringfacultatif

Title / summary

max. 200 caractèresnullable
notestringfacultatif

Internal note

max. 2000 caractèresnullable
timeRecordIdsuuid[]facultatif

Linked time record UUIDs

Par défaut : []
expenseIdsuuid[]facultatif

Linked expense UUIDs

Par défaut : []
tripIdsuuid[]facultatif

Linked trip UUIDs

Par défaut : []
materialBucketIdsuuid[]facultatif

Material buckets selected during a per-project billing preview. Materialised as invoice positions when the invoice is generated (default for opts.materialBucketIds).

Par défaut : []lecture seule
positionIdsuuid[]facultatif

Flat-rate project positions (ADR 0310/0406) billed in this per-project run. Their FLAT_RATE line items are part of the snapshot; the invoice stamps project_position.invoiceId from this list.

Par défaut : []
billingComponentsobjectfacultatif

Snapshot of the component selection of a per-project billing run (display/audit). Null/absent for collective and legacy runs.

nullable
timebooleanfacultatif
flatRatebooleanfacultatif
expensesbooleanfacultatif
materialbooleanfacultatif
totalMinutesintegerfacultatif

Total tracked minutes

≥ 0Par défaut : 0
totalBillableMinutesintegerfacultatif

Total billable minutes (after rounding and inclusive deduction)

≥ 0Par défaut : 0
totalBillingUnitsintegerfacultatif

Total billing units (Arbeitseinheiten) derived from billable minutes and billingUnitMinutes

≥ 0Par défaut : 0
totalAmountstringfacultatif

Total net amount in EUR as decimal string. Mirrors netAmount; kept for backward compatibility.

Motifnullable
itemsobject[]facultatif

Snapshot of calculated line items (services + trips). Frozen at PR creation, reused 1:1 when generating the invoice — no recalculation.

Par défaut : []
positionintegerfacultatif
≥ 1
descriptionstringobligatoire
max. 500 caractères
unitstringfacultatif
max. 20 caractèresnullable
quantitynumberobligatoire
≥ 0
unitPricestringobligatoire

Decimal string, e.g. "125.00"

vatRatestringfacultatif

VAT rate as percent string

Par défaut : "19"
netAmountstringfacultatif

Computed: quantity * unitPrice

nullable
articleIduuidfacultatif
nullable
articleNumberstringfacultatif
nullable
itemTypestringfacultatif
SERVICETRAVEL_DISTANCETRAVEL_TIMETRAVEL_OTHERFLAT_RATETICKETMATERIALEXPENSE
nullable
expenseIduuidfacultatif

Source expense UUID (EXPENSE lines of a per-project billing run)

nullable
positionIduuidfacultatif

Source project_position UUID (FLAT_RATE lines of a per-project billing run)

nullable
contractIdstringfacultatif
Par défaut : nullnullable
contractItemIdstringfacultatif
Par défaut : nullnullable
pricedAtstringfacultatif

ADR 0415 — date (YYYY-MM-DD) at which the base rate of this line was resolved: the service date (default) or the billing-run date (pricingDateBasis=BILLING_DATE). Only set on lines built from a single time record.

Par défaut : nullnullable
rateSourcestringfacultatif

ADR 0415 — provenance of the applied hourly rate. `position` = price of the sold order line (ADR 1056). `record` = rate frozen at booking time with unknown origin (legacy). Only set on lines built from a single time record.

positioncontractparty_overrideparty_discountarticleservice_typerecordnull
Par défaut : nullnullable
nonBillableServicebooleanfacultatif

ADR 0873 §7 — travel line of a non-billable booking: the 0.00 is the result, not noise. The weclapp zero-value travel filter lets marked lines through. Only set on travel lines.

timeRecordIdstringfacultatif

Source time record of a service or travel line.

nullable
timeRecordNumberstringfacultatif

Leistungsnummer (L-YYYY-NNNNN) of the source time record.

nullable
ticketIdstringfacultatif

Ticket the line belongs to — only for bookings with referenceType TICKET (travel lines inherit it from their booking).

lecture seulenullable
groupLabelstringfacultatif

ADR 0909 — heading of the position group this line belongs to ("Ticket #… // …" or "Helpdesk ohne Ticketzuweisung"). Rendered once at generation time when grouping by ticket is active; missing = ungrouped document. Pushed to weclapp as item.groupName (maxLength 1000 there).

max. 1000 caractèresnullable
coveredTimeRecordIdsstring[]facultatif

ADR 0909 — subset of timeRecordIds that is linked but not priced (contract-covered INCLUDED/CONTINGENT, ADR 0563; covered by a flat-rate position, ADR 0416). These bookings have no line item; the PDF lists them in a separate "already settled" section. Missing on records created before ADR 0909 — those keep the legacy PDF table.

omittedNonBillableTimeRecordIdsstring[]facultatif

ADR 1274 — subset of timeRecordIds that is non-billable (billableType NONE) and was deliberately left off this record because the tenant set billingSettings.omitNonBillableFromInvoice. Linked and closed like every other booking, but no line item, no section, not in totalMinutes. Missing or empty = nothing was omitted.

billingAddressIdstringfacultatif

Separately billed customer site (party.addresses[]._id with separateBilling) this record was generated for. Only bookings of that site are on it; the invoice is addressed to the site. Null/absent = the customer itself.

nullable
groupPositionsByTicketbooleanfacultatif

ADR 0909 — snapshot of the effective "group positions by ticket" setting (customer override → tenant default) at generation time. Items then carry groupLabel. Missing on documents created before ADR 0909 (= ungrouped).

Par défaut : false
vatRatestringfacultatif

Default VAT rate applied to the items snapshot (percent string)

Motifnullable
netAmountstringfacultatif

Sum of item netAmounts in EUR as decimal string

Motifnullable
vatAmountstringfacultatif

Total VAT in EUR as decimal string

Motifnullable
grossAmountstringfacultatif

Gross total (net + VAT) in EUR as decimal string

Motifnullable
invoiceIduuidfacultatif

Linked invoice UUID (when converted to invoice)

nullable
openTicketNotesobject[]facultatif

ADR 0146 — snapshot of tickets that were still open when this Leistungsnachweis was generated but were unlocked via `ticket.billingOverride`. Frozen at PR creation so the invoice PDF can render a neutral "Hinweise"-section ("Ticket … wird weiterhin bearbeitet") without re-querying ticket state at print time. Internal `reason` is intentionally NOT included — it stays on the ticket.

Par défaut : []nullable
ticketIduuidobligatoire
lecture seule
ticketNumberstringobligatoire
max. 50 caractères
titlestringfacultatif
max. 500 caractèresnullable
releaseSourcestringfacultatif

ADR 1209 — internal: what released the open ticket (per-ticket override, customer rule, tenant rule). Missing on snapshots before ADR 1209 = TICKET.

TICKETCUSTOMERTENANTnull
nullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/performance_records — Liste, paginée et filtrable
  • GET /api/v1/performance_records/<id> — Une entité
  • POST /api/v1/performance_records — Créer
  • PATCH /api/v1/performance_records/<id> — Mise à jour partielle
  • DELETE /api/v1/performance_records/<id> — Suppression logique
  • GET /api/v1/performance_records/<id>/timeline — Audit et activités

Recherche