Utile v1 / Sarbatori
Working days in a range
How many working days an interval holds, with the breakdown: calendar days, weekends removed, holidays removed. For contractual deadlines and for planning.
GET
https://oneapi.ro/api/utile/v1/sarbatori/zile-lucratoare
Query parameters
NameTypeDescriptionAccepted values
tararequired
string
REQUIRED. The country or subdivision code.
max 12 car.
de_laoptional
string | null
First day of the range, inclusive. Defaults to today (Romanian time) — "how many working days are left until the deadline" needs only
pana_la.
e.g. 2026-01-01e.g. 2026-05-01e.g. 2024-06-15
pana_larequired
string
REQUIRED. Last day of the range, inclusive.
e.g. 2026-12-31e.g. 2027-12-31e.g. 2026-05-31
How it behaves
- The breakdown is built so it can be checked by addition: the
verificarefield contains the equation itself, written out. If a figure looks wrong, you can see immediately where. - Holidays falling at the weekend are NOT deducted twice —
sarbatori_in_zile_lucratoarecounts only those that actually take a working day away. A total that mixed them could no longer be verified. - For Romania the figures match the Financiar module exactly: 252 days in 2024, 248 in 2025, 250 in 2026, 252 in 2027. That is not a coincidence — it is the same holiday source.
- Both ends are INCLUSIVE. A range from 1 January to 1 January has one calendar day, not zero.
- Without
de_lathe range starts today, inclusive — so today counts if it is a working day. A pastpana_lawithoutde_lareturns 422: the range would be negative.
What it is for
- Compute the working-hours norm of a month or a year, for payroll.
- Estimate the real duration of a project expressed in working days.
- Compare two years to see why one had lower production capacity.
Response structure
All fields below live inside data.
FieldTypeDescription
tara
string
The country the value refers to.
de_la
string
Start of the interval the response covers.
pana_la
string
End of the interval the response covers, inclusive.
zile_lucratoare
integer
The result: days that are neither weekend nor non-working holiday.
defalcare.calendaristice
integer
All days in the range, both ends included.
defalcare.weekend
integer
How many fall in the country's weekend.
defalcare.sarbatori_in_zile_lucratoare
integer
Holidays falling outside the weekend — only these reduce the total.
verificare
string
The equation written out, so you can redo the arithmetic.
zile_weekend
array
The weekend days used, as ISO numbers.
sursa
string
Where the days come from, stated explicitly.
verificat
boolean
true only if the source is the letter of the law.
Response examples
GEThttps://oneapi.ro/api/utile/v1/sarbatori/zile-lucratoare?tara=RO&de_la=2026-01-01&pana_la=2026-12-31
{
"data": {
"tara": "RO",
"de_la": "2026-01-01",
"pana_la": "2026-12-31",
"zile_lucratoare": 250,
"defalcare": {
"calendaristice": 365,
"weekend": 104,
"sarbatori_in_zile_lucratoare": 11
},
"verificare": "365 − 104 − 11 = 250",
"zile_weekend": [
6,
7
],
"sursa": "art. 139 din Codul Muncii (Legea 53/2003), prin modulul Financiar",
"verificat": true
}
}
GEThttps://oneapi.ro/api/utile/v1/sarbatori/zile-lucratoare?tara=RO&pana_la=2027-12-31
{
"data": {
"tara": "RO",
"de_la": "2026-10-06",
"pana_la": "2027-12-31",
"zile_lucratoare": 312,
"defalcare": {
"calendaristice": 452,
"weekend": 128,
"sarbatori_in_zile_lucratoare": 12
},
"verificare": "452 − 128 − 12 = 312",
"zile_weekend": [
6,
7
],
"sursa": "art. 139 din Codul Muncii (Legea 53/2003), prin modulul Financiar",
"verificat": true
}
}
GEThttps://oneapi.ro/api/utile/v1/sarbatori/zile-lucratoare?tara=FR&de_la=2026-05-01&pana_la=2026-05-31
{
"data": {
"tara": "FR",
"de_la": "2026-05-01",
"pana_la": "2026-05-31",
"zile_lucratoare": 18,
"defalcare": {
"calendaristice": 31,
"weekend": 10,
"sarbatori_in_zile_lucratoare": 3
},
"verificare": "31 − 10 − 3 = 18",
"zile_weekend": [
6,
7
],
"sursa": "Yasumi (MIT) — calculat algoritmic",
"verificat": false
}
}
GEThttps://oneapi.ro/api/utile/v1/sarbatori/zile-lucratoare?tara=RO&pana_la=2024-06-15&de_la=2024-06-15
{
"data": {
"tara": "RO",
"de_la": "2024-06-15",
"pana_la": "2024-06-15",
"zile_lucratoare": 0,
"defalcare": {
"calendaristice": 1,
"weekend": 1,
"sarbatori_in_zile_lucratoare": 0
},
"verificare": "1 − 1 − 0 = 0",
"zile_weekend": [
6,
7
],
"sursa": "art. 139 din Codul Muncii (Legea 53/2003), prin modulul Financiar",
"verificat": true
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 404 | negasit | The country is not covered. |
| 422 | validare | pana_la is before de_la (or before today, when de_la is omitted), or the date format is not YYYY-MM-DD. |
| 429 | cota_depasita | The 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": "pana_la is before de_la (or before today, when de_la is omitted), or the date format is not YYYY-MM-DD.",
"detalii": {
"tara": [
"The value sent does not satisfy the parameter rule."
]
}
}
}