Aller au contenu

Dernière mise à jour : 15 octobre 2026

Company Verifier API

Port local (Docker Compose) : 30007 | Repo : solyntek/djinn/services/djinn-company-verifier

Vérification des entreprises et contrôles fournisseur avant paiement : identité, procédures, documents, coordonnées bancaires, sanctions et synthèse de risque. Chaque verdict est une évaluation, jamais une autorisation : le service ne bloque ni n'approuve un paiement à votre place.

Endpoints

Données live (SIRENE / BODACC)

Méthode Route Description
GET /health Health check (inclut état circuit breakers)
GET /v1/companies/{siren} Infos entreprise (SIRENE, live)
GET /v1/companies/{siren}/compliance Statut conformité live (SIRENE + BODACC)
GET /v1/companies/{siren}/alerts Alertes BODACC (procédures collectives), paginées (limit 1-100, défaut 20 ; offset)
POST /v1/companies/track Démarrer le suivi d'un SIREN pour un tenant

Suivi documentaire (store local)

Méthode Route Description
POST /v1/companies Enregistrer le profil d'une entreprise suivie
POST /v1/companies/lookup Rechercher par SIREN/SIRET/nom (entreprises suivies)
GET /v1/companies/{siren}/documents/compliance Conformité documentaire (documents + alertes)
POST /v1/companies/{siren}/documents Upload document conformité
GET /v1/companies/{siren}/documents Lister documents
GET /v1/alerts Alertes d'expiration de documents (offset, limit, défaut 50)

Paiement fournisseur sécurisé

Méthode Route Description
POST /v1/companies/{siren}/bank-accounts Contrôler des coordonnées bancaires (iban, bic et holder_name optionnels) : validité de l'IBAN, titulaire vs nom SIRENE, changement vs historique (201)
GET /v1/companies/{siren}/bank-accounts Historique des comptes bancaires du fournisseur
POST /v1/companies/{siren}/bank-accounts/from-document Même contrôle depuis un fichier RIB (multipart, champ file, 50 Mio au plus) : lu par Doc Extract, avis d'authenticité de Doc Trust (201)
GET /v1/companies/{siren}/sanctions Criblage de l'entreprise et de ses dirigeants publiés contre le registre national des gels d'avoirs (DG Trésor)
GET /v1/companies/{siren}/risk Synthèse de risque combinant SIRENE, BODACC, documents, compte bancaire et sanctions

L'IBAN n'est jamais renvoyé en clair : les réponses portent iban_masked. Le verdict d'un compte bancaire est ok, to_review ou blocking avec des codes reasons ; holder_match vaut match, mismatch ou unknown ; document_authenticity vaut null si doc-trust n'a pas pu être joint (« non évalué », jamais « aucun signal »). Le verdict de risque est ok, to_review, blocking ou unknown, avec reasons, checks par contrôle et sources_unavailable : une source amont indisponible y est signalée et ne devient jamais un faux « clair » (ni une erreur 5xx). blocking signifie qu'un fait de niveau bloquant a été relevé (entreprise radiée, sanction, compte bancaire bloquant), jamais qu'un paiement est refusé.

Conformité live vs documentaire

GET /v1/companies/{siren}/compliance interroge les sources externes SIRENE et BODACC en temps réel (statut : compliant / at_risk / non_compliant / unknown, avec dégradation gracieuse si une source est indisponible). GET /v1/companies/{siren}/documents/compliance évalue le suivi documentaire local (Kbis, URSSAF, etc.) de l'entreprise.

Documents de conformité

document_type vaut kbis, urssaf, fiscal, rc_pro, foreign_workers ou other. Les durées de validité ci-dessous sont les valeurs par défaut (365 jours pour foreign_workers et other).

Type Validité Source
Kbis 3 mois Infogreffe / INPI
Attestation URSSAF 6 mois Upload fournisseur
Attestation fiscale 1 an Upload fournisseur
RC Pro 1 an Upload fournisseur

Sources externes

Source Coût Données
SIRENE (INSEE) Gratuit SIREN, raison sociale, NAF, effectifs, statut
BODACC (DILA) Gratuit Annonces légales, procédures collectives
Recherche d'entreprises (DINUM) Gratuit Dirigeants publiés
Registre des gels d'avoirs (DG Trésor) Gratuit Criblage sanctions

Erreurs

Les erreurs suivent le format FastAPI, {"detail": "..."} :

Statut Cause
401 Clé API absente ou invalide
404 Entreprise introuvable (SIRENE, ou non enregistrée pour les routes documentaires)
413 Fichier RIB de plus de 50 Mio
422 SIREN invalide (exactement 9 chiffres), fichier RIB non pris en charge ou vide, aucun IBAN trouvé dans le document
502 / 503 Une source amont est indisponible (/v1/companies/{siren} : SIRENE 502 ; /alerts : BODACC 503 ; from-document : doc-extract 503). /compliance, /sanctions et /risk se dégradent à la place (sources_unavailable)

Référence interactive

Générée à chaque build depuis la spec versionnée openapi/company-verifier-v1.json (ADR-011) — aucune route documentée à la main.

Djinn Company Verifier 0.2.0

Vérification et suivi conformité des entreprises


Endpoints


GET /health

Health

Responses

{
    "status": "string",
    "service": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "status": {
            "type": "string",
            "title": "Status",
            "default": "ok"
        },
        "service": {
            "type": "string",
            "title": "Service",
            "default": "company-verifier"
        }
    },
    "type": "object",
    "title": "HealthResponse"
}

GET /v1/companies/{siren}

Get Company V1

Description

Lookup company info from SIRENE.

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

{
    "siren": "string",
    "siret": null,
    "name": "string",
    "legal_form": null,
    "address": null,
    "naf_code": null,
    "status": "active",
    "creation_date": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "pattern": "^\\d{9}$",
            "title": "Siren"
        },
        "siret": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^\\d{14}$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Siret"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "legal_form": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Legal Form"
        },
        "address": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Address"
        },
        "naf_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Naf Code"
        },
        "status": {
            "type": "string",
            "enum": [
                "active",
                "ceased",
                "unknown"
            ],
            "title": "Status",
            "default": "unknown"
        },
        "creation_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Creation Date"
        }
    },
    "type": "object",
    "required": [
        "siren",
        "name"
    ],
    "title": "Company",
    "description": "Modèle entreprise exposé par les routes /v1/."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/compliance

Get Compliance V1

Description

Get compliance status combining SIRENE and BODACC data.

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

{
    "siren": "string",
    "company": null,
    "compliance_status": "compliant",
    "data_freshness": "live",
    "sources_unavailable": [
        "string"
    ],
    "warnings": [
        "string"
    ],
    "alerts_count": 0,
    "checked_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "title": "Siren"
        },
        "company": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/Company"
                },
                {
                    "type": "null"
                }
            ]
        },
        "compliance_status": {
            "type": "string",
            "enum": [
                "compliant",
                "at_risk",
                "non_compliant",
                "unknown"
            ],
            "title": "Compliance Status"
        },
        "data_freshness": {
            "type": "string",
            "enum": [
                "live",
                "stale",
                "partial",
                "unavailable"
            ],
            "title": "Data Freshness"
        },
        "sources_unavailable": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Sources Unavailable",
            "default": []
        },
        "warnings": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Warnings",
            "default": []
        },
        "alerts_count": {
            "type": "integer",
            "title": "Alerts Count",
            "default": 0
        },
        "checked_at": {
            "type": "string",
            "format": "date-time",
            "title": "Checked At"
        }
    },
    "type": "object",
    "required": [
        "siren",
        "company",
        "compliance_status",
        "data_freshness",
        "checked_at"
    ],
    "title": "ComplianceResponse",
    "description": "Réponse statut conformité (routes /v1/)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/alerts

Get Alerts V1

Description

Get BODACC alerts for a company, paginated.

Input parameters

Parameter In Type Default Nullable Description
limit query integer 20 No
offset query integer 0 No
siren path string No
X-API-Key header No

Responses

[
    {}
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "type": "object",
        "additionalProperties": true
    },
    "title": "Response Get Alerts V1 V1 Companies  Siren  Alerts Get"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/companies/track

Track Company

Description

Start tracking a company by SIREN for the caller's own tenant.

The tenant is always the authenticated caller's (_auth.tenant_id), never request.tenant_id: trusting a tenant id supplied in the request body would let any authenticated caller write into another tenant's partition. The body field is accepted for backward compatibility but its value is ignored — no ownership is inferred from it, so it deliberately never causes a mismatch/403 to distinguish "no such field" from "wrong tenant".

Input parameters

Parameter In Type Default Nullable Description
X-API-Key header No

Request body

{
    "siren": "string",
    "tenant_id": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "siren": {
            "type": "string",
            "pattern": "^\\d{9}$",
            "title": "Siren"
        },
        "tenant_id": {
            "type": "string",
            "title": "Tenant Id"
        }
    },
    "type": "object",
    "required": [
        "siren",
        "tenant_id"
    ],
    "title": "TrackRequest",
    "description": "Requête de suivi d'entreprise."
}

Responses

{
    "siren": "string",
    "tenant_id": "string",
    "tracked": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "title": "Siren"
        },
        "tenant_id": {
            "type": "string",
            "title": "Tenant Id"
        },
        "tracked": {
            "type": "boolean",
            "title": "Tracked",
            "default": true
        }
    },
    "type": "object",
    "required": [
        "siren",
        "tenant_id"
    ],
    "title": "TrackResponse"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/companies

Add Company

Input parameters

Parameter In Type Default Nullable Description
X-API-Key header No

Request body

{
    "siren": "string",
    "siret": null,
    "name": "string",
    "legal_form": null,
    "naf_code": null,
    "naf_label": null,
    "address": null,
    "postal_code": null,
    "city": null,
    "creation_date": null,
    "workforce_bracket": null,
    "is_active": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "siren": {
            "type": "string",
            "pattern": "^\\d{9}$",
            "title": "Siren",
            "description": "SIREN (9 digits)"
        },
        "siret": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^\\d{14}$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Siret",
            "description": "SIRET (14 digits)"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "legal_form": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Legal Form"
        },
        "naf_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Naf Code",
            "description": "Code APE/NAF"
        },
        "naf_label": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Naf Label"
        },
        "address": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Address"
        },
        "postal_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Postal Code"
        },
        "city": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "City"
        },
        "creation_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Creation Date"
        },
        "workforce_bracket": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Workforce Bracket"
        },
        "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
        }
    },
    "type": "object",
    "required": [
        "siren",
        "name"
    ],
    "title": "CompanyInfo",
    "description": "Informations d'une entreprise (depuis API SIRENE)."
}

Responses

{
    "siren": "string",
    "siret": null,
    "name": "string",
    "legal_form": null,
    "naf_code": null,
    "naf_label": null,
    "address": null,
    "postal_code": null,
    "city": null,
    "creation_date": null,
    "workforce_bracket": null,
    "is_active": true
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "pattern": "^\\d{9}$",
            "title": "Siren",
            "description": "SIREN (9 digits)"
        },
        "siret": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^\\d{14}$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Siret",
            "description": "SIRET (14 digits)"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "legal_form": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Legal Form"
        },
        "naf_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Naf Code",
            "description": "Code APE/NAF"
        },
        "naf_label": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Naf Label"
        },
        "address": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Address"
        },
        "postal_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Postal Code"
        },
        "city": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "City"
        },
        "creation_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Creation Date"
        },
        "workforce_bracket": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Workforce Bracket"
        },
        "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
        }
    },
    "type": "object",
    "required": [
        "siren",
        "name"
    ],
    "title": "CompanyInfo",
    "description": "Informations d'une entreprise (depuis API SIRENE)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/companies/lookup

Lookup

Input parameters

Parameter In Type Default Nullable Description
X-API-Key header No

Request body

{
    "siren": null,
    "siret": null,
    "name": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "siren": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^\\d{9}$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Siren",
            "description": "SIREN (9 digits)"
        },
        "siret": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^\\d{14}$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Siret",
            "description": "SIRET (14 digits)"
        },
        "name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Name",
            "description": "Raison sociale (recherche partielle)"
        }
    },
    "type": "object",
    "title": "CompanyLookupRequest",
    "description": "Requête de recherche d'entreprise."
}

Responses

{
    "results": [
        {
            "siren": "string",
            "siret": null,
            "name": "string",
            "legal_form": null,
            "naf_code": null,
            "naf_label": null,
            "address": null,
            "postal_code": null,
            "city": null,
            "creation_date": null,
            "workforce_bracket": null,
            "is_active": true
        }
    ],
    "total": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "results": {
            "items": {
                "$ref": "#/components/schemas/CompanyInfo"
            },
            "type": "array",
            "title": "Results"
        },
        "total": {
            "type": "integer",
            "title": "Total"
        }
    },
    "type": "object",
    "required": [
        "results",
        "total"
    ],
    "title": "CompanyLookupResponse",
    "description": "Réponse de recherche d'entreprise."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/documents/compliance

Get Document Compliance

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

{
    "siren": "string",
    "status": "compliant",
    "documents": [
        {
            "id": null,
            "company_siren": "string",
            "document_type": "kbis",
            "filename": null,
            "upload_date": null,
            "issue_date": null,
            "expiry_date": null,
            "status": null,
            "verification_code": null,
            "notes": null
        }
    ],
    "alerts": [
        {
            "id": null,
            "company_siren": "string",
            "company_name": "string",
            "alert_type": "document_expiring",
            "message": "string",
            "severity": "string",
            "created_at": null,
            "resolved": true
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "title": "Siren"
        },
        "status": {
            "$ref": "#/components/schemas/ComplianceStatus"
        },
        "documents": {
            "items": {
                "$ref": "#/components/schemas/ComplianceDocument"
            },
            "type": "array",
            "title": "Documents"
        },
        "alerts": {
            "items": {
                "$ref": "#/components/schemas/Alert"
            },
            "type": "array",
            "title": "Alerts"
        }
    },
    "type": "object",
    "required": [
        "siren",
        "status",
        "documents",
        "alerts"
    ],
    "title": "DocumentComplianceResponse"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/companies/{siren}/documents

Add Document

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Request body

{
    "id": null,
    "company_siren": "string",
    "document_type": "kbis",
    "filename": null,
    "upload_date": null,
    "issue_date": null,
    "expiry_date": null,
    "status": "compliant",
    "verification_code": null,
    "notes": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Id"
        },
        "company_siren": {
            "type": "string",
            "title": "Company Siren"
        },
        "document_type": {
            "$ref": "#/components/schemas/DocumentType"
        },
        "filename": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Filename"
        },
        "upload_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Upload Date"
        },
        "issue_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Issue Date"
        },
        "expiry_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Expiry Date"
        },
        "status": {
            "$ref": "#/components/schemas/ComplianceStatus",
            "default": "pending"
        },
        "verification_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Verification Code",
            "description": "Code de vérification URSSAF (15 chars)"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        }
    },
    "type": "object",
    "required": [
        "company_siren",
        "document_type"
    ],
    "title": "ComplianceDocument",
    "description": "Document de conformité d'une entreprise."
}

Responses

{
    "id": null,
    "company_siren": "string",
    "document_type": "kbis",
    "filename": null,
    "upload_date": null,
    "issue_date": null,
    "expiry_date": null,
    "status": "compliant",
    "verification_code": null,
    "notes": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Id"
        },
        "company_siren": {
            "type": "string",
            "title": "Company Siren"
        },
        "document_type": {
            "$ref": "#/components/schemas/DocumentType"
        },
        "filename": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Filename"
        },
        "upload_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Upload Date"
        },
        "issue_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Issue Date"
        },
        "expiry_date": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Expiry Date"
        },
        "status": {
            "$ref": "#/components/schemas/ComplianceStatus",
            "default": "pending"
        },
        "verification_code": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Verification Code",
            "description": "Code de vérification URSSAF (15 chars)"
        },
        "notes": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Notes"
        }
    },
    "type": "object",
    "required": [
        "company_siren",
        "document_type"
    ],
    "title": "ComplianceDocument",
    "description": "Document de conformité d'une entreprise."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/documents

Get Documents

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

[
    {
        "id": null,
        "company_siren": "string",
        "document_type": "kbis",
        "filename": null,
        "upload_date": null,
        "issue_date": null,
        "expiry_date": null,
        "status": "compliant",
        "verification_code": null,
        "notes": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/ComplianceDocument"
    },
    "title": "Response Get Documents V1 Companies  Siren  Documents Get"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/alerts

Get Alerts

Input parameters

Parameter In Type Default Nullable Description
limit query integer 50 No
offset query integer 0 No
X-API-Key header No

Responses

[
    {
        "id": null,
        "company_siren": "string",
        "company_name": "string",
        "alert_type": "document_expiring",
        "message": "string",
        "severity": "string",
        "created_at": null,
        "resolved": true
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/Alert"
    },
    "title": "Response Get Alerts V1 Alerts Get"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/companies/{siren}/bank-accounts

Register Bank Account

Description

Control a supplier's bank details: IBAN validity, holder vs SIRENE, change vs history.

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Request body

{
    "iban": "string",
    "bic": null,
    "holder_name": null,
    "source": "manual"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "iban": {
            "type": "string",
            "maxLength": 42,
            "minLength": 15,
            "title": "Iban"
        },
        "bic": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Bic"
        },
        "holder_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Holder Name"
        },
        "source": {
            "type": "string",
            "enum": [
                "manual",
                "rib_document"
            ],
            "title": "Source",
            "default": "manual"
        }
    },
    "type": "object",
    "required": [
        "iban"
    ],
    "title": "BankAccountIn"
}

Responses

{
    "account": {
        "id": "string",
        "tenant_id": "string",
        "company_siren": "string",
        "iban_masked": "string",
        "iban_hash": "string",
        "bic": null,
        "bank_name": null,
        "country": null,
        "holder_name": null,
        "holder_match": "match",
        "source": "string",
        "verdict": "ok",
        "reasons": [
            "string"
        ],
        "is_current": true,
        "first_seen": "2022-04-13T15:42:05.901Z",
        "last_seen": "2022-04-13T15:42:05.901Z"
    },
    "iban_check": {
        "valid": true,
        "iban_masked": "string",
        "country": null,
        "bank_code": null,
        "bank_name": null,
        "bic": null,
        "errors": [
            "string"
        ]
    },
    "changed_from_previous": true,
    "previous_iban_masked": null,
    "document_authenticity": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "account": {
            "$ref": "#/components/schemas/BankAccount"
        },
        "iban_check": {
            "$ref": "#/components/schemas/IbanCheck"
        },
        "changed_from_previous": {
            "type": "boolean",
            "title": "Changed From Previous",
            "default": false
        },
        "previous_iban_masked": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Previous Iban Masked"
        },
        "document_authenticity": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/DocumentAuthenticity"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Avis d'authenticité du justificatif (doc-trust), seulement pour un RIB lu depuis un document. `null` signifie « non évalué » (doc-trust indisponible ou réponse différente de 200), jamais « aucun signal ». Une évaluation, jamais une autorisation."
        }
    },
    "type": "object",
    "required": [
        "account",
        "iban_check"
    ],
    "title": "BankAccountVerdict"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/bank-accounts

List Bank Accounts

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

[
    {
        "id": "string",
        "tenant_id": "string",
        "company_siren": "string",
        "iban_masked": "string",
        "iban_hash": "string",
        "bic": null,
        "bank_name": null,
        "country": null,
        "holder_name": null,
        "holder_match": "match",
        "source": "string",
        "verdict": "ok",
        "reasons": [
            "string"
        ],
        "is_current": true,
        "first_seen": "2022-04-13T15:42:05.901Z",
        "last_seen": "2022-04-13T15:42:05.901Z"
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/BankAccount"
    },
    "title": "Response List Bank Accounts V1 Companies  Siren  Bank Accounts Get"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /v1/companies/{siren}/bank-accounts/from-document

Register Bank Account From Document

Description

Read a RIB (PDF/image) through doc-extract, then run the same bank account control.

x_api_key is read again here, raw, on top of _auth (ADR-023): doc- extract must authenticate as this call's own caller, not as company-verifier, so the caller's own key is forwarded as-is. Guaranteed present by the time this body runs, since _auth (require_api_key) already rejected any request with no key.

After the extraction, the same document goes to doc-trust for an authenticity opinion, again with the caller's own key. The opinion is an evaluation, never an authorization: at worst it makes the account to_review (reason codes document_authenticity_*); it never blocks and never turns an unavailable doc-trust into an error (document_authenticity is then null, "not evaluated").

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header string No

Request body

{
    "file": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
        }
    },
    "type": "object",
    "required": [
        "file"
    ],
    "title": "Body_register_bank_account_from_document_v1_companies__siren__bank_accounts_from_document_post"
}

Responses

{
    "account": {
        "id": "string",
        "tenant_id": "string",
        "company_siren": "string",
        "iban_masked": "string",
        "iban_hash": "string",
        "bic": null,
        "bank_name": null,
        "country": null,
        "holder_name": null,
        "holder_match": "match",
        "source": "string",
        "verdict": "ok",
        "reasons": [
            "string"
        ],
        "is_current": true,
        "first_seen": "2022-04-13T15:42:05.901Z",
        "last_seen": "2022-04-13T15:42:05.901Z"
    },
    "iban_check": {
        "valid": true,
        "iban_masked": "string",
        "country": null,
        "bank_code": null,
        "bank_name": null,
        "bic": null,
        "errors": [
            "string"
        ]
    },
    "changed_from_previous": true,
    "previous_iban_masked": null,
    "document_authenticity": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "account": {
            "$ref": "#/components/schemas/BankAccount"
        },
        "iban_check": {
            "$ref": "#/components/schemas/IbanCheck"
        },
        "changed_from_previous": {
            "type": "boolean",
            "title": "Changed From Previous",
            "default": false
        },
        "previous_iban_masked": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Previous Iban Masked"
        },
        "document_authenticity": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/DocumentAuthenticity"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Avis d'authenticité du justificatif (doc-trust), seulement pour un RIB lu depuis un document. `null` signifie « non évalué » (doc-trust indisponible ou réponse différente de 200), jamais « aucun signal ». Une évaluation, jamais une autorisation."
        }
    },
    "type": "object",
    "required": [
        "account",
        "iban_check"
    ],
    "title": "BankAccountVerdict"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/sanctions

Get Sanctions V1

Description

Screen the company and its published directors against the asset-freeze register.

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

{
    "siren": "string",
    "hits": [
        {
            "entry": {
                "registre_id": 0,
                "nature": "person",
                "name": "string",
                "first_names": [
                    "string"
                ],
                "aliases": [
                    "string"
                ]
            },
            "matched": "string",
            "matched_alias": "string",
            "rule": "similarity",
            "score": 10.12,
            "subject": "company"
        }
    ],
    "list_date": null,
    "screened_at": "2022-04-13T15:42:05.901Z",
    "sources_unavailable": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "title": "Siren"
        },
        "hits": {
            "items": {
                "$ref": "#/components/schemas/SanctionsHit"
            },
            "type": "array",
            "title": "Hits"
        },
        "list_date": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "List Date"
        },
        "screened_at": {
            "type": "string",
            "format": "date-time",
            "title": "Screened At"
        },
        "sources_unavailable": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Sources Unavailable"
        }
    },
    "type": "object",
    "required": [
        "siren",
        "hits",
        "screened_at"
    ],
    "title": "SanctionsScreening"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /v1/companies/{siren}/risk

Get Risk V1

Description

Combine every control into one risk assessment — a control, never an authorization.

verdict reports what the underlying checks found (SIRENE status, BODACC alerts, document compliance, bank-account control, sanctions screening); it is not a payment decision and this route never blocks anything on the caller's behalf.

Input parameters

Parameter In Type Default Nullable Description
siren path string No
X-API-Key header No

Responses

{
    "siren": "string",
    "verdict": "ok",
    "reasons": [
        "string"
    ],
    "checks": {},
    "company": null,
    "bank_account": null,
    "sanctions_hits": 0,
    "documents_status": null,
    "bodacc_alerts": 0,
    "sources_unavailable": [
        "string"
    ],
    "checked_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "siren": {
            "type": "string",
            "title": "Siren"
        },
        "verdict": {
            "type": "string",
            "enum": [
                "ok",
                "to_review",
                "blocking",
                "unknown"
            ],
            "title": "Verdict",
            "description": "Résultat de l'évaluation, pas une décision : 'blocking' signale un fait de niveau bloquant relevé par le contrôle (ex. entreprise radiée, sanction), jamais un refus de paiement — ce service n'autorise ni ne bloque rien."
        },
        "reasons": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Reasons"
        },
        "checks": {
            "additionalProperties": {
                "type": "string"
            },
            "type": "object",
            "title": "Checks"
        },
        "company": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/Company"
                },
                {
                    "type": "null"
                }
            ]
        },
        "bank_account": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/BankAccount"
                },
                {
                    "type": "null"
                }
            ]
        },
        "sanctions_hits": {
            "type": "integer",
            "title": "Sanctions Hits",
            "default": 0
        },
        "documents_status": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Documents Status"
        },
        "bodacc_alerts": {
            "type": "integer",
            "title": "Bodacc Alerts",
            "default": 0
        },
        "sources_unavailable": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Sources Unavailable"
        },
        "checked_at": {
            "type": "string",
            "format": "date-time",
            "title": "Checked At"
        }
    },
    "type": "object",
    "required": [
        "siren",
        "verdict",
        "checked_at"
    ],
    "title": "RiskReport",
    "description": "Synthèse de risque fournisseur : un contrôle, pas une décision.\n\n`verdict` est le résultat d'une **évaluation** combinant l'identité\nSIRENE, les procédures BODACC, la conformité documentaire, le contrôle du\ncompte bancaire et le criblage sanctions (voir `services/risk.py` pour la\nrègle d'ordre exacte). Ce n'est jamais une autorisation ou une garantie de\npaiement : l'intégrant reste seul décisionnaire de la suite à donner."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

Alert

Name Type Description
alert_type AlertType
company_name string
company_siren string
created_at
id
message string
resolved boolean
severity string

AlertType

Type: string

AuthenticitySignal

Name Type Description
code string
family string
message string
strength string

BankAccount

Name Type Description
bank_name
bic
company_siren string
country
first_seen string(date-time)
holder_match string
holder_name
iban_hash string
iban_masked string
id string
is_current boolean
last_seen string(date-time)
reasons Array<string>
source string
tenant_id string
verdict string

BankAccountIn

Name Type Description
bic
holder_name
iban string
source string

BankAccountVerdict

Name Type Description
account BankAccount
changed_from_previous boolean
document_authenticity Avis d'authenticité du justificatif (doc-trust), seulement pour un RIB lu depuis un document. `null` signifie « non évalué » (doc-trust indisponible ou réponse différente de 200), jamais « aucun signal ». Une évaluation, jamais une autorisation.
iban_check IbanCheck
previous_iban_masked

Body_register_bank_account_from_document_v1_companies__siren__bank_accounts_from_document_post

Name Type Description
file string

Company

Name Type Description
address
creation_date
legal_form
naf_code
name string
siren string
siret
status string

CompanyInfo

Name Type Description
address
city
creation_date
is_active boolean
legal_form
naf_code Code APE/NAF
naf_label
name string
postal_code
siren string SIREN (9 digits)
siret SIRET (14 digits)
workforce_bracket

CompanyLookupRequest

Name Type Description
name Raison sociale (recherche partielle)
siren SIREN (9 digits)
siret SIRET (14 digits)

CompanyLookupResponse

Name Type Description
results Array<CompanyInfo>
total integer

ComplianceDocument

Name Type Description
company_siren string
document_type DocumentType
expiry_date
filename
id
issue_date
notes
status ComplianceStatus
upload_date
verification_code Code de vérification URSSAF (15 chars)

ComplianceResponse

Name Type Description
alerts_count integer
checked_at string(date-time)
company
compliance_status string
data_freshness string
siren string
sources_unavailable Array<string>
warnings Array<string>

ComplianceStatus

Type: string

DocumentAuthenticity

Name Type Description
explanation string
rules_version string
score number
signals Array<AuthenticitySignal>
verdict string

DocumentComplianceResponse

Name Type Description
alerts Array<Alert>
documents Array<ComplianceDocument>
siren string
status ComplianceStatus

DocumentType

Type: string

HealthResponse

Name Type Description
service string
status string

HTTPValidationError

Name Type Description
detail Array<ValidationError>

IbanCheck

Name Type Description
bank_code
bank_name
bic
country
errors Array<string>
iban_masked string
valid boolean

RiskReport

Name Type Description
bank_account
bodacc_alerts integer
checked_at string(date-time)
checks
company
documents_status
reasons Array<string>
sanctions_hits integer
siren string
sources_unavailable Array<string>
verdict string Résultat de l'évaluation, pas une décision : 'blocking' signale un fait de niveau bloquant relevé par le contrôle (ex. entreprise radiée, sanction), jamais un refus de paiement — ce service n'autorise ni ne bloque rien.

SanctionEntry

Name Type Description
aliases Array<string>
first_names Array<string>
name string
nature string
registre_id integer

SanctionsHit

Name Type Description
entry SanctionEntry
matched string
matched_alias string
rule string
score number
subject string

SanctionsScreening

Name Type Description
hits Array<SanctionsHit>
list_date
screened_at string(date-time)
siren string
sources_unavailable Array<string>

TrackRequest

Name Type Description
siren string
tenant_id string

TrackResponse

Name Type Description
siren string
tenant_id string
tracked boolean

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string