Skip to content

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

ChampTypeRequisDescription
typeCertificatenumOuiIntermediaire ou Final
numeroInterneDossierstringOuiNumero interne du dossier
numeroInterneFacturestring/numberNonNumero interne de la facture associee
dateSignaturestringNonDate de signature
lieuSignatureContratstringNonLieu de signature
representantLegalobjectNonRepresentant legal (nom, prenom, qualite)
attestationConservationPiecesbooleanNonAttestation de conservation des pieces
natureActionstringNonNature de l'action de formation
employeur.siretstringOuiSIRET de l'employeur
apprenti.nomstringOuiNom de l'apprenti
apprenti.prenomstringOuiPrenom de l'apprenti
apprenti.nomUsagestringNonNom d'usage
organismeFormation.siretstringOuiSIRET de l'OF
_filesobjectNonFichiers joints en base64

Champs echeance

ChampTypeRequisDescription
numeronumberOuiNumero de l'echeance
codificationstringNonCodification
dureenumberNonDuree en heures
dateDebutstringNonDate de debut
dateFinstringNonDate de fin
echeancePartiellebooleanNonEcheance partielle

Headers optionnels

HeaderDescription
Idempotency-KeyCle 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 HTTPCode erreurDescription
400VALIDATION_ERRORBody invalide
403HTTP_ERRORX-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"