AlphaAlpha Docs
API ReferenceHr leave request

Update a leave request

Updates an existing leave request (only if PENDING)

PATCH
/hr/leave-requests/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:18080/api/v1/hr/leave-requests/string" \  -H "Content-Type: application/json" \  -d '{    "employeeId": "string",    "endDate": "2019-08-24",    "endHalf": "FULL",    "leaveType": "VACATION",    "startDate": "2019-08-24",    "startHalf": "FULL"  }'
{
  "approvedAt": "2019-08-24T14:15:22Z",
  "approvedBy": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "employee": {
    "avatar": "string",
    "department": "string",
    "email": "string",
    "fullName": "string",
    "id": "string",
    "jobTitle": "string"
  },
  "employeeId": "string",
  "endDate": "2019-08-24",
  "endHalf": "FULL",
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "id": "string",
  "leaveType": "VACATION",
  "reason": "string",
  "rejectionReason": "string",
  "startDate": "2019-08-24",
  "startHalf": "FULL",
  "status": "PENDING",
  "tenantId": "string",
  "totalDays": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}