{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api.authenica.tech","description":"Generated server url"}],"tags":[{"name":"Citations de listes","description":"Versions de liste citees par l'application"},{"name":"Listes","description":"Sources servies et leur version courante"},{"name":"Profils","description":"Profil enrichi d'une personne exposee"},{"name":"Criblage","description":"Recherche d'une identité dans les listes de sanctions et de PPE"},{"name":"Administration","description":"Validation par un editeur des faits du profil d'une personne exposee"},{"name":"Administration","description":"Consommateurs d'API et trace des appels"}],"paths":{"/api/v1/screenings":{"post":{"tags":["Criblage"],"summary":"Crible une identité","description":"Retourne les correspondances dont le score atteint le seuil, chacune avec sa liste et la version de la liste. Champs : fullName (obligatoire), entityType (NATURAL_PERSON ou LEGAL_ENTITY), listTypes (SANCTIONS, PPE, LOCAL), dateOfBirth, nationality, placeOfBirth ; documentNumber est réservé aux consommateurs autorisés (sinon ignoré, et nommé dans ignoredFields). Une réponse vide signifie qu'aucune correspondance n'existe dans les listes publiées ; une indisponibilité répond 503, jamais une réponse vide. Clé d'API requise (en-tête X-Api-Key).","operationId":"screen","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteScreeningRequest"}}},"required":true},"responses":{"200":{"description":"Correspondances (éventuellement aucune)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RemoteScreeningResponse"}}}},"400":{"description":"Demande invalide (nom vide, seuil hors de 0 à 1)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RemoteScreeningResponse"}}}},"401":{"description":"Clé d'API absente, inconnue ou révoquée","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RemoteScreeningResponse"}}}},"429":{"description":"Quota par minute atteint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RemoteScreeningResponse"}}}},"503":{"description":"Référentiel indisponible","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RemoteScreeningResponse"}}}}},"security":[{"X-Api-Key":[]}]}},"/api/v1/persons/{personId}/profile/collection":{"post":{"tags":["Profils"],"summary":"Demander la collecte du profil d'une personne","description":"Enregistre la demande ; le planificateur de l'enrichissement collecte le profil dans la minute, puis il se lit par GET /profile. Redemander pendant qu'une demande attend ou s'execute ne cree rien de plus. Cle d'API requise (en-tete X-Api-Key).","operationId":"requestCollection","parameters":[{"name":"personId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Demande enregistree ou deja en cours","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"401":{"description":"Cle d'API absente, inconnue ou revoquee","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"404":{"description":"Personne inconnue du referentiel","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"429":{"description":"Quota par minute atteint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"503":{"description":"Referentiel indisponible","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}}},"security":[{"X-Api-Key":[]}]}},"/api/v1/list-version-citations":{"post":{"tags":["Citations de listes"],"summary":"Communiquer les versions de liste citees","description":"Remplace l'ensemble des versions citees par l'application (identifiants de lots, rien d'autre). L'elagage des anciens lots protege ces versions, et ne supprime rien tant qu'aucun envoi recent n'a ete recu. Cle d'API requise (en-tete X-Api-Key).","operationId":"publish","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CitationRequest"}}}},"responses":{"200":{"description":"Versions retenues","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CitationResponse"}}}},"400":{"description":"Corps absent ou trop grand","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CitationResponse"}}}},"401":{"description":"Cle d'API absente, inconnue ou revoquee","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CitationResponse"}}}},"429":{"description":"Quota par minute atteint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CitationResponse"}}}},"503":{"description":"Referentiel indisponible","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CitationResponse"}}}}},"security":[{"X-Api-Key":[]}]}},"/api/v1/admin/persons/{personId}/fact-decisions":{"post":{"tags":["Administration"],"summary":"Decision d'un agent sur un fait du profil","description":"Valide, rejette ou corrige (pays d'une fonction) un fait, avec un motif obligatoire. La decision s'applique a toutes les lignes du fait et est journalisee (auteur, motif, etat d'avant). Rejeter ne supprime rien. Cle d'administration requise (en-tete X-Admin-Key) : reservee aux editeurs, via la console privee ; jamais une cle de consommateur.","operationId":"decide","parameters":[{"name":"personId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}},"required":true},"responses":{"200":{"description":"Decision enregistree","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Decision invalide (motif absent, pays mal forme...)","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Cle d'administration absente, inconnue ou administration fermee","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Aucun de ces faits pour cette personne","content":{"*/*":{"schema":{"type":"object"}}}},"503":{"description":"Referentiel indisponible","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/consumers":{"get":{"tags":["Administration"],"summary":"Liste les consommateurs (sans leur clé)","operationId":"consumers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConsumerView"}}}}}},"security":[{"X-Admin-Key":[]}]},"post":{"tags":["Administration"],"summary":"Crée un consommateur et sa clé d'API","description":"La clé est tirée au hasard et remise une seule fois dans cette réponse.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConsumerRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreatedConsumer"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/consumers/{id}/validity":{"post":{"tags":["Administration"],"summary":"Fixe la durée de validité de la clé, à compter de maintenant","description":"Sans durée, la clé n'expire plus. La clé elle-même ne change pas.","operationId":"validity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidityRequest"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConsumerView"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/consumers/{id}/rotate":{"post":{"tags":["Administration"],"summary":"Remplace la clé d'un consommateur : l'ancienne cesse de fonctionner aussitôt","description":"La nouvelle clé n'apparaît que dans cette réponse. Durée de validité facultative.","operationId":"rotate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidityRequest"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreatedConsumer"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/consumers/{id}/revoke":{"post":{"tags":["Administration"],"summary":"Révoque un consommateur : sa clé est refusée aussitôt","operationId":"revoke","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConsumerView"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/consumers/{id}/quota":{"post":{"tags":["Administration"],"summary":"Fixe le quota par minute d'un consommateur, sans changer sa clé","description":"Entre 1 et 100 000 appels par minute. Effet immédiat : le quota est relu à chaque appel.","operationId":"quota","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConsumerView"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/persons/{personId}/profile":{"get":{"tags":["Profils"],"summary":"Profil enrichi d'une personne","description":"Fonctions datees, proches, alias, naissance, chacun avec ses sources, sa preuve, son score et son etat de validation. 404 quand aucun profil n'a ete collecte (ce n'est pas « sans fonction »). Une indisponibilite repond 503, jamais un profil vide. Cle d'API requise (en-tete X-Api-Key).","operationId":"profile","parameters":[{"name":"personId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Profil","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"401":{"description":"Cle d'API absente, inconnue ou revoquee","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"404":{"description":"Aucun profil collecte pour cette personne","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"429":{"description":"Quota par minute atteint","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"503":{"description":"Referentiel indisponible","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}}},"security":[{"X-Api-Key":[]}]}},"/api/v1/lists/sources":{"get":{"tags":["Listes"],"summary":"Sources servies","description":"Une entrée par liste : émetteur, type (sanctions ou PPE), dernier lot chargé et sa date. Aucune donnée personnelle.","operationId":"sources","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SourcesResponse"}}}}},"security":[{"X-Api-Key":[]}]}},"/api/v1/admin/summary":{"get":{"tags":["Administration"],"summary":"Résumé des appels par consommateur sur les dernières heures","description":"Servis, erreurs, refus d'authentification, quotas atteints, durée moyenne.","operationId":"summary","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":24}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Summary"}}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/persons/fact-decisions/pending":{"get":{"tags":["Administration"],"summary":"Faits du profil qui attendent un agent","description":"PROPOSED : attendent une decision ; AUTO : inseres automatiquement, jamais relus. Les plus recemment collectes d'abord. Cle d'administration requise (en-tete X-Admin-Key) : reservee aux editeurs, via la console privee ; jamais une cle de consommateur.","operationId":"pending","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"PROPOSED"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":50}}],"responses":{"200":{"description":"File des faits","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Etat inconnu","content":{"*/*":{"schema":{"type":"object"}}}},"503":{"description":"Referentiel indisponible","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"X-Admin-Key":[]}]}},"/api/v1/admin/calls":{"get":{"tags":["Administration"],"summary":"Trace des appels, du plus récent au plus ancien","description":"Appels servis et refusés. Filtre optionnel par consommateur. Ni clé, ni identité soumise.","operationId":"calls","parameters":[{"name":"consumer","in":"query","required":false,"schema":{"type":"string"}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Call"}}}}}},"security":[{"X-Admin-Key":[]}]}}},"components":{"schemas":{"RemoteScreeningRequest":{"type":"object","properties":{"reference":{"type":"string"},"fullName":{"type":"string"},"dateOfBirth":{"type":"string","format":"date"},"nationality":{"type":"string"},"placeOfBirth":{"type":"string"},"documentNumber":{"type":"string"},"scoreThreshold":{"type":"number"},"corroboratedThreshold":{"type":"number"},"entityType":{"type":"string","enum":["NATURAL_PERSON","LEGAL_ENTITY"]},"listTypes":{"type":"array","items":{"type":"string","enum":["SANCTIONS","PPE","LOCAL"]},"uniqueItems":true}}},"FieldEvidence":{"type":"object","properties":{"field":{"type":"string","enum":["DOCUMENT_NUMBER","DATE_OF_BIRTH","NATIONALITY","PLACE_OF_BIRTH"]},"status":{"type":"string","enum":["MATCH","CONFLICT","UNKNOWN"]},"customerValue":{"type":"string"},"listValue":{"type":"string"}}},"ListInfo":{"type":"object","properties":{"label":{"type":"string"},"publisher":{"type":"string"}}},"MatchDetails":{"type":"object","properties":{"entityType":{"type":"string"},"list":{"$ref":"#/components/schemas/ListInfo"},"sanctionPrograms":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"description":{"type":"string"},"nationalities":{"type":"array","items":{"type":"string"}},"datesOfBirth":{"type":"array","items":{"type":"string"}},"placesOfBirth":{"type":"array","items":{"type":"string"}},"sourceUrl":{"type":"string"},"personId":{"type":"string"},"listUpdatedAt":{"type":"string"},"functionStatus":{"type":"string"}}},"RemoteScreeningResponse":{"type":"object","properties":{"requestId":{"type":"string"},"matches":{"type":"array","items":{"$ref":"#/components/schemas/ScreeningMatch"}},"ignoredFields":{"type":"array","items":{"type":"string"}}}},"ScreeningMatch":{"type":"object","properties":{"listType":{"type":"string","enum":["SANCTIONS","PPE","LOCAL"]},"listName":{"type":"string"},"listVersion":{"type":"string"},"targetLabel":{"type":"string"},"score":{"type":"number"},"confidence":{"type":"string","enum":["CORROBORATED","MIXED","UNCORROBORATED","LIKELY_HOMONYM"]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/FieldEvidence"}},"details":{"$ref":"#/components/schemas/MatchDetails"}}},"CollectionResponse":{"type":"object","properties":{"requestId":{"type":"string"},"personId":{"type":"string","format":"uuid"},"status":{"type":"string"},"requestedAt":{"type":"string","format":"date-time"}}},"CitationRequest":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"string"}}}},"CitationResponse":{"type":"object","properties":{"requestId":{"type":"string"},"retained":{"type":"integer","format":"int32"}}},"DecisionRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["POSITION","RELATION","ATTRIBUTE"]},"factKeys":{"type":"array","items":{"type":"string"}},"decision":{"type":"string","enum":["VALIDATE","REJECT","CORRECT"]},"reason":{"type":"string"},"decidedBy":{"type":"string"},"correctedCountry":{"type":"string"}}},"CreateConsumerRequest":{"type":"object","properties":{"name":{"type":"string"},"quotaPerMinute":{"type":"integer","format":"int32"},"allowDocumentNumber":{"type":"boolean"},"validityDays":{"type":"integer","format":"int32"}}},"CreatedConsumer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"quotaPerMinute":{"type":"integer","format":"int32"},"allowDocumentNumber":{"type":"boolean"},"apiKey":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}},"ValidityRequest":{"type":"object","properties":{"validityDays":{"type":"integer","format":"int32"}}},"ConsumerView":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"quotaPerMinute":{"type":"integer","format":"int32"},"active":{"type":"boolean"},"allowDocumentNumber":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"QuotaRequest":{"type":"object","properties":{"quotaPerMinute":{"type":"integer","format":"int32"}}},"Attribute":{"type":"object","properties":{"value":{"type":"string"},"date":{"type":"string","format":"date"},"precision":{"type":"string"},"validationState":{"type":"string"},"independentSources":{"type":"integer","format":"int32"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"factKeys":{"type":"array","items":{"type":"string"}}}},"PersonProfile":{"type":"object","properties":{"personId":{"type":"string"},"displayName":{"type":"string"},"wikidataId":{"type":"string"},"collectionStatus":{"type":"string"},"lastCollectedAt":{"type":"string","format":"date-time"},"positions":{"type":"array","items":{"$ref":"#/components/schemas/Position"}},"relations":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Attribute"}},"birthDates":{"type":"array","items":{"$ref":"#/components/schemas/Attribute"}},"birthPlaces":{"type":"array","items":{"$ref":"#/components/schemas/Attribute"}},"nationalities":{"type":"array","items":{"$ref":"#/components/schemas/Attribute"}}}},"Position":{"type":"object","properties":{"title":{"type":"string"},"institution":{"type":"string"},"institutionType":{"type":"string"},"functionCountry":{"type":"string"},"politicalParty":{"type":"string"},"level":{"type":"string"},"start":{"type":"string","format":"date"},"startPrecision":{"type":"string"},"end":{"type":"string","format":"date"},"endPrecision":{"type":"string"},"status":{"type":"string"},"validationState":{"type":"string"},"score":{"type":"number"},"independentSources":{"type":"integer","format":"int32"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"factKeys":{"type":"array","items":{"type":"string"}}}},"ProfileResponse":{"type":"object","properties":{"requestId":{"type":"string"},"profile":{"$ref":"#/components/schemas/PersonProfile"}}},"Relation":{"type":"object","properties":{"relation":{"type":"string"},"name":{"type":"string"},"validationState":{"type":"string"},"score":{"type":"number"},"independentSources":{"type":"integer","format":"int32"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"factKeys":{"type":"array","items":{"type":"string"}}}},"Source":{"type":"object","properties":{"kind":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"evidence":{"type":"string"}}},"SourceView":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"publisher":{"type":"string"},"listType":{"type":"string"},"lastBatchId":{"type":"string"},"lastLoadedAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"entityCount":{"type":"integer","format":"int32"}}},"SourcesResponse":{"type":"object","properties":{"requestId":{"type":"string"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceView"}}}},"Summary":{"type":"object","properties":{"consumerName":{"type":"string"},"served":{"type":"integer","format":"int64"},"clientErrors":{"type":"integer","format":"int64"},"serverErrors":{"type":"integer","format":"int64"},"unauthenticated":{"type":"integer","format":"int64"},"rateLimited":{"type":"integer","format":"int64"},"adminRefused":{"type":"integer","format":"int64"},"averageMs":{"type":"integer","format":"int64"}}},"Call":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"requestId":{"type":"string","format":"uuid"},"calledAt":{"type":"string","format":"date-time"},"consumerName":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer","format":"int32"},"outcome":{"type":"string"},"durationMs":{"type":"integer","format":"int32"},"remoteAddr":{"type":"string"},"detail":{"type":"string"}}}}}}