{"openapi":"3.0.3","info":{"title":"Workday & Holiday Calculator API","version":"1.0.0","description":"Calculates business days, adds/subtracts workdays, and checks public holidays across 13 countries including Easter/movable holidays and Hungarian bridge/swap days."},"servers":[{"url":"https://api.tinplate.dev","description":"Production Edge Gateway"}],"components":{"schemas":{"WorkdayBetweenResponse":{"type":"object","properties":{"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"country":{"type":"string","enum":["HU","DE","GB","US","FR","ES","IT","NL","AT","PL","RO","SK","CZ"],"example":"HU","description":"ISO 3166-1 alpha-2 country code."},"total_days":{"type":"integer","minimum":0,"example":30},"working_days":{"type":"integer","minimum":0,"example":20},"weekend_days":{"type":"integer","minimum":0,"example":8},"holiday_days":{"type":"integer","minimum":0,"example":2},"holidays_in_range":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"name":{"type":"string","example":"Labour Day"},"type":{"type":"string","enum":["public","bridge_rest"],"example":"public"}},"required":["date","name","type"]}},"workday_adjustments":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"kind":{"type":"string","enum":["bridge_rest","swap_workday"]},"name":{"type":"string"}},"required":["date","kind","name"]}}},"required":["start_date","end_date","country","total_days","working_days","weekend_days","holiday_days","holidays_in_range","workday_adjustments"]},"WorkdayBetweenRequest":{"type":"object","properties":{"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-04-01"},"end_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-04-30"},"country":{"type":"string","enum":["HU","DE","GB","US","FR","ES","IT","NL","AT","PL","RO","SK","CZ"],"example":"HU","description":"ISO 3166-1 alpha-2 country code."},"include_start":{"type":"boolean","example":true},"include_end":{"type":"boolean","example":true}},"required":["start_date","end_date","country"]},"WorkdayAddResponse":{"type":"object","properties":{"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"days_added":{"type":"integer","example":5},"result_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-04-13"},"country":{"type":"string","enum":["HU","DE","GB","US","FR","ES","IT","NL","AT","PL","RO","SK","CZ"],"example":"HU","description":"ISO 3166-1 alpha-2 country code."},"skipped_holidays":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"name":{"type":"string","example":"Labour Day"},"type":{"type":"string","enum":["public","bridge_rest"],"example":"public"}},"required":["date","name","type"]}}},"required":["start_date","days_added","result_date","country","skipped_holidays"]},"WorkdayAddRequest":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-04-02"},"days":{"type":"integer","minimum":-1000,"maximum":1000,"example":5},"country":{"type":"string","enum":["HU","DE","GB","US","FR","ES","IT","NL","AT","PL","RO","SK","CZ"],"example":"HU","description":"ISO 3166-1 alpha-2 country code."}},"required":["date","days","country"]},"IsWorkdayResponse":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"country":{"type":"string","enum":["HU","DE","GB","US","FR","ES","IT","NL","AT","PL","RO","SK","CZ"],"example":"HU","description":"ISO 3166-1 alpha-2 country code."},"is_workday":{"type":"boolean","example":false},"is_weekend":{"type":"boolean","example":false},"holiday":{"type":"object","nullable":true,"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"name":{"type":"string","example":"Labour Day"},"type":{"type":"string","enum":["public","bridge_rest"],"example":"public"}},"required":["date","name","type"]},"adjustment":{"type":"object","nullable":true,"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-05-01"},"kind":{"type":"string","enum":["bridge_rest","swap_workday"]},"name":{"type":"string"}},"required":["date","kind","name"]}},"required":["date","country","is_workday","is_weekend","holiday","adjustment"]},"IsWorkdayRequest":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","example":"2026-04-03"},"country":{"type":"string","enum":["HU","DE","GB","US","FR","ES","IT","NL","AT","PL","RO","SK","CZ"],"example":"HU","description":"ISO 3166-1 alpha-2 country code."}},"required":["date","country"]},"ResponseMeta":{"type":"object","required":["request_id"],"properties":{"request_id":{"type":"string","format":"uuid"},"ms":{"type":"integer","minimum":0},"version":{"type":"string","example":"1.0.0"}}},"ErrorEnvelope":{"type":"object","required":["ok","error","meta"],"properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string","example":"Request body failed validation"}}},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}}},"parameters":{}},"paths":{"/v1/workday-holiday/between":{"post":{"tags":["09_WORKDAY_HOLIDAY"],"summary":"Count working days, weekends, and holidays between two dates","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkdayBetweenRequest"}}}},"responses":{"200":{"description":"Working days count and holiday breakdown","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WorkdayBetweenResponse"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"required":["ok","data","meta"]}}}},"400":{"description":"Invalid input or malformed JSON request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid authentication credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request payload exceeds subscribed plan byte cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/workday-holiday/add":{"post":{"tags":["09_WORKDAY_HOLIDAY"],"summary":"Add or subtract business days from a date","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkdayAddRequest"}}}},"responses":{"200":{"description":"Resulting business date","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WorkdayAddResponse"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"required":["ok","data","meta"]}}}},"400":{"description":"Invalid input or malformed JSON request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid authentication credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request payload exceeds subscribed plan byte cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/v1/workday-holiday/is-workday":{"post":{"tags":["09_WORKDAY_HOLIDAY"],"summary":"Check whether a specific date is a working day","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsWorkdayRequest"}}}},"responses":{"200":{"description":"Workday status for the given date","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/IsWorkdayResponse"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"required":["ok","data","meta"]}}}},"400":{"description":"Invalid input or malformed JSON request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid authentication credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request payload exceeds subscribed plan byte cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}