Compensation Record Schema
Champs
Compensation Record Schema
Outside-of-contract compensation events (ADR 0114): spot bonuses, commissions, off-cycle adjustments. ZK fields stored in encryptedFields.
employeeProfileId
FK to employee_profiles.
contractId
Optional FK to the employment_contract version that was active when this record was created. Used by reporting to attribute the payout.
kind
Payout category. CUSTOM requires a non-empty note via encryptedFields.
SPOT_BONUSSIGN_ON_BONUSRETENTION_BONUSKPI_BONUSCOMMISSION_PAYOUTOFF_CYCLE_ADJUSTMENTOVERTIME_PAYOUTONE_TIMESEVERANCESETTLEMENTCUSTOMencryptedFields
ZK envelope keyed by field name. Allowed keys: `amount` (JSON: { amount, currency }), `note`. Server validates against COMPENSATION_RECORD_ZK_FIELDS allowlist.
payoutDate
Actual or scheduled payout date (ISO 8601).
periodStart
For COMMISSION_PAYOUT / OVERTIME_PAYOUT: start of the accounting period.
periodEnd
For COMMISSION_PAYOUT / OVERTIME_PAYOUT: end of the accounting period.
payrollMonth
YYYY-MM marker for the payroll run that should pick up this record. Decouples payoutDate (when the employee gets paid) from payrollMonth (which Lohnabrechnung carries the entry).
status
Workflow status. State machine enforced server-side.
DRAFTPENDING_APPROVALAPPROVEDPAIDVOIDEDapprovalRequestId
FK to approval_requests when an approval workflow is active.
approverUserId
User who approved (last in chain). Set together with approvedAt.
approvedAt
paidAt
When the payout was confirmed in payroll. Plain — not sensitive on its own.
templateId
Optional FK to compensation_component_template (appliesTo: RECORD).
referenceNumber
Optional external reference (commission run id, settlement case number, etc.) — searchable in the records list.
Aucun champ ne correspond au filtre.
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/compensation_records— Liste, paginée et filtrableGET /api/v1/compensation_records/<id>— Une entitéPOST /api/v1/compensation_records— CréerPATCH /api/v1/compensation_records/<id>— Mise à jour partielleDELETE /api/v1/compensation_records/<id>— Suppression logiqueGET /api/v1/compensation_records/<id>/timeline— Audit et activités