Docs / Calendar
Business days
Counts business days, or finds the date that many business days away. Weekends and public holidays are skipped.
POST
/v1/business-daysimport { Client } from "@liveapiio/liveapi";
const client = new Client({ token: process.env.LIVEAPI_TOKEN });
const days = await client.businessDays({ country: "TR", start: "2026-05-22", days: 5 });Request
Send Authorization: Bearer YOUR_TOKEN. The token stays on your server. Each library reads it from the environment and calls this endpoint for you.
| Field | Type | Description |
|---|---|---|
| country | string | ISO country code. Required. |
| start | string | Start date, YYYY-MM-DD. Required. |
| days | number | How many business days to move. Optional when end is set. |
| end | string | End date, YYYY-MM-DD. Optional when days is set. |
| weekend | number[] | Weekday numbers to treat as weekend, 0 through 6. Optional. |
Response
A 200 response uses one call. Returns the end date, the number of business days, the weekend rule, and the holidays that were skipped.
Errors
A failed request returns { "error": { "code", "message" } } and does not use a call.
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A required field is missing or has the wrong type. |
| 404 | not_found | Country not found. |
| 401 | unauthorized | The bearer token is missing or not recognized. |