Add new leave details

This API endpoint can add new leave type to your worker. Before you use this endpoint, you can get leave type name form the endpoint Get leave type by country.

Add new leave details

POST /add-ee-leave-details

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

customer_id

string

The unique Marco identifier for your company.

email

string

Applicant's email

leave_type_name

string

Leave type name

leave_type_country

string

Leave type country

lang

string

Leave type language

entitlement

number

Last Entitlement Amount

effective_date

date

Last leave details (entitlement and carried forward) effective date user can not have 2 leave details in the same date

carried

string

Last carried amount

carried_expired_date

date

Carried expiring date

notes

string

Notes

unit_type

string

Valid values: Days / Hours

Parameter Example

{
  "customer_id": "1",
  "email": "[email protected]",
  "leave_type_name": "Annual Leave",
  "leave_type_country": "CN",
  "lang": "EN",
  "entitlement": 40,
  "effective_date": "2024/08/28",
  "carried": 0,
  "carried_expired_date": null,
  "notes": "",
  "unit_type": "Hours"
}

Response

{
    "id": 2374,
    "customer_id": 1,
    "leave_type": 101,
    "entitlement": 5,
    "effective_date": "2024-08-28",
    "carried_expiry_date": null,
    "carried": 0,
    "notes": "",
    "country": 15,
    "user": 2232,
    "unit_type": "Hours",
    "platform_email": "[email protected]"
}

Last updated