Create Leave of Absence¶
Endpoint: POST /api/personnel-events/leave-of-absence
Description: Creates a new leave of absence personnel event for an existing identity.
Request Body¶
| Field | Type | Required | Description |
|---|---|---|---|
identityId |
string (GUID) | Yes | The unique identifier of the identity going on leave. Must reference an existing identity. |
effectiveDate |
string (ISO 8601) | Yes | The date the leave begins. Must be today or later. |
endDate |
string (ISO 8601) | No | The expected return date. Must be after effectiveDate if provided. If omitted, the removal milestone is snoozed until a return date is known. |
comment |
string | No | Optional comment added to the event. |
Sample Request¶
{
"identityId": "d4a7e2b1-3f5c-4a8d-9e6b-1c2d3e4f5a6b",
"effectiveDate": "2026-05-01T00:00:00Z",
"endDate": "2026-08-01T00:00:00Z",
"comment": "Medical leave of absence, expected return August 1"
}
Response Attributes¶
| Field | Type | Description |
|---|---|---|
id |
string (GUID) | Unique identifier of the created personnel event. |
kind |
string | Resource type. Always Personnel Event. |
number |
integer | Sequential personnel event number. |
type |
string | Event type. Always Absence for this endpoint. |
status |
string | Current status. |
reporter |
object | The API token that created the event. |
reporter.id |
string (GUID) | Reporter identity ID. |
reporter.name |
string | Reporter display name. |
assignee |
object | The identity assigned to manage the event. null if unassigned. |
assignee.id |
string (GUID) | Assignee identity ID. |
assignee.name |
string | Assignee display name. |
affectedIdentity |
object | The identity going on leave. Full identity representation. |
neededOn |
string (ISO 8601) | Leave start date. |
neededUntil |
string (ISO 8601) | Expected return date. null if no end date was provided. |
completedOn |
string (ISO 8601) | Completion date. null when newly created. |
stages |
array[object] | Milestone stages (Approval, Provision, Removal). |
activity |
array[object] | Activity log entries. |
comments |
array[object] | Comments on this event. |
Sample Response (201)¶
{
"id": "a7b8c9d0-e1f2-3456-7890-abcdef012345",
"kind": "Personnel Event",
"number": 315,
"type": "Absence",
"status": "Scheduled",
"reporter": {
"id": "c4d5e6f7-a8b9-0123-4567-89abcdef0123",
"name": "API Token - HR Integration"
},
"assignee": null,
"affectedIdentity": {
"id": "d4a7e2b1-3f5c-4a8d-9e6b-1c2d3e4f5a6b",
"kind": "Identity",
"firstName": "Sarah",
"lastName": "Chen",
"emailAddress": "schen@firstbankofvalkyrie.com",
"type": "Employee",
"title": "Senior Loan Officer",
"company": "First Bank of Valkyrie",
"division": "Commercial Lending",
"department": "Business Loans",
"office": "Fargo Main",
"supervisorName": "Martinez, Robert",
"createdDate": "2023-03-15T14:30:00Z",
"updatedDate": "2025-11-20T09:15:00Z",
"firstSeenDate": "2023-03-16T02:00:00Z",
"inactivatedDate": null,
"status": "Active"
},
"neededOn": "2026-05-01T00:00:00Z",
"neededUntil": "2026-08-01T00:00:00Z",
"completedOn": null,
"stages": [
{
"name": "Approval",
"status": "Scheduled",
"startedOn": null,
"scheduledStart": "2026-04-24T00:00:00Z",
"completedOn": null,
"completedBy": null,
"accessRequests": []
},
{
"name": "Provision",
"status": "Scheduled",
"startedOn": null,
"scheduledStart": "2026-05-01T00:00:00Z",
"completedOn": null,
"completedBy": null,
"accessRequests": []
},
{
"name": "Removal",
"status": "Scheduled",
"startedOn": null,
"scheduledStart": "2026-08-01T00:00:00Z",
"completedOn": null,
"completedBy": null,
"accessRequests": []
}
],
"activity": [
{
"createdDate": "2026-03-25T14:00:00Z",
"author": "API Token - HR Integration",
"action": "Created",
"content": "Absence event created via API"
}
],
"comments": [
{
"createdDate": "2026-03-25T14:00:00Z",
"author": "API Token - HR Integration",
"content": "Medical leave of absence, expected return August 1"
}
]
}
Error Response (400)¶
{
"error": "validation_error",
"message": "One or more validation errors occurred",
"correlationId": "a1b2c3d4e5f6789012345678abcdef01",
"errors": [
{
"field": "endDate",
"message": "End date must be after effective date"
}
]
}