Last updated 9 October 2026View as Markdown
Holiday entitlement
POST /v1/holiday-entitlement Needs a keyStatutory annual leave from days worked a week, or the holiday an irregular hours or part-year worker accrues from hours worked (12.07%).
Request
A JSON body. Fields not listed here are rejected.
| Field | Type | Description |
|---|---|---|
tax_year optional | string | The tax year, such as 2026-27. The latest when not given. Default "2026-27". |
days_per_week optional | number | Days worked a week, for a regular pattern. Allowed: more than 0, up to 7. |
hours_worked optional | number | Hours worked in a pay period, for an irregular hours or part-year worker. Allowed: 0 to 744. |
Example
cURL
curl https://api.checktakehomepay.co.uk/v1/holiday-entitlement \
-H "Authorization: Bearer $CHECKTAKEHOMEPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"days_per_week": 4
}'Node.js
const response = await fetch('https://api.checktakehomepay.co.uk/v1/holiday-entitlement', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CHECKTAKEHOMEPAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"days_per_week": 4
}),
});
const result = await response.json();Python
import os
import requests
response = requests.post(
"https://api.checktakehomepay.co.uk/v1/holiday-entitlement",
headers={"Authorization": f"Bearer {os.environ['CHECKTAKEHOMEPAY_API_KEY']}"},
json={"days_per_week": 4},
)
result = response.json()Response
200, with the result and what produced it: tax_year, engine, hmrc_test_data, assumptions and sources. This is the example's real response. Every field's type is in the OpenAPI document.
200 OK
{
"tax_year": "2026-27",
"engine": "2026-27.1",
"hmrc_test_data": "rest of UK and Welsh tax v1.0, Scottish tax v1.1, NI v1.0, directors NI v1.0, student loans v1.0",
"days": 22.4,
"capped": false,
"assumptions": [
"Statutory annual leave is 5.6 weeks of the working pattern, at most 28 days, not rounded to whole days. Bank holidays can be counted in it."
],
"sources": [
"https://www.gov.uk/holiday-entitlement-rights",
"https://www.legislation.gov.uk/uksi/1998/1833/regulation/13"
]
}Errors
- 400
INVALID_INPUT: the message names each field that is wrong. - 401
UNAUTHENTICATED(no key) orINVALID_KEY(a key we don’t know, or a revoked one).
Every code, and how to handle them: Errors.