Certificats
Endpoint de depot d'un certificat de realisation.
POST /:opcoId/certificats
Depot d'un certificat de realisation. Traitement asynchrone via file d'attente.
Auth : X-API-KEY obligatoire.
Body (JSON)
json
{
"typeCertificat": "Final",
"numeroInterneDossier": "INT-001",
"numeroInterneFacture": "FACT-001",
"dateSignature": "2026-07-15",
"lieuSignatureContrat": "Paris",
"representantLegal": {
"nom": "Martin",
"prenom": "Sophie",
"qualite": "Directrice"
},
"attestationConservationPieces": true,
"natureAction": "Formation par apprentissage",
"employeur": { "siret": "12345678901234" },
"apprenti": {
"nom": "Dupont",
"prenom": "Jean",
"nomUsage": null
},
"organismeFormation": { "siret": "98765432101234" },
"echeance": {
"numero": 3,
"codification": "A3",
"duree": 400,
"dateDebut": "2025-09-01",
"dateFin": "2026-07-15",
"echeancePartielle": false
},
"_files": { "certificat": "base64..." }
}Champs du body
| Champ | Type | Requis | Description |
|---|---|---|---|
typeCertificat | enum | Oui | Intermediaire ou Final |
numeroInterneDossier | string | Oui | Numero interne du dossier |
numeroInterneFacture | string/number | Non | Numero interne de la facture associee |
dateSignature | string | Non | Date de signature |
lieuSignatureContrat | string | Non | Lieu de signature |
representantLegal | object | Non | Representant legal (nom, prenom, qualite) |
attestationConservationPieces | boolean | Non | Attestation de conservation des pieces |
natureAction | string | Non | Nature de l'action de formation |
employeur.siret | string | Oui | SIRET de l'employeur |
apprenti.nom | string | Oui | Nom de l'apprenti |
apprenti.prenom | string | Oui | Prenom de l'apprenti |
apprenti.nomUsage | string | Non | Nom d'usage |
organismeFormation.siret | string | Oui | SIRET de l'OF |
_files | object | Non | Fichiers joints en base64 |
Champs echeance
| Champ | Type | Requis | Description |
|---|---|---|---|
numero | number | Oui | Numero de l'echeance |
codification | string | Non | Codification |
duree | number | Non | Duree en heures |
dateDebut | string | Non | Date de debut |
dateFin | string | Non | Date de fin |
echeancePartielle | boolean | Non | Echeance partielle |
Headers optionnels
| Header | Description |
|---|---|
Idempotency-Key | Cle d'idempotence. Si deja vue, retourne 200 + duplicate. |
Reponse 202
json
{
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"statusUrl": "/opco-ep/jobs/550e8400-e29b-41d4-a716-446655440000"
}Suivez le job via GET /:opcoId/jobs/:jobId.
Erreurs
| Code HTTP | Code erreur | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Body invalide |
| 403 | HTTP_ERROR | X-API-KEY manquant |
Exemple curl
bash
curl -X POST -H "X-API-KEY: votre-cle" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: cert-001" \
-d '{"typeCertificat": "Final", "numeroInterneDossier": "INT-001", ...}' \
"https://api.opcovia.com/opco-ep/certificats"