Contingent Usage Schema
Velden
Contingent Usage Schema
Schema for validating contingent usage entities
contractId
Associated contract UUID. Stays set even when the contract is soft-deleted — the reference remains intact for audit/reporting; the contract is just hidden from `deletedAt: null` listings (relationship policy `onDelete: ignore`, ADR 0064 follow-up).
contingentId
Associated contingent UUID
sourceType
Source of the entry. TIME_RECORD/TRIP/EXPENSE = automatischer Verbrauch, MANUAL = manueller Verbrauch, REFILL = manuelle oder automatische Aufladung (positive Saldo-Bewegung), EXPIRY = Verfall des ungenutzten Rests beim automatischen Periodenwechsel (ADR 0934, negative Saldo-Bewegung).
TIME_RECORDTRIPEXPENSEMANUALREFILLEXPIRYsourceId
Source entity UUID
amount
Usage amount as decimal string
unit
Usage unit
HOURSMINUTESEURTRIPSconvertedAmount
Converted amount in contingent unit
date
Usage date (YYYY-MM-DD)
userId
User who performed the work
ticketId
Associated ticket UUID
description
Usage description
rateApplied
Rate applied for conversion
isOverage
Whether this usage exceeds the contingent limit
overageSurcharge
Overage surcharge amount
Geen velden komen overeen met het filter.
Standaard-endpoints
Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:
GET /api/v1/contingent_usages— Lijst, gepagineerd + filterbaarGET /api/v1/contingent_usages/<id>— Enkele entityPOST /api/v1/contingent_usages— AanmakenPATCH /api/v1/contingent_usages/<id>— Gedeeltelijke updateDELETE /api/v1/contingent_usages/<id>— Soft-deleteGET /api/v1/contingent_usages/<id>/timeline— Audit + activiteiten