How do I authenticate with this API?
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Range mode for counting working days between two dates, offset mode for adding or subtracting them. Built-in holiday calendars for US, DE, and IN — plus a custom holiday list when yours differ.
Why Working Days API
/api/v1/working-days
Same calculation logic across GET and POST. Pick the shape your client speaks.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | string | yes | Base date. ISO 8601 by default; use date_format for others. |
| end_date | string | either* | End date (range mode). Must be ≥ start_date. |
| days_offset | number | either* | Working days to add/subtract (offset mode). Integer. |
| direction | string | no | "forward" or "backward" for offset mode. Default forward. |
| region | string | no | ISO 3166-1 alpha-2 code. "US", "DE", "IN" supported. Default US. |
| custom_holidays | array | no | Additional holiday dates to exclude on top of regional calendar. |
| include_start | boolean | no | Whether to count start_date in range mode. Default true. |
| api_key | string | yes | API key via query string. Alternatively pass as x-api-key header. |
*Provide either end_date (range) or days_offset (offset).
Range or offset, single or batch — same calculate endpoint handles all of it.
POST https://datpaq.com/api/v1/working-days/calculate
Content-Type: application/json
{
"start_date": "2026-01-15",
"end_date": "2026-01-31",
"region": "US",
"include_start": true
}POST https://datpaq.com/api/v1/working-days/calculate
Content-Type: application/json
{
"start_date": "2026-02-01",
"days_offset": 10,
"direction": "forward",
"region": "DE"
}Error reference
Every error response includes a correlationId for request tracing and a clear error message.
{
"success": false,
"error": "end_date must be on or after start_date",
"correlationId": "req_abc123def456"
}FAQ
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.
Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.
Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.
Stop building business-day logic by hand. Range mode for counts, offset mode for deadlines, regional holidays handled.