Skip to main content
PUT
Update the configuration of an existing leave type. Both PUT and PATCH methods are supported. This endpoint allows you to modify leave policies, allowances, and other settings.

Authentication

Requires authentication with Bearer token. Available to:
  • Super Admin
  • HR Manager

Path Parameters

string
required
The unique identifier of the leave type (UUID format)Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Request Body

All fields are optional. Only include the fields you want to update.
string
Name of the leave typeExample: "Annual Leave (Updated)"
string
Short code for the leave typeExample: "AL"
string
Detailed description of the leave typeExample: "Updated policy for annual vacation time"
number
Total number of days allowed per yearExample: 22
boolean
Whether this leave type is paid or unpaidExample: true
boolean
Whether documentation is requiredExample: true
boolean
Whether unused days can be carried forwardExample: true
number
Maximum number of days that can be carried forwardExample: 10
string
Hex color code for calendar displayExample: "#10B981"
string
Status of the leave type: active or inactiveExample: "active"

Response

boolean
Indicates if the request was successful
object
The updated leave type object
Changes to leave type configuration will affect all future leave requests. Existing approved leave requests will not be modified.

PATCH vs PUT

This endpoint supports both HTTP methods:
  • PUT: Update specific fields (partial update)
  • PATCH: Update specific fields (partial update)
Both methods work identically - you only need to include the fields you want to update.