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

Compensation Record Schema

ID du schéma
compensation_record
Collection
compensation_records
Autorisations
  • Lirecompensation_record_view
  • Créercompensation_record_create
  • Modifiercompensation_record_edit
  • Supprimercompensation_record_delete

Champs

Compensation Record Schema

compensation_records4 autorisations

Outside-of-contract compensation events (ADR 0114): spot bonuses, commissions, off-cycle adjustments. ZK fields stored in encryptedFields.

employeeProfileIduuidobligatoire

FK to employee_profiles.

contractIduuidfacultatif

Optional FK to the employment_contract version that was active when this record was created. Used by reporting to attribute the payout.

nullable
kindstringobligatoire

Payout category. CUSTOM requires a non-empty note via encryptedFields.

SPOT_BONUSSIGN_ON_BONUSRETENTION_BONUSKPI_BONUSCOMMISSION_PAYOUTOFF_CYCLE_ADJUSTMENTOVERTIME_PAYOUTONE_TIMESEVERANCESETTLEMENTCUSTOM
encryptedFieldsobjectfacultatif

ZK envelope keyed by field name. Allowed keys: `amount` (JSON: { amount, currency }), `note`. Server validates against COMPENSATION_RECORD_ZK_FIELDS allowlist.

nullable
payoutDatedatefacultatif

Actual or scheduled payout date (ISO 8601).

nullable
periodStartdatefacultatif

For COMMISSION_PAYOUT / OVERTIME_PAYOUT: start of the accounting period.

nullable
periodEnddatefacultatif

For COMMISSION_PAYOUT / OVERTIME_PAYOUT: end of the accounting period.

nullable
payrollMonthstringfacultatif

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

Motifnullable
statusstringobligatoire

Workflow status. State machine enforced server-side.

DRAFTPENDING_APPROVALAPPROVEDPAIDVOIDED
Par défaut : "DRAFT"lecture seule
approvalRequestIduuidfacultatif

FK to approval_requests when an approval workflow is active.

lecture seulenullable
approverUserIduuidfacultatif

User who approved (last in chain). Set together with approvedAt.

lecture seulenullable
approvedAtdatetimefacultatif
lecture seulenullable
paidAtdatetimefacultatif

When the payout was confirmed in payroll. Plain — not sensitive on its own.

lecture seulenullable
templateIduuidfacultatif

Optional FK to compensation_component_template (appliesTo: RECORD).

nullable
referenceNumberstringfacultatif

Optional external reference (commission run id, settlement case number, etc.) — searchable in the records list.

max. 80 caractèresnullable

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 filtrable
  • GET /api/v1/compensation_records/<id> — Une entité
  • POST /api/v1/compensation_records — Créer
  • PATCH /api/v1/compensation_records/<id> — Mise à jour partielle
  • DELETE /api/v1/compensation_records/<id> — Suppression logique
  • GET /api/v1/compensation_records/<id>/timeline — Audit et activités

Recherche