Calculate time off total days

Calculates the total number of leave days in a given leave request, based on the start date and the end date. The calculation takes into account the weekend days and public holidays for a given country.

Calculate time off total days

GET /calculate-total-days

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

Email of the user

leave_type_name

string

Leave type name

leave_type_country

string

Leave type country, format as "CN"

start_date

date

Time off start date

end_date

date

Time off end date

start_date_day_type

string

Valid values: Full/First Half/Second Half

end_date_day_type

string

Valid values: Full/First Half/Second Half

Parameter Example

{
  "start_date": "2024-11-02",
  "leave_type_country": "CN",
  "end_date": "2024-11-02",
  "customer_id": "1",
  "email": "[email protected]",
  "leave_type_name": "Annual Leave",
  "lang": "EN",
  "start_date_day_type": "Full",
  "end_date_day_type": "Full"
}

Response

{"totaldays":7}

Last updated