Skip to main content

Projects API

The Projects API manages the different projects (programs) in the PCH-SIG system.

Overview

A project represents a distinct social protection program (e.g., PCH, PRSSB). It allows you to:

  • Segment data by program
  • Configure project-specific parameters
  • Control capabilities (collection, scoring, enrollment)

Endpoints

EndpointMethodDescription
/api/projetsGETList projects
/api/projetsPOSTCreate a project
/api/projets/{id}GETGet project details
/api/projets/{id}PUTUpdate a project
/api/projets/{id}DELETEDelete a project

Permissions

ActionRequired Permission
ReadROLE_USER
CreateROLE_ADMIN
UpdateROLE_ADMIN
DeleteROLE_ADMIN

Data Model

FieldTypeDescription
idUUIDUnique identifier
codestringUnique project code (e.g., PCH, PRSSB)
nomstringFull project name
descriptiontextDetailed description
dateDebutdateProject start date
dateFindateExpected end date
actifbooleanActive project
lectureSeulebooleanRead-only project (archived)
bailleurstringDonor/Funder
peutCollecterbooleanAllow household collection
peutScorerbooleanAllow PMT scoring
peutEnrolerbooleanAllow beneficiary enrollment
pmtMethodeobjectAssociated PMT method
organisationobjectOwner organization
createdAtdatetimeCreation date

List Projects

Endpoint

GET /api/projets

Response

{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "PCH",
"nom": "Programme de Cash Harmonise",
"description": "Cash transfer program in Guinea-Bissau",
"dateDebut": "2024-01-01",
"dateFin": "2027-12-31",
"actif": true,
"lectureSeule": false,
"bailleur": "World Bank",
"peutCollecter": true,
"peutScorer": true,
"peutEnroler": true
},
{
"id": "...",
"code": "PRSSB",
"nom": "Basic Health System Strengthening Project",
"actif": true,
"lectureSeule": true
}
]
}

Get Project Details

Endpoint

GET /api/projets/{id}

Response

{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "PCH",
"nom": "Programme de Cash Harmonise",
"description": "Conditional cash transfer program...",
"dateDebut": "2024-01-01",
"dateFin": "2027-12-31",
"actif": true,
"lectureSeule": false,
"bailleur": "World Bank",
"peutCollecter": true,
"peutScorer": true,
"peutEnroler": true,
"pmtMethode": {
"id": "...",
"nom": "PMT Guinea-Bissau v2"
},
"organisation": {
"id": "...",
"nom": "Ministry of Social Affairs"
},
"createdAt": "2024-01-01T00:00:00+00:00"
}
}

Create a Project

Endpoint

POST /api/projets

Request Body

{
"code": "NEW",
"nom": "New Program",
"description": "Description of the new program",
"dateDebut": "2026-01-01",
"dateFin": "2028-12-31",
"actif": true,
"bailleur": "International NGO",
"peutCollecter": true,
"peutScorer": true,
"peutEnroler": true
}

Required Fields

  • code: Unique code
  • nom: Project name

Update a Project

Endpoint

PUT /api/projets/{id}

Request Body

{
"actif": false,
"lectureSeule": true
}

Delete a Project

Endpoint

DELETE /api/projets/{id}

:::warning Warning Deletion is only possible if no data is associated with the project (households, beneficiaries, payments). :::


Predefined Projects

PCH (Programme de Cash Harmonise)

AttributeValue
CodePCH
ActiveYes
Read-onlyNo
CollectionAllowed
ScoringAllowed
EnrollmentAllowed

PRSSB (PRSSB Program)

AttributeValue
CodePRSSB
ActiveYes
Read-onlyYes (archived)
CollectionNo
ScoringNo
EnrollmentNo

Project Capabilities

Capabilities control what can be done in the project:

CapabilityDescription
peutCollecterAllow collection of new households
peutScorerAllow PMT score calculation
peutEnrolerAllow beneficiary registration

A project in lectureSeule mode does not allow any data modifications.


PMT Method

Each project can have an associated PMT (Proxy Means Test) method for household scoring.

{
"pmtMethode": {
"id": "...",
"nom": "PMT Guinea-Bissau v2",
"seuilPauvrete": 0.45
}
}

Filtering by Project

Many endpoints accept a projet parameter to filter data:

GET /api/menages?projet={projetId}
GET /api/beneficiaires?projet={projetId}
GET /api/paiements?projet={projetId}