Activity Reports
This page documents the management of Community Worker activity reports.
Overview
Activity reports allow Community Workers to document their field interventions. Each report is submitted for validation by a supervisor.
Data Model (CWRapportActivite)
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
communityWorker | object | Related CW |
typeActivite | string | Activity type |
dateActivite | date | Activity date |
quantite | string | Quantity/Number (contextual) |
nbBeneficiairesHommes | int | Number of male beneficiaries |
nbBeneficiairesFemmes | int | Number of female beneficiaries |
nbBeneficiairesTotal | int | Total beneficiaries (computed) |
observations | text | Notes and observations |
piecesJointes | array | List of attached files |
localite | object | Activity locality |
source | string | Data source |
koboSubmissionId | string | KoBoToolbox submission ID |
statut | string | Report status |
validePar | object | User who validated |
dateValidation | datetime | Validation date |
motifRejet | text | Rejection reason |
createdAt | datetime | Creation date |
Activity Types
| Type | Description |
|---|---|
enregistrement_menages | Registration of new households |
sensibilisation | Community awareness sessions |
verification | Conditionality verification |
collecte_grm | Complaint collection (GRM) |
suivi_vulnerables | Vulnerable household monitoring |
Report Statuses
| Status | Description |
|---|---|
en_attente | Report submitted, awaiting validation |
valide | Report validated by supervisor |
rejete | Report rejected (reason required) |
Data Sources
| Source | Description |
|---|---|
web | Entered via web interface |
mobile | Entered via mobile application |
kobo | Collected via KoBoToolbox |
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/cw-rapports | GET | Paginated list (page, limit; filters search, statut, typeActivite, communityWorker, localite, dateDebut, dateFin) |
/api/cw-rapports | POST | Create a report |
/api/cw-rapports/{id} | GET | Report details |
/api/cw-rapports/{id} | DELETE | Delete a draft or pending report |
/api/cw-rapports/en-attente | GET | Reports awaiting validation (limit, 50 by default) |
/api/cw-rapports/stats | GET | Global statistics |
/api/cw-rapports/{id}/valider | POST | Validate a report |
/api/cw-rapports/{id}/rejeter | POST | Reject a report |
/api/community-workers/{id}/activites | GET | Reports of a CW |
There is no route to edit a report. Validating or rejecting a report that is not pending returns 400.
List CW Reports
Endpoint
GET /api/community-workers/{id}/activites
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | int | No | Number of reports (default: 20) |
Response
{
"success": true,
"data": {
"rapports": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"typeActivite": "sensibilisation",
"dateActivite": "2026-06-10",
"quantite": "1 session",
"nbBeneficiaires": 45,
"localite": "Farim Centro",
"statut": "valide",
"createdAt": "2026-06-10T16:30:00+00:00"
},
{
"id": "...",
"typeActivite": "enregistrement_menages",
"dateActivite": "2026-06-08",
"quantite": "12 households",
"nbBeneficiaires": 12,
"localite": "Farim Centro",
"statut": "en_attente",
"createdAt": "2026-06-08T14:00:00+00:00"
}
],
"stats": {
"total": 45,
"valides": 40,
"enAttente": 3,
"rejetes": 2,
"tauxValidation": 88.9,
"parType": {
"enregistrement_menages": 15,
"sensibilisation": 20,
"verification": 5,
"collecte_grm": 3,
"suivi_vulnerables": 2
}
}
}
}
Create an Activity Report
Endpoint
POST /api/cw-rapports
Request Body
{
"communityWorkerId": "550e8400-e29b-41d4-a716-446655440000",
"typeActivite": "sensibilisation",
"dateActivite": "2026-06-10",
"quantite": "1 session",
"nbBeneficiairesHommes": 15,
"nbBeneficiairesFemmes": 30,
"observations": "Session on the importance of girls' education. Good community participation.",
"localiteId": "...",
"piecesJointes": ["photos/session_2026-06-10.jpg"]
}
Response (201 Created)
{
"success": true,
"data": {
"id": "...",
"typeActivite": "sensibilisation",
"dateActivite": "2026-06-10",
"nbBeneficiairesTotal": 45,
"statut": "en_attente",
"source": "web"
},
"message": "Activity report created"
}
Validate a Report
Endpoint
POST /api/cw-rapports/{id}/valider
Response
{
"success": true,
"message": "Report validated",
"data": {
"id": "...",
"statut": "valide",
"validePar": {
"id": "...",
"nom": "Regional Supervisor"
},
"dateValidation": "2026-06-11T09:15:00+00:00"
}
}
Reject a Report
Endpoint
POST /api/cw-rapports/{id}/rejeter
Request Body
{
"motif": "Number of beneficiaries inconsistent with attached photos"
}
Response
{
"success": true,
"message": "Report rejected",
"data": {
"id": "...",
"statut": "rejete",
"motifRejet": "Number of beneficiaries inconsistent with attached photos",
"dateValidation": "2026-06-11T09:20:00+00:00"
}
}
Validation Workflow
┌──────────────┐ ┌─────────┐
│ Submission │ -------> │ Valid │
│ (pending) │ └─────────┘
└──────────────┘
│
│ (reason required)
▼
┌──────────────┐
│ Rejected │
└──────────────┘
KoBoToolbox Integration
Activity reports can be collected via KoBoToolbox in the field:
- The CW fills out the form on tablet/phone
- Data is synchronized with the KoBo server
- A webhook triggers the import into PCH-SIG
- The report is created with
source: "kobo"and thekoboSubmissionId
KoBo Identifier
The koboSubmissionId field allows to:
- Avoid duplicates during synchronization
- Trace the data origin
- Facilitate reconciliation in case of issues