Delegation Schema
Champs
Delegation Schema
Time-bounded stand-in arrangement for workflow addressing (ADR 0108)
delegatorUserId
User who is being delegated FROM (the absentee).
delegateToUserId
User who STANDS IN — receives the workflow steps in the delegator's place.
scope
What the delegation covers. ALL = every approval + workflow address; APPROVALS = filtered by approvalTypes; POSITION = the delegator's tenure on a specific position only.
kind
ALLAPPROVALSPOSITIONapprovalTypes
For kind=APPROVALS: optional whitelist (e.g. ["vacation_request", "expense_report"]). Empty/missing = all approval types.
positionId
For kind=POSITION: the position whose addressing is delegated.
validFrom
First effective day (inclusive).
validTo
Last effective day (inclusive). Null = open-ended (rare; usually a vacation has a return date).
reason
Optional categorisation for HR reports.
VACATIONSICK_LEAVEBUSINESS_TRIPOTHERcascadeIfDelegateAbsent
When true and the delegate is themselves on delegation during the requested point, the resolver tries the delegate's delegate (one extra hop). When false, an absent delegate just fails-through to the original delegator (caller decides next step).
note
Free-text note shown in the delegation centre.
sourceVacationRequestId
Backlink to the vacation_request that auto-created this delegation. Set by the vacation-approval workflow; soft-delete cascades when the vacation_request is cancelled. Manual delegations leave this null.
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/delegations— Liste, paginée et filtrableGET /api/v1/delegations/<id>— Une entitéPOST /api/v1/delegations— CréerPATCH /api/v1/delegations/<id>— Mise à jour partielleDELETE /api/v1/delegations/<id>— Suppression logiqueGET /api/v1/delegations/<id>/timeline— Audit et activités