Calculate total leave days
\<font color="#3b9f0f">post\</font> /api/calculate total days calculates the total number of leave days in a given leave request, based on the start and end date the calculation takes into account the weekend days and public holidays for a given country request \<font color="#00a2e9">body parameters\</font> country \<font color="#a7b4c3">string required\</font> the country where the leave will be taken, formatted as an iso alpha 2 code https //www iban com/country codes the information will be used to account for the weekend days and public holidays in the calculation example jp start date \<font color="#a7b4c3">string required\</font> the start date of the leave request, formatted as yyyy mm dd example 2023 12 31 end date \<font color="#a7b4c3">string required\</font> the end date of the leave request, formatted as yyyy mm dd is half start date \<font color="#a7b4c3">boolean \</font> \<font color="#a7b4c3">required\</font> whether the start date will be taken as a half day leave default false is half end date \<font color="#a7b4c3">boolean\</font> \<font color="#a7b4c3">required\</font> whether the end date will be taken as a half day leave default false example requests curl x post 'https //api marcopayroll com/api\ benkock8/api/calculate total days' \\ h 'content type application/json' \\ h 'authorization $auth token' \\ d '{ "country" "cn", "start date" "2023/11/11", "end date" "2023/11/21", "is half start date" "false", "is half end date" "false" }'import requests url = "https //api marcopayroll com/api\ benkock8/api/calculate total days" payload={ "country" "cn", "start date" "2023/11/11", "end date" "2023/11/21", "is half start date" "false", "is half end date" "false" } headers = { "accept" "application/json", "authorization" "your auth token" } response = requests post(url, headers=headers, data=payload) print(response text){ "totaldays" 7 } response (200) totaldays \<font color="#a7b4c3">integer\</font> the total number of leave days in a given leave request