Skip to content

Conventions

Endpoint de depot d'une convention de formation.

POST /:opcoId/conventions

Depot d'une convention de formation. Traitement asynchrone via file d'attente.

Auth : X-API-KEY obligatoire.

Body (JSON)

json
{
  "numeroInterneDossier": "INT-001",
  "employeur": { "siret": "12345678901234" },
  "apprenti": {
    "nom": "Dupont",
    "prenom": "Jean",
    "nomUsage": null
  },
  "contrat": {
    "dateDebutContrat": "2024-09-01",
    "dateFinContrat": "2026-08-31"
  },
  "organismeFormation": {
    "siret": "98765432101234",
    "uaiCfa": "0123456A"
  },
  "formation": {
    "dateDebutFormation": "2024-09-15",
    "dateFinFormation": "2026-07-15",
    "dureeFormation": 1200,
    "rncp": "RNCP12345",
    "intituleQualification": "BTS Comptabilite"
  },
  "couts": {
    "coutTotalPedagogieCFA": 8500.00,
    "montantRQTHAnnee1": null,
    "montantRQTHAnnee2": null,
    "nombreRepasTotaux": 200,
    "nombreHebergementTotaux": 50,
    "montantPremierEquipement": 500.00,
    "mentionMobiliteInternationale": false,
    "accompagnementDROM": false
  },
  "mandatEmployeur": true,
  "dateSignature": "2024-08-15",
  "attestationConventionSigneeEntreprise": true,
  "attestationConventionSigneeCFA": true,
  "attestationConventionSignatureProbante": true,
  "attestationConventionConformeJSON": true,
  "_files": { "convention": "base64..." }
}

Champs principaux

ChampTypeRequisDescription
numeroInterneDossierstringOuiNumero interne du dossier
employeur.siretstringOuiSIRET de l'employeur
apprenti.nomstringOuiNom de l'apprenti
apprenti.prenomstringOuiPrenom de l'apprenti
apprenti.nomUsagestringNonNom d'usage
contrat.dateDebutContratstringOuiDate debut contrat
contrat.dateFinContratstringOuiDate fin contrat
organismeFormation.siretstringOuiSIRET de l'OF
organismeFormation.uaiCfastringNonCode UAI du CFA
formation.dateDebutFormationstringOuiDate debut formation
formation.dateFinFormationstringOuiDate fin formation
formation.dureeFormationnumberOuiDuree en heures
formation.rncpstringNonCode RNCP
formation.intituleQualificationstringNonIntitule
couts.coutTotalPedagogieCFAnumberOuiCout total pedagogique
mandatEmployeurbooleanNonMandat employeur
dateSignaturestringNonDate de signature
_filesobjectNonFichiers joints en base64

Champs couts (tous optionnels sauf coutTotalPedagogieCFA)

ChampTypeDescription
montantRQTHAnnee1 a montantRQTHAnnee4numberMontants RQTH par annee
nombreRepasTotauxnumberNombre total de repas
nombreHebergementTotauxnumberNombre total d'hebergements
montantPremierEquipementnumberMontant premier equipement
mentionMobiliteInternationalebooleanMobilite internationale
accompagnementDROMbooleanAccompagnement DROM

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: conv-001" \
  -d '{"numeroInterneDossier": "INT-001", ...}' \
  "https://api.opcovia.com/opco-ep/conventions"