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
| Champ | Type | Requis | Description |
|---|---|---|---|
numeroInterneDossier | string | Oui | Numero interne du dossier |
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 |
contrat.dateDebutContrat | string | Oui | Date debut contrat |
contrat.dateFinContrat | string | Oui | Date fin contrat |
organismeFormation.siret | string | Oui | SIRET de l'OF |
organismeFormation.uaiCfa | string | Non | Code UAI du CFA |
formation.dateDebutFormation | string | Oui | Date debut formation |
formation.dateFinFormation | string | Oui | Date fin formation |
formation.dureeFormation | number | Oui | Duree en heures |
formation.rncp | string | Non | Code RNCP |
formation.intituleQualification | string | Non | Intitule |
couts.coutTotalPedagogieCFA | number | Oui | Cout total pedagogique |
mandatEmployeur | boolean | Non | Mandat employeur |
dateSignature | string | Non | Date de signature |
_files | object | Non | Fichiers joints en base64 |
Champs couts (tous optionnels sauf coutTotalPedagogieCFA)
| Champ | Type | Description |
|---|---|---|
montantRQTHAnnee1 a montantRQTHAnnee4 | number | Montants RQTH par annee |
nombreRepasTotaux | number | Nombre total de repas |
nombreHebergementTotaux | number | Nombre total d'hebergements |
montantPremierEquipement | number | Montant premier equipement |
mentionMobiliteInternationale | boolean | Mobilite internationale |
accompagnementDROM | boolean | Accompagnement DROM |
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: conv-001" \
-d '{"numeroInterneDossier": "INT-001", ...}' \
"https://api.opcovia.com/opco-ep/conventions"