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-days
import { 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.

FieldTypeDescription
countrystringISO country code. Required.
startstringStart date, YYYY-MM-DD. Required.
daysnumberHow many business days to move. Optional when end is set.
endstringEnd date, YYYY-MM-DD. Optional when days is set.
weekendnumber[]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.

StatusCodeWhen
400invalid_requestA required field is missing or has the wrong type.
404not_foundCountry not found.
401unauthorizedThe bearer token is missing or not recognized.

We value your privacy

We use necessary cookies to run this website. With your consent, we would also like to use analytics and marketing cookies. Read our cookie policy.