Documentation API — Modules Métier¶
Enfants, Accompagnements, Évaluations, Tuteurs, Maîtres Coraniques, Parents, Formations, Sensibilisation, Insertion, Mobilisation
Table des matières¶
- Module Enfants — 5 routes
- Module Accompagnements — 13 routes
- Module Évaluations — 5 routes
- Module Tuteurs — 5 routes
- Module Maîtres Coraniques — 5 routes
- Module Parents — 6 routes
- Module Formations — 9 routes
- Module Sensibilisation — 17 routes
- Module Insertion — 6 routes
- Module Mobilisation — 25 routes
Module Enfants¶
Préfixe :
/api/v1/esm/enfants| Controller :EnfantsModuleController
GET /api/v1/esm/enfants¶
Description : Lister les enfants avec filtres et pagination
Permission : ENFANT_LIRE
Authentification : Requise
Paramètres query
| Champ | Type | Description |
|---|---|---|
communeCode |
string | Filtrer par commune |
genre |
MASCULIN | FEMININ |
Filtrer par genre |
statutEnregistrement |
ACTIF | SORTI | PERDU_DE_VUE | DECEDE |
Filtrer par statut |
maitreCoranId |
string (CUID) | Filtrer par maître coranique |
tuteurId |
string (CUID) | Filtrer par tuteur |
recherche |
string | Recherche textuelle (nom, prénom) |
page |
number | Numéro de page (défaut: 1) |
limite |
number | Nb par page (défaut: 20) |
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"items": [ { "id": "cuid", "nom": "Koffi", "prenom": "Segun", "dateNaissance": "2015-03-01", "genre": "MASCULIN", "communeCode": "COT", "statutEnregistrement": "ACTIF", "dateIdentification": "2024-01-15" } ],
"total": 42
}
}
Use Case associé : ListerEnfantsUseCase.ts
Cas d'usage métier : Un agent consulte la liste des enfants talibés de sa commune.
POST /api/v1/esm/enfants¶
Description : Enregistrer un nouvel enfant talibé
Permission : ENFANT_CREER
Authentification : Requise
Données d'entrée (body JSON)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom de famille |
prenom |
string | Oui | Prénom |
dateNaissance |
string (ISO) | Oui | Date de naissance |
genre |
MASCULIN | FEMININ |
Oui | Genre |
communeCode |
string | Oui | Code commune d'identification |
quartier |
string | Non | Quartier |
nationalite |
string | Non | Nationalité |
situationScolaire |
string | Non | Situation scolaire |
niveauInstruction |
string | Non | Niveau d'instruction |
etatSante |
string | Non | État de santé |
dateIdentification |
string (ISO) | Oui | Date d'identification sur le terrain |
maitreCoranId |
string (CUID) | Non | ID du maître coranique |
tuteurId |
string (CUID) | Non | ID du tuteur |
Réponse succès (HTTP 201)
{
"succes": true,
"message": "Enfant enregistré avec succès",
"donnees": { "enfant": { "id": "cuid", "nom": "...", "prenom": "...", "statutEnregistrement": "ACTIF" } }
}
Codes d'erreur
| Code | HTTP | Signification |
|---|---|---|
DONNEES_INVALIDES |
400 | Champs obligatoires manquants ou invalides |
COMMUNE_INTROUVABLE |
404 | Code commune inexistant |
ERREUR_SERVEUR |
500 | Erreur technique |
Use Case associé : CreerEnfantUseCase.ts
GET /api/v1/esm/enfants/:id¶
Description : Obtenir les détails complets d'un enfant par son ID
Permission : ENFANT_LIRE
Authentification : Requise
Paramètres URL
| Champ | Type | Description |
|---|---|---|
id |
string (CUID) | ID de l'enfant |
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": { "enfant": { "id": "cuid", "nom": "...", "commune": {...}, "tuteur": {...}, "maitre": {...} } }
}
Use Case associé : ObtenirEnfantUseCase.ts
PUT /api/v1/esm/enfants/:id¶
Description : Modifier les informations d'un enfant
Permission : ENFANT_MODIFIER
Authentification : Requise
Paramètres URL : id (CUID de l'enfant)
Données d'entrée : Mêmes champs que POST (tous optionnels sauf id)
Use Case associé : ModifierEnfantUseCase.ts
PATCH /api/v1/esm/enfants/:id/statut¶
Description : Changer le statut d'enregistrement d'un enfant (ex: ACTIF → SORTI)
Permission : ENFANT_MODIFIER
Authentification : Requise
Données d'entrée (body)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
statut |
ACTIF | SORTI | PERDU_DE_VUE | DECEDE |
Oui | Nouveau statut |
motif |
string | Non | Motif du changement |
Use Case associé : ChangerStatutEnfantUseCase.ts
Module Accompagnements¶
Préfixe :
/api/v1/esm/accompagnements| Controller :AccompagnementsModuleController
GET /api/v1/esm/accompagnements¶
Description : Lister les accompagnements avec filtres et pagination
Permission : ACCOMPAGNEMENT_LIRE
Authentification : Requise
Paramètres query
| Champ | Type | Description |
|---|---|---|
enfantId |
string (CUID) | Filtrer par enfant |
typeAccompagnementId |
string (CUID) | Filtrer par type |
statut |
EN_COURS | TERMINE | ABANDONNE |
Filtrer par statut |
dateDebutFrom |
string (ISO) | Date de début >= |
dateDebutTo |
string (ISO) | Date de début <= |
page |
number | Numéro de page |
limite |
number | Nb par page |
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"items": [ { "id": "cuid", "enfantId": "cuid", "typeAccompagnementLibelle": "Psychosocial", "statut": "EN_COURS", "dateDebut": "2024-01-01" } ],
"total": 15
}
}
Use Case associé : ListerAccompagnementsUseCase.ts
POST /api/v1/esm/accompagnements¶
Description : Créer un nouvel accompagnement pour un enfant
Permission : ACCOMPAGNEMENT_CREER
Authentification : Requise
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
enfantId |
string (CUID) | Oui | ID de l'enfant bénéficiaire |
typeAccompagnementId |
string (CUID) | Oui | ID du type d'accompagnement |
dateDebut |
string (ISO) | Oui | Date de début |
dateFin |
string (ISO) | Non | Date de fin prévue |
objectif |
string | Non | Objectif de l'accompagnement |
responsable |
string | Non | Nom du responsable |
observations |
string | Non | Observations initiales |
Use Case associé : CreerAccompagnementUseCase.ts
GET /api/v1/esm/accompagnements/:id¶
Description : Obtenir un accompagnement par son ID
Permission : ACCOMPAGNEMENT_LIRE | Use Case : ObtenirAccompagnementUseCase.ts
PUT /api/v1/esm/accompagnements/:id¶
Description : Modifier un accompagnement
Permission : ACCOMPAGNEMENT_CREER | Use Case : ModifierAccompagnementUseCase.ts
PATCH /api/v1/esm/accompagnements/:id/statut¶
Description : Changer le statut d'un accompagnement (EN_COURS → TERMINE, etc.)
Permission : ACCOMPAGNEMENT_CREER
Authentification : Requise
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
statut |
EN_COURS | TERMINE | ABANDONNE |
Oui | Nouveau statut |
Use Case associé : ChangerStatutAccompagnementUseCase.ts
GET /api/v1/esm/accompagnements/:id/suivis¶
Description : Lister les suivis d'un accompagnement
Permission : ACCOMPAGNEMENT_LIRE | Use Case : ListerSuivisUseCase.ts
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"items": [ { "id": "cuid", "dateVisite": "2024-02-15", "agentSuivi": "Agent X", "observations": "...", "evolution": "Positive" } ],
"total": 3
}
}
POST /api/v1/esm/accompagnements/:id/suivis¶
Description : Créer un suivi pour un accompagnement
Permission : SUIVI_CREER
Authentification : Requise
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
dateVisite |
string (ISO) | Oui | Date de la visite de suivi |
agentSuivi |
string | Non | Nom de l'agent ayant effectué le suivi |
observations |
string | Non | Observations de la visite |
evolution |
string | Non | Evolution constatée |
prochaineEtape |
string | Non | Prochaine étape planifiée |
Use Case associé : CreerSuiviUseCase.ts
DELETE /api/v1/esm/accompagnements/:id/suivis/:suiviId¶
Description : Supprimer un suivi
Permission : SUIVI_CREER | Use Case : SupprimerSuiviUseCase.ts
GET /api/v1/esm/accompagnements/:id/cas-orientes¶
Description : Lister les cas orientés d'un accompagnement
Permission : ACCOMPAGNEMENT_LIRE | Use Case : ListerCasOrientesUseCase.ts
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"casOrientes": [ { "id": "cuid", "serviceDestinataire": "Hôpital Mère-Enfant", "typeOrientation": "MEDICAL", "dateOrientation": "2024-03-01" } ],
"total": 1, "page": 1, "limite": 20
}
}
POST /api/v1/esm/accompagnements/:id/cas-orientes¶
Description : Créer un cas orienté pour un accompagnement
Permission : ACCOMPAGNEMENT_CREER
Authentification : Requise
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
serviceDestinataire |
string | Oui | Nom du service/structure destinataire |
typeOrientation |
string | Non | Type d'orientation |
dateOrientation |
string (ISO) | Oui | Date d'orientation |
dateRetourInfo |
string (ISO) | Non | Date de retour d'information |
suitesDonnees |
string | Non | Suites données par le service |
observations |
string | Non | Observations |
Use Case associé : CreerCasOrienteUseCase.ts
GET /api/v1/esm/accompagnements/:id/cas-orientes/:casId¶
Description : Obtenir un cas orienté par son ID
Permission : ACCOMPAGNEMENT_LIRE | Use Case : ObtenirCasOrienteUseCase.ts
PUT /api/v1/esm/accompagnements/:id/cas-orientes/:casId¶
Description : Modifier un cas orienté
Permission : ACCOMPAGNEMENT_CREER | Use Case : ModifierCasOrienteUseCase.ts
DELETE /api/v1/esm/accompagnements/:id/cas-orientes/:casId¶
Description : Supprimer un cas orienté
Permission : ACCOMPAGNEMENT_CREER | Use Case : SupprimerCasOrienteUseCase.ts
Module Évaluations¶
Préfixe :
/api/v1/esm/evaluations| Controller :EvaluationsModuleController
Les évaluations mesurent le niveau de vulnérabilité d'un enfant (6 critères → score → N1/N2/N3/N4).
GET /api/v1/esm/evaluations¶
Description : Lister les évaluations avec filtres et pagination
Permission : ENFANT_LIRE | Use Case : ListerEvaluationsUseCase.ts
Paramètres query : enfantId, niveauVulnerabilite (N1|N2|N3|N4), dateDebut, dateFin, page, limite
POST /api/v1/esm/evaluations¶
Description : Créer une évaluation de vulnérabilité pour un enfant
Permission : ENFANT_MODIFIER
Authentification : Requise
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
enfantId |
string (CUID) | Oui | ID de l'enfant |
dateEvaluation |
string (ISO) | Oui | Date de l'évaluation |
critere1 |
boolean | Oui | Critère 1 (selon config référentiel) |
critere2 |
boolean | Oui | Critère 2 |
critere3 |
boolean | Oui | Critère 3 |
critere4 |
boolean | Oui | Critère 4 |
critere5 |
boolean | Oui | Critère 5 |
critere6 |
boolean | Oui | Critère 6 |
observations |
string | Non | Observations sur l'évaluation |
Réponse succès (HTTP 201)
{
"succes": true,
"donnees": {
"evaluation": {
"id": "cuid", "scoreTotal": 4, "niveauVulnerabilite": "N3",
"criteres": [ { "code": "C1", "libelle": "...", "valeur": true } ]
}
}
}
Note : Le score et le niveau de vulnérabilité sont calculés automatiquement (scoreTotal = somme des critères vrais).
Use Case associé : CreerEvaluationUseCase.ts
GET /api/v1/esm/evaluations/enfant/:enfantId¶
Description : Lister toutes les évaluations d'un enfant (historique)
Permission : ENFANT_LIRE | Use Case : ListerEvaluationsEnfantUseCase.ts
GET /api/v1/esm/evaluations/enfant/:enfantId/derniere¶
Description : Obtenir la dernière évaluation (la plus récente) d'un enfant
Permission : ENFANT_LIRE | Use Case : ObtenirDerniereEvaluationUseCase.ts
Cas d'usage : Afficher le niveau de vulnérabilité actuel dans la fiche enfant.
GET /api/v1/esm/evaluations/:id¶
Description : Obtenir une évaluation par son ID
Permission : ENFANT_LIRE | Use Case : ObtenirEvaluationUseCase.ts
Module Tuteurs¶
Préfixe :
/api/v1/esm/tuteurs| Controller :TuteursModuleController
GET /api/v1/esm/tuteurs¶
Description : Lister les tuteurs avec filtres et pagination
Permission : ACTEUR_LIRE
Paramètres query : communeCode, genre, typeLien (PERE|MERE|GRAND_PARENT|ONCLE_TANTE|TUTEUR_LEGAL|TUTEUR_COMMUNAUTAIRE|AUTRE), recherche, page, limit
POST /api/v1/esm/tuteurs¶
Description : Créer un nouveau tuteur
Permission : ACTEUR_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom de famille |
prenom |
string | Oui | Prénom |
telephone |
string | Non | Numéro de téléphone |
communeCode |
string | Non | Code commune |
genre |
MASCULIN | FEMININ |
Non | Genre |
typeLien |
TypeLienTuteur | Non | Type de lien avec l'enfant |
lienAvecEnfant |
string | Non | Description du lien |
niveauInstruction |
string | Non | Niveau d'instruction |
activitePrincipale |
string | Non | Activité principale |
participeSensibilisation |
boolean | Non | A participé aux sessions de sensibilisation |
GET /api/v1/esm/tuteurs/:id¶
Description : Obtenir un tuteur par son ID
Permission : ACTEUR_LIRE
PUT /api/v1/esm/tuteurs/:id¶
Description : Modifier un tuteur
Permission : ACTEUR_MODIFIER
DELETE /api/v1/esm/tuteurs/:id¶
Description : Supprimer un tuteur
Permission : ACTEUR_MODIFIER
Note : Vérifier les associations avec des enfants avant suppression.
Module Maîtres Coraniques¶
Préfixe :
/api/v1/esm/maitres-coraniques| Controller :MaitresCoraniqueModuleController
GET /api/v1/esm/maitres-coraniques¶
Description : Lister les maîtres coraniques avec filtres et pagination
Permission : ACTEUR_LIRE
Paramètres query : communeCode, enregistreOfficiellement (boolean), recherche, page, limit
POST /api/v1/esm/maitres-coraniques¶
Description : Créer un nouveau maître coranique
Permission : ACTEUR_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom de famille |
prenom |
string | Oui | Prénom |
telephone |
string | Non | Numéro de téléphone |
communeCode |
string | Non | Code commune de l'école |
nomEcole |
string | Non | Nom de l'école coranique (Daara) |
localisationEcole |
string | Non | Localisation précise |
enregistreOfficiellement |
boolean | Non | Enregistrement officiel |
nbTalibeTotal |
number | Non | Nombre total de talibés (défaut: 0) |
nbFilles |
number | Non | Nombre de filles |
nbGarcons |
number | Non | Nombre de garçons |
GET /api/v1/esm/maitres-coraniques/:id¶
Description : Obtenir un maître coranique par son ID
Permission : ACTEUR_LIRE
PUT /api/v1/esm/maitres-coraniques/:id¶
Description : Modifier un maître coranique
Permission : ACTEUR_MODIFIER
DELETE /api/v1/esm/maitres-coraniques/:id¶
Description : Supprimer un maître coranique
Permission : ACTEUR_MODIFIER
Module Parents¶
Préfixe :
/api/v1/esm/parents| Controller :ParentsModuleController
GET /api/v1/esm/parents¶
Description : Lister les parents avec filtres et pagination
Permission : ACTEUR_LIRE
Paramètres query : communeCode, genre, typeLien (PERE|MERE|GRAND_PARENT|ONCLE_TANTE), recherche, page, limit
POST /api/v1/esm/parents¶
Description : Créer un parent
Permission : ACTEUR_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom de famille |
prenom |
string | Oui | Prénom |
typeLien |
PERE | MERE | GRAND_PARENT | ONCLE_TANTE |
Oui | Type de lien avec l'enfant |
telephone |
string | Non | Numéro de téléphone |
communeCode |
string | Non | Code commune |
genre |
MASCULIN | FEMININ |
Non | Genre |
lienAvecEnfantPrecis |
string | Non | Description précise du lien |
niveauInstruction |
string | Non | Niveau d'instruction |
activitePrincipale |
string | Non | Activité principale |
participeSensibilisation |
boolean | Non | A participé aux sensibilisations |
POST /api/v1/esm/parents/:id/enfants¶
Description : Associer un enfant à un parent
Permission : ACTEUR_MODIFIER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
enfantId |
string (CUID) | Oui | ID de l'enfant à associer |
GET /api/v1/esm/parents/:id¶
Description : Obtenir un parent par son ID
Permission : ACTEUR_LIRE
PUT /api/v1/esm/parents/:id¶
Description : Modifier un parent
Permission : ACTEUR_MODIFIER
DELETE /api/v1/esm/parents/:id¶
Description : Supprimer un parent
Permission : ACTEUR_MODIFIER
Module Formations¶
Préfixe :
/api/v1/esm/formations| Controller :FormationsModuleController
GET /api/v1/esm/formations¶
Description : Lister les formations avec filtres et pagination
Permission : FORMATION_LIRE
Paramètres query : communeCode, typeActeurCible, dateFrom, dateTo, recherche, page, limite
POST /api/v1/esm/formations¶
Description : Créer une nouvelle formation
Permission : FORMATION_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
titre |
string | Oui | Titre de la formation |
date |
string (ISO) | Oui | Date de la formation |
lieu |
string | Non | Lieu |
communeCode |
string | Non | Code commune |
typeActeurCible |
string | Non | Type d'acteur cible (tuteurs, maîtres coraniques, etc.) |
nbParticipants |
number | Non | Nombre de participants (défaut: 0) |
themesAbordes |
string | Non | Thèmes abordés |
animateur |
string | Non | Nom de l'animateur |
GET /api/v1/esm/formations/:id¶
Description : Obtenir une formation par son ID
Permission : FORMATION_LIRE
PUT /api/v1/esm/formations/:id¶
Description : Modifier une formation
Permission : FORMATION_CREER
DELETE /api/v1/esm/formations/:id¶
Description : Supprimer une formation
Permission : FORMATION_CREER
GET /api/v1/esm/formations/:id/participations¶
Description : Lister les participants d'une formation
Permission : FORMATION_LIRE | Use Case : ListerParticipationsUseCase.ts
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"items": [ { "id": "cuid", "participantId": "cuid", "typeParticipant": "TUTEUR", "presence": true } ],
"total": 25
}
}
POST /api/v1/esm/formations/:id/participations¶
Description : Ajouter un participant à une formation
Permission : FORMATION_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
participantId |
string (CUID) | Oui | ID du participant (tuteur, maître coranique, etc.) |
typeParticipant |
string | Oui | Type : TUTEUR, MAITRE_CORANIQUE, PARENT, AUTRE |
presence |
boolean | Non | Présence confirmée (défaut: false) |
Use Case associé : AjouterParticipationUseCase.ts
DELETE /api/v1/esm/formations/:id/participations/:partId¶
Description : Supprimer une participation
Permission : FORMATION_CREER | Use Case : SupprimerParticipationUseCase.ts
PATCH /api/v1/esm/formations/:id/participations/:partId/presence¶
Description : Basculer la présence d'un participant (toggle)
Permission : FORMATION_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
presence |
boolean | Oui | Présent ou absent |
Use Case associé : TogglePresenceUseCase.ts
Module Sensibilisation¶
4 sous-modules, tous avec
SUPPORT_GERERcomme permission
Supports de communication — /api/v1/esm/supports-communication¶
| Méthode | Chemin | Description | Use Case |
|---|---|---|---|
| GET | / |
Lister les supports de communication | ListerSupportsUseCase.ts |
| POST | / |
Créer un support de communication | CreerSupportUseCase.ts |
| GET | /:id |
Obtenir un support par son ID | ObtenirSupportUseCase.ts |
| PUT | /:id |
Modifier un support | ModifierSupportUseCase.ts |
| DELETE | /:id |
Supprimer un support | SupprimerSupportUseCase.ts |
Types de support : BOITE_IMAGE | AFFICHE | ROLLUP | BANDEROLE
Données POST/PUT (body)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
type |
TypeSupport | Oui | Type de support |
quantiteProduite |
number | Oui | Quantité produite |
langues |
string[] | Oui | Langues du support |
dateProduction |
string (ISO) | Non | Date de production |
Distributions de supports — /api/v1/esm/distributions-support¶
| Méthode | Chemin | Description | Use Case |
|---|---|---|---|
| GET | / |
Lister les distributions | ListerDistributionsUseCase.ts |
| POST | / |
Créer une distribution | CreerDistributionUseCase.ts |
Données POST (body)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
supportId |
string (CUID) | Oui | ID du support distribué |
communeCode |
string | Non | Commune de distribution |
destinataire |
string | Oui | Destinataire (organisation, individu) |
quantite |
number | Oui | Quantité distribuée |
dateDistribution |
string (ISO) | Oui | Date de distribution |
Émissions radio — /api/v1/esm/emissions-radio¶
| Méthode | Chemin | Description | Use Case |
|---|---|---|---|
| GET | / |
Lister les émissions radio | ListerEmissionsUseCase.ts |
| POST | / |
Créer une émission radio | CreerEmissionUseCase.ts |
| GET | /:id |
Obtenir une émission par son ID | ObtenirEmissionUseCase.ts |
| PUT | /:id |
Modifier une émission | ModifierEmissionUseCase.ts |
| DELETE | /:id |
Supprimer une émission | SupprimerEmissionUseCase.ts |
Données POST/PUT (body)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
stationRadio |
string | Oui | Nom de la station radio |
communeCode |
string | Non | Commune |
dateEmission |
string (ISO) | Oui | Date de l'émission |
dureeMinutes |
number | Non | Durée en minutes |
theme |
string | Non | Thème abordé |
langue |
string | Non | Langue de diffusion |
contratRef |
string | Non | Référence du contrat |
Éducateurs pairs — /api/v1/esm/educateurs-pairs¶
| Méthode | Chemin | Description | Use Case |
|---|---|---|---|
| GET | / |
Lister les éducateurs pairs | ListerEducateursUseCase.ts |
| POST | / |
Créer un éducateur pair | CreerEducateurUseCase.ts |
| GET | /:id |
Obtenir un éducateur par son ID | ObtenirEducateurUseCase.ts |
| PUT | /:id |
Modifier un éducateur | ModifierEducateurUseCase.ts |
| DELETE | /:id |
Supprimer un éducateur | SupprimerEducateurUseCase.ts |
Données POST/PUT (body)
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom de famille |
prenom |
string | Oui | Prénom |
telephone |
string | Non | Téléphone |
communeCode |
string | Non | Code commune |
quartier |
string | Non | Quartier |
genre |
MASCULIN | FEMININ |
Non | Genre |
dateFormation |
string (ISO) | Non | Date de formation comme éducateur pair |
actif |
boolean | Non | Actif ou non (défaut: true) |
Module Insertion¶
Préfixe :
/api/v1/esm/insertion| Controller :InsertionModuleController
GET /api/v1/esm/insertion¶
Description : Lister les parcours d'insertion avec filtres et pagination
Permission : ACTEUR_LIRE
Paramètres query : enfantId, statut (EN_FORMATION|CQM_OBTENU|INSTALLE|ABANDONNE), page, limit
POST /api/v1/esm/insertion¶
Description : Créer un parcours d'insertion socio-économique
Permission : ACTEUR_CREER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
enfantId |
string (CUID) | Oui | ID de l'enfant |
metierCible |
string | Non | Métier cible de l'insertion |
maitrArtisanNom |
string | Non | Nom du maître artisan |
dateInscriptionFormation |
string (ISO) | Non | Date d'inscription en formation professionnelle |
dateObtentionCQM |
string (ISO) | Non | Date d'obtention du CQM (Certificat de Qualification aux Métiers) |
planAffaireDate |
string (ISO) | Non | Date du plan d'affaires |
microSubventionMontant |
string | Non | Montant de la micro-subvention |
microSubventionDate |
string (ISO) | Non | Date d'attribution |
dateInstallation |
string (ISO) | Non | Date d'installation à son compte |
statut |
StatutInsertionLocal | Oui | Statut du parcours |
observations |
string | Non | Observations |
PATCH /api/v1/esm/insertion/:id/statut¶
Description : Changer le statut d'un parcours d'insertion
Permission : ACTEUR_MODIFIER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
statut |
EN_FORMATION | CQM_OBTENU | INSTALLE | ABANDONNE |
Oui | Nouveau statut |
GET /api/v1/esm/insertion/:id¶
Description : Obtenir un parcours d'insertion par son ID
Permission : ACTEUR_LIRE
PUT /api/v1/esm/insertion/:id¶
Description : Modifier un parcours d'insertion
Permission : ACTEUR_MODIFIER
DELETE /api/v1/esm/insertion/:id¶
Description : Supprimer un parcours d'insertion
Permission : ACTEUR_MODIFIER
Module Mobilisation¶
Préfixe :
/api/v1/mobilisation| Controller :MobilisationModuleController
3 entités principales : Comités villageois, Cadres de concertation, Sessions parole des jeunes.
Comités Villageois¶
GET /api/v1/mobilisation/comites¶
Description : Lister les comités villageois de protection
Permission : MOBILISATION_LIRE
Paramètres query : communeCode, statut (ACTIF|INACTIF|SUSPENDU), page, limite
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"items": [ { "id": "cuid", "nom": "Comité Abomey-Calavi", "communeCode": "ABC", "village": "Agla", "statut": "ACTIF", "nbMembres": 12, "nbReunions": 6 } ],
"total": 8
}
}
Use Case associé : ListerComitesUseCase.ts
POST /api/v1/mobilisation/comites¶
Description : Créer un comité villageois
Permission : COMITE_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom du comité |
communeCode |
string | Oui | Code de la commune |
village |
string | Oui | Nom du village |
statut |
ACTIF | INACTIF | SUSPENDU |
Oui | Statut initial |
dateCreation |
string (ISO) | Oui | Date de création officielle |
Use Case associé : CreerComiteUseCase.ts
PATCH /api/v1/mobilisation/comites/:id/statut¶
Description : Changer le statut d'un comité (ACTIF ↔ INACTIF)
Permission : COMITE_GERER
Données d'entrée : { "statut": "INACTIF" }
Use Case associé : ChangerStatutComiteUseCase.ts
GET /api/v1/mobilisation/comites/:id¶
Description : Obtenir un comité par son ID
Permission : MOBILISATION_LIRE | Use Case : ObtenirComiteUseCase.ts
PUT /api/v1/mobilisation/comites/:id¶
Description : Modifier un comité
Permission : COMITE_GERER | Use Case : ModifierComiteUseCase.ts
Membres des comités¶
GET /api/v1/mobilisation/comites/:id/membres¶
Description : Lister les membres d'un comité
Permission : MOBILISATION_LIRE
Réponse succès (HTTP 200)
{
"succes": true,
"donnees": {
"items": [ { "id": "cuid", "nom": "Hounkpe", "prenom": "Aline", "role": "Présidente", "genre": "FEMININ", "forme": true } ],
"total": 12
}
}
POST /api/v1/mobilisation/comites/:id/membres¶
Description : Ajouter un membre au comité
Permission : COMITE_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
nom |
string | Oui | Nom de famille |
prenom |
string | Oui | Prénom |
genre |
MASCULIN | FEMININ |
Non | Genre |
role |
string | Non | Rôle dans le comité |
telephone |
string | Non | Téléphone |
dateAdhesion |
string (ISO) | Oui | Date d'adhésion |
forme |
boolean | Non | A reçu une formation (défaut: false) |
PUT /api/v1/mobilisation/comites/:comiteId/membres/:membreId¶
Description : Modifier un membre du comité
Permission : COMITE_GERER
DELETE /api/v1/mobilisation/comites/:comiteId/membres/:membreId¶
Description : Supprimer un membre du comité
Permission : COMITE_GERER
Réunions des comités¶
GET /api/v1/mobilisation/comites/:id/reunions¶
Description : Lister les réunions d'un comité
Permission : MOBILISATION_LIRE
POST /api/v1/mobilisation/comites/:id/reunions¶
Description : Créer une réunion de comité
Permission : COMITE_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
dateReunion |
string (ISO) | Oui | Date de la réunion |
nbPresents |
number | Oui | Nombre de membres présents |
nbAttendus |
number | Oui | Nombre de membres attendus |
decisionsActees |
string | Non | Décisions prises lors de la réunion |
observations |
string | Non | Observations |
PUT /api/v1/mobilisation/comites/:comiteId/reunions/:reunionId¶
Description : Modifier une réunion | Permission : COMITE_GERER
DELETE /api/v1/mobilisation/comites/:comiteId/reunions/:reunionId¶
Description : Supprimer une réunion | Permission : COMITE_GERER
Cadres de concertation¶
GET /api/v1/mobilisation/cadres-concertation¶
Description : Lister les cadres de concertation
Permission : MOBILISATION_LIRE
Paramètres query : type (TypeConcertation), communeCode, departement, page, limite
POST /api/v1/mobilisation/cadres-concertation¶
Description : Créer un cadre de concertation
Permission : CONCERTATION_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
type |
TypeConcertation | Oui | Type de concertation (Prisma enum) |
communeCode |
string | Non | Code commune |
departement |
string | Non | Département |
periodicite |
TypePeriodicite | Oui | Périodicité des sessions (Prisma enum) |
GET /api/v1/mobilisation/cadres-concertation/:id¶
Description : Obtenir un cadre par son ID | Permission : MOBILISATION_LIRE
PUT /api/v1/mobilisation/cadres-concertation/:id¶
Description : Modifier un cadre | Permission : CONCERTATION_GERER
Sessions de concertation¶
GET /api/v1/mobilisation/cadres-concertation/:id/sessions¶
Description : Lister les sessions d'un cadre | Permission : MOBILISATION_LIRE
POST /api/v1/mobilisation/cadres-concertation/:id/sessions¶
Description : Créer une session de concertation | Permission : CONCERTATION_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
dateSession |
string (ISO) | Oui | Date de la session |
nbParticipantsAttendus |
number | Oui | Participants attendus |
nbParticipantsPresents |
number | Oui | Participants présents |
decisionsCount |
number | Non | Nombre de décisions prises |
decisionsAppliquees |
number | Non | Nombre de décisions appliquées |
observations |
string | Non | Observations |
PUT /api/v1/mobilisation/cadres-concertation/:cadreId/sessions/:sessionId¶
Description : Modifier une session | Permission : CONCERTATION_GERER
DELETE /api/v1/mobilisation/cadres-concertation/:cadreId/sessions/:sessionId¶
Description : Supprimer une session | Permission : CONCERTATION_GERER
Sessions Parole des jeunes¶
GET /api/v1/mobilisation/sessions-parole¶
Description : Lister les sessions "Parole des jeunes"
Permission : MOBILISATION_LIRE
Paramètres query : type (TypeSession), communeCode, page, limite
POST /api/v1/mobilisation/sessions-parole¶
Description : Créer une session parole des jeunes | Permission : COMITE_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
type |
TypeSession | Oui | Type de session (Prisma enum) |
dateSession |
string (ISO) | Oui | Date de la session |
communeCode |
string | Non | Code commune |
theme |
string | Non | Thème de la session |
nbParticipants |
number | Non | Nombre de participants |
animateur |
string | Non | Nom de l'animateur |
observations |
string | Non | Observations |
GET /api/v1/mobilisation/sessions-parole/:id¶
Description : Obtenir une session par son ID | Permission : MOBILISATION_LIRE
PUT /api/v1/mobilisation/sessions-parole/:id¶
Description : Modifier une session | Permission : COMITE_GERER
DELETE /api/v1/mobilisation/sessions-parole/:id¶
Description : Supprimer une session | Permission : COMITE_GERER
Participations aux sessions parole¶
GET /api/v1/mobilisation/sessions-parole/:id/participations¶
Description : Lister les participations d'une session | Permission : MOBILISATION_LIRE
POST /api/v1/mobilisation/sessions-parole/:id/participations¶
Description : Ajouter une participation | Permission : COMITE_GERER
Données d'entrée
| Champ | Type | Obligatoire | Description |
|---|---|---|---|
genre |
MASCULIN | FEMININ |
Non | Genre du participant |
trancheAge |
string | Non | Tranche d'âge (ex: "15-18") |
observations |
string | Non | Observations |
DELETE /api/v1/mobilisation/sessions-parole/:sessionId/participations/:participationId¶
Description : Supprimer une participation | Permission : COMITE_GERER