oneapi
Sign in
Utile v1 / Sarbatori

Countries with holidays

The countries whose holiday calendar we hold, flagged by whether it was checked against the official act and whether it has subdivisions with their own days off.

GET
https://oneapi.ro/api/utile/v1/sarbatori/tari

Query parameters

This route accepts no query parameters.

How it behaves

  • The route exists precisely to make the limit visible. We do not cover the whole world: the engine has 47 countries plus their subdivisions. Someone asking about an uncovered country should learn it from a list, not from an empty response that reads like "that country has no holidays".
  • Only Romania is verified. Its days come from art. 139 of the Labour Code, through the Financiar module. The check was necessary: comparing the library's output against the law, Good Friday was missing — a public holiday since 2018 — and Constantin Brâncuși Day was added, which is a day of celebration but NOT a non-working day. Two errors on the one country we can check authoritatively.
  • Subdivisions have compound codes (DE-BY for Bavaria, US-CA for California) and are requested just like countries. They matter where holidays differ inside a country.

What it is for

  • Check whether your customer's country is covered before building anything on top of the route.
  • Populate a country picker in a deadline-calculation interface.
  • Find out which countries are checked against legislation and which are merely computed.

Response structure

All fields below live inside data.

FieldTypeDescription
tari[] array The covered countries: {cod, nume, verificat}.
tari[].cod string Code from the source code list — the key you filter on.
tari[].nume string The name, exactly as the source publishes it.
tari[].verificat boolean true only where the days come from the letter of the law rather than a computation.
subdiviziuni array Compound codes of subdivisions with their own calendar.
observatie string A summary of the coverage and of the verification limit.
sursa.romania string
sursa.restul string
sursa.de_ce_nu_altceva string

Response examples

GEThttps://oneapi.ro/api/utile/v1/sarbatori/tari
{
    "data": {
        "tari": [
            {
                "cod": "AD",
                "nume": "Andorra",
                "verificat": false
            }
        ],
        "subdiviziuni": [
            "AT-1",
            "AT-2",
            "AT-3",
            "AT-4",
            "AT-5",
            "AT-6",
            "AT-7",
            "AT-8",
            "AT-9",
            "AU-ACT",
            "AU-NSW",
            "AU-NT",
            "AU-QLD",
            "AU-QLD-BRI",
            "AU-SA",
            "AU-TAS",
            "AU-TAS-CN",
            "AU-TAS-FI",
            "AU-TAS-KI",
            "AU-TAS-NE",
            "AU-TAS-NW",
            "AU-TAS-NW-CH",
            "AU-TAS-SOU",
            "AU-TAS-SOU-SE",
            "AU-VIC",
            "AU-WA",
            "CA-AB",
            "CA-BC",
            "CA-MB",
            "CA-NB",
            "CA-NL",
            "CA-NS",
            "CA-NT",
            "CA-NU",
            "CA-ON",
            "CA-PE",
            "CA-QC",
            "CA-SK",
            "CA-YT",
            "CH-AG",
            "CH-AI",
            "CH-AR",
            "CH-BE",
            "CH-BL",
            "CH-BS",
            "CH-FR",
            "CH-GE",
            "CH-GL",
            "CH-GR",
            "CH-JU",
            "CH-LU",
            "CH-NE",
            "CH-NW",
            "CH-OW",
            "CH-SG",
            "CH-SH",
            "CH-SO",
            "CH-SZ",
            "CH-TG",
            "CH-TI",
            "CH-UR",
            "CH-VD",
            "CH-VS",
            "CH-ZG",
            "CH-ZH",
            "DE-BB",
            "DE-BE",
            "DE-BW",
            "DE-BY",
            "DE-HB",
            "DE-HE",
            "DE-HH",
            "DE-MV",
            "DE-NI",
            "DE-NW",
            "DE-RP",
            "DE-SH",
            "DE-SL",
            "DE-SN",
            "DE-ST",
            "DE-TH",
            "ES-AN",
            "ES-AR",
            "ES-AS",
            "ES-CB",
            "ES-CE",
            "ES-CL",
            "ES-CM",
            "ES-CN",
            "ES-CT",
            "ES-EX",
            "ES-GA",
            "ES-IB",
            "ES-MC",
            "ES-MD",
            "ES-ML",
            "ES-NC",
            "ES-PV",
            "ES-RI",
            "ES-VC",
            "FR-57",
            "FR-67",
            "FR-68",
            "GB-ENG",
            "GB-NIR",
            "GB-SCT",
            "GB-WLS",
            "US-NYSE"
        ],
        "observatie": "Acoperim 49 de țări și 108 de subdiviziuni. Doar România e verificată față de legislație (art. 139 Codul Muncii); restul se calculează cu Yasumi și nu sunt confruntate cu textul de lege al fiecărei țări.",
        "sursa": {
            "romania": "art. 139 din Codul Muncii (Legea 53/2003), prin modulul Financiar — verificat",
            "restul": "Yasumi 2.x (MIT) — calculat algoritmic, neconfruntat cu legislația fiecărei țări",
            "de_ce_nu_altceva": "API-ul Nager.Date, alternativa cu cea mai largă acoperire, interzice în termenii lui folosirea datelor pentru „a publica sau opera un portal propriu de sărbători\" și cere sponsorizare pentru uz comercial."
        }
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422validareThe route takes no parameters apart from lang: any other parameter returns 422 instead of being ignored.
429cota_depasitaThe plan's monthly quota has been exceeded (see Retry-After).

All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.

{
    "eroare": {
        "cod": "validare",
        "mesaj": "The route takes no parameters apart from lang: any other parameter returns 422 instead of being ignored."
    }
}