{
    "openapi": "3.1.0",
    "info": {
        "title": "Theorie Rijbewijs · Openbare informatie",
        "version": "1.4.0",
        "termsOfService": "https://theorie-rijbewijs.nl/open-data/#reutilisation",
        "description": "Alleen lezen, zonder sleutel en zonder cookie. Openbare CORS voor GET-verzoeken. Quotum gedeeld tussen API en MCP: 120 verzoeken per minuut en per IP-adres. Bij een 429-antwoord: respecteer Retry-After. Een wijzigingsdatum is geen feitelijke controle.",
        "contact": {
            "email": "contact@theorie-rijbewijs.nl"
        }
    },
    "security": [],
    "servers": [
        {
            "url": "https://theorie-rijbewijs.nl/api/v1"
        }
    ],
    "paths": {
        "/": {
            "get": {
                "operationId": "getCatalogue",
                "summary": "Beschrijving en links van de API",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Technische parameter voor een actuele lezing. Zonder deze parameter: volg de HTTP 307-omleiding op hetzelfde domein.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Openbaar resultaat",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Volg de omleiding naar de actuele lezing op hetzelfde domein.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Aantal seconden dat je moet wachten voordat je het opnieuw probeert.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/facts": {
            "get": {
                "operationId": "searchFacts",
                "summary": "Zoeken in de openbare documenten",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Technische parameter voor een actuele lezing. Zonder deze parameter: volg de HTTP 307-omleiding op hetzelfde domein.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Woorden die in de titel, de inhoud of de verwijzingen moeten voorkomen. Accenten worden genegeerd; alle betekenisvolle woorden moeten aanwezig zijn.",
                        "schema": {
                            "type": "string",
                            "maxLength": 300
                        }
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "description": "Gebied dat in het document is opgegeven. De officiële regels en de lessen dragen “Nederland”.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "nederland"
                            ]
                        }
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "fact",
                                "expertise",
                                "organization",
                                "offer",
                                "person",
                                "article",
                                "lesson",
                                "page",
                                "tool"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000,
                            "default": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Openbaar resultaat",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "results",
                                        "total",
                                        "limit",
                                        "offset"
                                    ],
                                    "properties": {
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Fact"
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "limit": {
                                            "type": "integer"
                                        },
                                        "offset": {
                                            "type": "integer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Volg de omleiding naar de actuele lezing op hetzelfde domein.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Aantal seconden dat je moet wachten voordat je het opnieuw probeert.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/facts/{id}": {
            "get": {
                "operationId": "getFact",
                "summary": "Een document lezen met zijn herkomst",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Technische parameter voor een actuele lezing. Zonder deze parameter: volg de HTTP 307-omleiding op hetzelfde domein.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:(?:expertise-)?fait|page|brand|offer|person)-[a-f0-9]{16}$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Openbaar resultaat",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Fact"
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Volg de omleiding naar de actuele lezing op hetzelfde domein.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Aantal seconden dat je moet wachten voordat je het opnieuw probeert.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Ongeldig verzoek, onbekend document, limiet bereikt of dienst niet beschikbaar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Fact": {
                "type": "object",
                "required": [
                    "id",
                    "kind",
                    "title",
                    "text",
                    "url",
                    "regions",
                    "sources"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^(?:(?:expertise-)?fait|page|brand|offer|person)-[a-f0-9]{16}$"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "fact",
                            "expertise",
                            "organization",
                            "offer",
                            "person",
                            "article",
                            "lesson",
                            "page",
                            "tool"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "text": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "regions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "verified_at": {
                        "type": "string",
                        "format": "date"
                    },
                    "effective_from": {
                        "type": "string",
                        "format": "date"
                    },
                    "modified_at": {
                        "type": "string"
                    },
                    "evidence_kind": {
                        "type": "string",
                        "enum": [
                            "product",
                            "method",
                            "declaration",
                            "analysis"
                        ]
                    },
                    "verification_scope": {
                        "type": "string"
                    },
                    "bibliography": {
                        "type": "array",
                        "description": "Literatuurverwijzingen die in de tekst van een les worden genoemd.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "chapter": {
                        "type": "object",
                        "description": "Het hoofdstuk van de cursus waartoe een les behoort.",
                        "properties": {
                            "number": {
                                "type": "integer"
                            },
                            "title": {
                                "type": "string"
                            }
                        }
                    },
                    "image": {
                        "type": "string",
                        "format": "uri",
                        "description": "Afbeelding van een les: de miniatuur van de video, anders de eerste afbeelding uit de inhoud."
                    },
                    "video": {
                        "type": "object",
                        "description": "YouTube-video die bij de les wordt getoond, met de waarden van de gestructureerde gegevens. Zonder transcriptie.",
                        "properties": {
                            "youtube_id": {
                                "type": "string"
                            },
                            "title": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "embed_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "thumbnail_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "duration": {
                                "type": "string"
                            },
                            "duration_seconds": {
                                "type": "integer"
                            },
                            "upload_date": {
                                "type": "string"
                            },
                            "chapters": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "start_seconds": {
                                            "type": "integer"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "organization_data": {
                        "type": "object"
                    },
                    "person_data": {
                        "type": "object"
                    },
                    "offer_data": {
                        "type": "object"
                    },
                    "sources": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "url",
                                "label",
                                "type"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "label": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "official",
                                        "operator",
                                        "brand",
                                        "source"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "externalDocs": {
        "url": "https://theorie-rijbewijs.nl/open-data/api/"
    }
}