{
    "documentation_version": 1,
    "base_url": "https://c7dev.com",
    "instructions_url": "https://c7dev.com/api_instructions",
    "selection": {
        "method": "GET",
        "parameter": "api",
        "required": false,
        "description": "Omit api for the full suite, or use an endpoint name for its instructions only.",
        "example_url": "https://c7dev.com/api_instructions?api=media_api"
    },
    "instructions": [
        "Choose an endpoint by its description, then use its documented HTTP method and parameter location.",
        "URL-encode GET query values. Preserve identifiers such as VAT numbers and registration codes as strings.",
        "For JSON APIs, require HTTP success and result=true before using returned data. Read error_message on failure.",
        "Do not fabricate missing data or treat null as zero or false. Warnings may indicate incomplete or older data.",
        "Do not blindly retry invalid input or access errors. Temporary service failures may be retried with bounded backoff.",
        "Responses prohibit browser caching. Inspect cached, timestamps and X-API-Version when those fields are available."
    ],
    "authentication": {
        "documentation": "Public; no token is required to read these instructions.",
        "restricted_endpoints": "Supply credentials provided by the API operator when access control requires them.",
        "token_locations": [
            "Authorization: Bearer YOUR_ACCESS_TOKEN",
            "X-Access-Token: YOUR_ACCESS_TOKEN",
            "access_token query or form parameter"
        ],
        "domain": "Send domain as a query or form parameter when the client token is restricted to registered domains. Access may also be restricted by IP.",
        "ai_generate": "Requires both access_token and domain in the form body."
    },
    "json_response_envelope": {
        "result": "boolean; request succeeded",
        "error": "boolean; request failed",
        "error_message": "string; empty on success",
        "server_time": "integer; Unix timestamp in seconds"
    },
    "errors": {
        "400": "Missing or invalid input.",
        "403": "Access denied; check token, registered domain and IP permissions.",
        "404": "Unknown API selected for instructions.",
        "405": "Unsupported method for the instructions endpoint.",
        "500": "Processing failed.",
        "503": "Service temporarily unavailable."
    },
    "apis": [
        {
            "name": "holidays_api",
            "method": "GET",
            "path": "/holidays_api",
            "description": "Full-year public holidays and selected cultural and commemorative observances with native, English and Lithuanian names.",
            "instructions_url": "https://c7dev.com/api_instructions?api=holidays_api",
            "request": {
                "parameter_location": "query",
                "parameters": {
                    "country": {
                        "type": "string",
                        "required": true,
                        "description": "Country code; UK is accepted as an alias of GB. Codes are case-insensitive.",
                        "enum": [
                            "LT",
                            "UA",
                            "GB",
                            "UK"
                        ]
                    },
                    "language": {
                        "type": "string",
                        "required": false,
                        "description": "English (en), Lithuanian (lt), or the country native language. Ukrainian (uk) is supported only for Ukraine. Native names are always returned separately.",
                        "default": "en",
                        "enum": [
                            "en",
                            "lt",
                            "uk"
                        ]
                    },
                    "year": {
                        "type": "integer",
                        "required": false,
                        "description": "Full calendar year; defaults to the current year in the requested country.",
                        "minimum": 2024,
                        "maximum": 2100
                    }
                }
            },
            "response": {
                "format": "application/json",
                "response_fields": [
                    "country",
                    "language",
                    "native_language",
                    "year",
                    "holidays",
                    "notes"
                ],
                "item_fields": [
                    "id",
                    "date",
                    "name",
                    "name_native",
                    "name_en",
                    "name_lt",
                    "is_day_off",
                    "regions",
                    "substitute_for"
                ],
                "headers": {
                    "X-API-Version": "holidays_api_v1"
                }
            },
            "details": {
                "Supported countries": "LT (Lithuania), UA (Ukraine), GB or UK (United Kingdom)",
                "Optional parameters": "language: en (default), lt, or uk for Ukraine only; year: 2024–2100 (defaults to the current year in the requested country)",
                "Returns": "All holidays for the selected year, sorted by date; name follows language, while name_native, name_en and name_lt are always included",
                "Regional holidays": "UK regions are identified separately, including weekday substitutes for weekend bank holidays"
            },
            "notes": [
                "Always returns the whole selected year, including past dates. Includes public holidays and selected cultural and commemorative observances.",
                "is_day_off marks holiday-related non-working days under current calendar rules, not ordinary weekends or individual work schedules.",
                "name uses the requested language. name_native, name_en and name_lt are always present; native_language is lt for Lithuania, uk for Ukraine and en for the United Kingdom.",
                "country is normalized to LT, UA or GB. language=uk means Ukrainian; country=UK means the United Kingdom.",
                "Lithuania and the United Kingdom support language=en or lt. Ukraine supports en, lt or uk. Other country/language combinations return HTTP 400.",
                "UK regions use GB-ENG, GB-WLS, GB-SCT and GB-NIR. Original weekend dates remain as observances; substitute weekdays have is_day_off=true and substitute_for pointing to the original date.",
                "For Ukraine, is_day_off=false follows current martial-law rules suspending holiday days off and weekend transfers. Update the calendar when those rules change.",
                "Current recurring rules are supported from 2024 to 2100. Future one-off holidays and rule changes require calendar updates."
            ],
            "examples": [
                {
                    "method": "GET",
                    "url": "https://c7dev.com/holidays_api?country=LT"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/holidays_api?country=UA&language=lt&year=2026"
                },
                {
                    "method": "GET",
                    "url": "https://c7dev.com/holidays_api?country=UK&language=en"
                }
            ]
        }
    ],
    "result": true,
    "error": false,
    "error_message": "",
    "server_time": 1792401655
}