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

Compensation Record Schema

ID del esquema
compensation_record
Colección
compensation_records
Permisos
  • Leercompensation_record_view
  • Crearcompensation_record_create
  • Modificarcompensation_record_edit
  • Eliminarcompensation_record_delete

Campos

Compensation Record Schema

compensation_records4 permisos

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

employeeProfileIduuidobligatorio

FK to employee_profiles.

contractIduuidopcional

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

admite null
kindstringobligatorio

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

SPOT_BONUSSIGN_ON_BONUSRETENTION_BONUSKPI_BONUSCOMMISSION_PAYOUTOFF_CYCLE_ADJUSTMENTOVERTIME_PAYOUTONE_TIMESEVERANCESETTLEMENTCUSTOM
encryptedFieldsobjectopcional

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

admite null
payoutDatedateopcional

Actual or scheduled payout date (ISO 8601).

admite null
periodStartdateopcional

For COMMISSION_PAYOUT / OVERTIME_PAYOUT: start of the accounting period.

admite null
periodEnddateopcional

For COMMISSION_PAYOUT / OVERTIME_PAYOUT: end of the accounting period.

admite null
payrollMonthstringopcional

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

Patrónadmite null
statusstringobligatorio

Workflow status. State machine enforced server-side.

DRAFTPENDING_APPROVALAPPROVEDPAIDVOIDED
Valor por defecto: "DRAFT"solo lectura
approvalRequestIduuidopcional

FK to approval_requests when an approval workflow is active.

solo lecturaadmite null
approverUserIduuidopcional

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

solo lecturaadmite null
approvedAtdatetimeopcional
solo lecturaadmite null
paidAtdatetimeopcional

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

solo lecturaadmite null
templateIduuidopcional

Optional FK to compensation_component_template (appliesTo: RECORD).

admite null
referenceNumberstringopcional

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

máx. 80 caracteresadmite null

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

Búsqueda