{
    "openapi": "3.1.0",
    "info": {
        "title": "Nakordoni Developer API — Road Conditions API",
        "version": "2026-12-04",
        "summary": "REST + JSON over HTTPS. One base URL, one key, predictable envelopes.",
        "description": "Generated from the Nakordoni Developer API endpoint registry (the same source as https://nakordoni.eu/api/v1/docs.md). Path-versioned per endpoint: /api/v1/… is stable; /api/v2/… and newer serve the newer behaviour only for the endpoints listed. Free key: https://nakordoni.eu/en/developers/signup",
        "termsOfService": "https://nakordoni.eu/en/p/developer_api_terms",
        "contact": {
            "name": "Nakordoni Developer Portal",
            "url": "https://nakordoni.eu/en/developers"
        },
        "license": {
            "name": "Nakordoni Developer API Terms",
            "url": "https://nakordoni.eu/en/p/developer_api_terms"
        }
    },
    "externalDocs": {
        "description": "API documentation",
        "url": "https://nakordoni.eu/en/developers/docs/road-conditions"
    },
    "servers": [
        {
            "url": "https://nakordoni.eu",
            "description": "Production"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        },
        {
            "apiKeyHeader": []
        },
        {
            "apiKeyQuery": []
        }
    ],
    "tags": [
        {
            "name": "road-conditions",
            "description": "Road Conditions API",
            "externalDocs": {
                "url": "https://nakordoni.eu/en/developers/docs/road-conditions"
            }
        }
    ],
    "paths": {
        "/api/v1/data/road-conditions": {
            "get": {
                "tags": [
                    "road-conditions"
                ],
                "summary": "Road Conditions API",
                "description": "Live road conditions on the approaches to a border crossing: accidents, roadworks, closures, congestion, weather hazards, potholes and ice. Merges our own driver reports with the incident feeds our navigator runs on, deduplicated across feeds, each row carrying a stable opaque id. Send ppid for one crossing, lat and lng for a radius search of up to 50 km, or country for the corridors of all its checkpoints. A corridor is the last 50 km of the main road to the crossing, on both sides of the border. Nothing farther than 100 km from a land border is returned.\n\nExample: `/api/v1/data/road-conditions?ppid=id_13&lang=en`\n\nHuman docs: https://nakordoni.eu/en/developers/docs/road-conditions",
                "operationId": "roadConditionsV1",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "ISO-2 country code. Use it if you send neither ppid nor lat+lng. Returns the corridors of all checkpoints on that country's side, not the whole country. A country with no checkpoints returns no items",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "ppid",
                        "in": "query",
                        "required": false,
                        "description": "Checkpoint ID, e.g. id_13. Send ppid or lat+lng, or country for all its checkpoints; a call with none of them gets 400. Scopes the answer to that crossing's corridor: the last 50 km of the main road to it on BOTH sides of the border",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "condition_type",
                        "in": "query",
                        "required": false,
                        "description": "accident|roadwork|closure|congestion|weather|hazard|pothole|speed_bump|object|stopped|ice|other (optional). In v1 anything an upstream feed reports outside this list is mapped to `other`; v2 returns the raw value",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "severity",
                        "in": "query",
                        "required": false,
                        "description": "low|moderate|major|critical (optional)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lat",
                        "in": "query",
                        "required": false,
                        "description": "Latitude (optional) — with lng, switches to a radius search. Only conditions within 100 km of a land border are returned",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lng",
                        "in": "query",
                        "required": false,
                        "description": "Longitude (optional)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "radius",
                        "in": "query",
                        "required": false,
                        "description": "Radius km (default 50, maximum 50; a larger value is treated as 50). Applies ONLY with lat+lng; on the corridor path the road itself is the filter, not a circle",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sources",
                        "in": "query",
                        "required": false,
                        "description": "all (default) | user (our own driver reports only) | external (road-authority and provider feeds only)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Max results (default 100, cap 500)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Pagination offset (optional)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_expired",
                        "in": "query",
                        "required": false,
                        "description": "1 = also return conditions whose expiry has passed (optional)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lang",
                        "in": "query",
                        "required": false,
                        "description": "Language for condition_type_name / severity_name labels — all 25 site languages plus hr, nl, pt (default uk)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response (shared envelope; `data` as documented).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "allOf": [
                                        {
                                            "$ref": "#/components/schemas/ApiEnvelope"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "conditions": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "condition_type": {
                                                                        "description": "What it is (roadworks, closure, accident, weather…), with condition_type_name in the requested language."
                                                                    },
                                                                    "severity": {
                                                                        "description": "How bad it is, with severity_name."
                                                                    },
                                                                    "description": {
                                                                        "description": "Free-text detail as published, with road_name and direction."
                                                                    },
                                                                    "latitude": {
                                                                        "description": "Where it is, with longitude and country_code."
                                                                    },
                                                                    "corridor_ppid": {
                                                                        "description": "The border crossing whose approach corridor this sits on, when it is on one."
                                                                    },
                                                                    "estimated_duration": {
                                                                        "description": "How long it is expected to last, with expires_at and created_at."
                                                                    },
                                                                    "remaining_minutes": {
                                                                        "description": "Minutes until expires_at. Present only when the condition has an expiry."
                                                                    },
                                                                    "description_lang": {
                                                                        "description": "v2 only: the language of description. It can differ from lang until a new text is translated, and it is null when the feed has mixed languages."
                                                                    },
                                                                    "description_original": {
                                                                        "description": "v2 only: the source text. Present only when description is a translation."
                                                                    },
                                                                    "external_id": {
                                                                        "description": "Opaque stable id of a feed incident (\"rc_\" + 16 hex, null for our own driver reports) — the same incident keeps it across polls, use it to deduplicate. id is a stable int."
                                                                    }
                                                                }
                                                            }
                                                        },
                                                        "total": {
                                                            "description": "Matches for the query, with limit and offset for paging."
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/E400"
                    },
                    "401": {
                        "$ref": "#/components/responses/E401"
                    },
                    "403": {
                        "$ref": "#/components/responses/E403"
                    },
                    "404": {
                        "$ref": "#/components/responses/E404"
                    },
                    "410": {
                        "$ref": "#/components/responses/E410"
                    },
                    "429": {
                        "$ref": "#/components/responses/E429"
                    },
                    "500": {
                        "$ref": "#/components/responses/E500"
                    },
                    "503": {
                        "$ref": "#/components/responses/E503"
                    },
                    "504": {
                        "$ref": "#/components/responses/E504"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "NKD-DEV-XXXX-XXXX-XXXX",
                "description": "API key from https://nakordoni.eu/en/developers, sent as `Authorization: Bearer NKD-DEV-…` (preferred)."
            },
            "apiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key",
                "description": "Same API key in the X-API-Key header."
            },
            "apiKeyQuery": {
                "type": "apiKey",
                "in": "query",
                "name": "key",
                "description": "Same API key as ?key= (fallback; keys in URLs end up in logs)."
            }
        },
        "schemas": {
            "ApiEnvelope": {
                "type": "object",
                "required": [
                    "ok"
                ],
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "api_version": {
                        "type": "string",
                        "description": "Version that served the call, e.g. \"1\", \"v2\"."
                    },
                    "product": {
                        "type": "string"
                    },
                    "attribution": {
                        "type": "string",
                        "description": "Show this attribution with the data."
                    },
                    "data": {
                        "description": "Product payload — shape per product, see the operation."
                    },
                    "snapshot": {
                        "type": "object"
                    },
                    "usage": {
                        "type": "object",
                        "properties": {
                            "requests_today": {
                                "type": "integer"
                            },
                            "limit_today": {
                                "type": "integer"
                            },
                            "remaining": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "ApiError": {
                "type": "object",
                "required": [
                    "ok",
                    "error"
                ],
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": false
                    },
                    "api_version": {
                        "type": "string"
                    },
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "examples": [
                                    "bad_request",
                                    "missing_api_key",
                                    "invalid_api_key",
                                    "product_unavailable",
                                    "unknown_product",
                                    "version_sunset",
                                    "qps_exceeded",
                                    "quota_exceeded",
                                    "internal_error",
                                    "busy",
                                    "timeout"
                                ]
                            },
                            "message": {
                                "type": "string"
                            },
                            "docs": {
                                "type": "string",
                                "format": "uri"
                            },
                            "developer_portal": {
                                "type": "string",
                                "format": "uri"
                            }
                        },
                        "additionalProperties": true
                    }
                }
            }
        },
        "responses": {
            "E400": {
                "description": "Bad request (bad_request, invalid_country, unsupported_version, geocode_failed, scope_required, …).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E401": {
                "description": "Missing API key (missing_api_key).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E403": {
                "description": "Key invalid, blocked or not allowed for this product (invalid_api_key, product_unavailable, not_approved, …).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E404": {
                "description": "Unknown product (unknown_product).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E410": {
                "description": "Version retired (version_sunset, version_closed_to_new_accounts).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E429": {
                "description": "Rate or quota limit (qps_exceeded, quota_exceeded, duplicate_request, ip_temporarily_blocked). See Retry-After.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E500": {
                "description": "Internal error (internal_error).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E503": {
                "description": "Temporarily unavailable (busy).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            },
            "E504": {
                "description": "Upstream timeout (timeout).",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/ApiError"
                        }
                    }
                }
            }
        }
    }
}
