{
    "openapi": "3.1.0",
    "info": {
        "title": "Permis Online · Informations publiques",
        "version": "1.2.0",
        "termsOfService": "https://permis.online/donnees/#reutilisation",
        "description": "Lecture seule, sans clé et sans cookie. CORS public pour les requêtes GET. Quota partagé entre API et MCP : 120 requêtes par minute et par adresse IP. En cas de réponse 429, respecter Retry-After. Une date de modification ne vaut pas vérification factuelle. Lire aussi les documents liés lorsque le champ related est présent."
    },
    "security": [],
    "servers": [
        {
            "url": "https://permis.online/api/v1"
        }
    ],
    "paths": {
        "/": {
            "get": {
                "operationId": "getCatalogue",
                "summary": "Description et liens de l’API",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Paramètre technique de lecture actualisée. Sans ce paramètre, suivre la redirection HTTP 307 sur le même domaine.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Résultat public",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Suivre la redirection vers la lecture actualisée sur le même domaine.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Secondes à attendre avant de recommencer.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/facts": {
            "get": {
                "operationId": "searchFacts",
                "summary": "Rechercher les fiches publiques",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Paramètre technique de lecture actualisée. Sans ce paramètre, suivre la redirection HTTP 307 sur le même domaine.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Mots à retrouver dans le titre, le contenu, les références ou le contexte lié. Accents ignorés ; tous les mots significatifs doivent être présents.",
                        "schema": {
                            "type": "string",
                            "maxLength": 300
                        }
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "description": "Correspondance à la région déclarée dans la fiche. Belgique sélectionne les fiches nationales.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "wallonie",
                                "bruxelles",
                                "flandre",
                                "belgique"
                            ]
                        }
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "fact",
                                "expertise",
                                "organization",
                                "offer",
                                "person",
                                "professional",
                                "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": "Résultat public",
                        "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": "Suivre la redirection vers la lecture actualisée sur le même domaine.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Secondes à attendre avant de recommencer.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/facts/{id}": {
            "get": {
                "operationId": "getFact",
                "summary": "Lire une fiche avec sa provenance",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Paramètre technique de lecture actualisée. Sans ce paramètre, suivre la redirection HTTP 307 sur le même domaine.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:(?:expertise-)?fait|page|brand|offer|person|professional)-[a-f0-9]{16}$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Résultat public",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Fact"
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Suivre la redirection vers la lecture actualisée sur le même domaine.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Secondes à attendre avant de recommencer.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Requête invalide, fiche inconnue, limite atteinte ou service indisponible.",
                        "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|professional)-[a-f0-9]{16}$"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "fact",
                            "expertise",
                            "organization",
                            "offer",
                            "person",
                            "professional",
                            "article",
                            "lesson",
                            "page",
                            "tool"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "text": {
                        "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"
                    },
                    "verification_scope": {
                        "type": "string"
                    },
                    "related": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "title": {
                                    "type": "string"
                                },
                                "text": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "bibliography": {
                        "type": "array",
                        "description": "Références bibliographiques citées en texte dans le contenu, sans URL externe attribuée.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "organization_data": {
                        "type": "object"
                    },
                    "person_data": {
                        "type": "object"
                    },
                    "offer_data": {
                        "type": "object"
                    },
                    "professional_data": {
                        "type": "object"
                    },
                    "pricing_reference": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string",
                                "format": "uri"
                            }
                        }
                    },
                    "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://permis.online/donnees/api/"
    }
}