Skip to content
Letacom

API documentation

Business Days API

A planned API for calculating working days between two dates, taking South African public holidays into account. The API is in development; the documentation below is an illustrative example and may change before release.

In development. This API is not yet live. The documentation below is an illustrative example of the planned interface and may change before release.

Overview

Status
Coming Soon
Version
v1 (in development)
Base URL
https://api.letacom.co.za (planned)

Authentication

API key in the Authorization header (Bearer). Keys are issued after an access request is approved. Store keys on your server and never expose them in client-side code.

Header
Authorization: Bearer YOUR_API_KEY
GET

/v1/business-days

Count business days between two dates (inclusive).

Parameters

NameInTypeDescription
from*querystring (date)Start date.
to*querystring (date)End date.
Example request
curl "https://api.letacom.co.za/v1/business-days?from=2026-12-14&to=2026-12-18" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response (200)
{
  "from": "2026-12-14",
  "to": "2026-12-18",
  "businessDays": 4,
  "holidays": [
    { "date": "2026-12-16", "name": "Day of Reconciliation" }
  ]
}
GET

/v1/holidays

List South African public holidays for a year.

Parameters

NameInTypeDescription
year*queryintegerCalendar year, e.g. 2027.
Example request
curl "https://api.letacom.co.za/v1/holidays?year=2027" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response (200)
{
  "year": 2027,
  "holidays": [
    { "date": "2027-01-01", "name": "New Year's Day" }
  ]
}

Usage requirements

  • HTTPS only
  • Dates in ISO 8601 format (YYYY-MM-DD)
  • Rate limits and pricing will be published at release
Error response (example)
{
  "error": {
    "code": "invalid_request",
    "message": "amount must be a positive number"
  }
}