This endpoint allows partners to create new prospects, including photo and ID image upload, with API key and Basic authentication.
| Field | Type | Required | Description |
|---|---|---|---|
| firstName | string | Yes | Prospect's first name |
| lastName | string | Yes | Prospect's last name |
| idNumber | string | Yes | ID card or document number |
| birthDate | date | Yes | Birth date (YYYY-MM-DD) |
| address | string | Yes | Full address |
| Phone Number | string | No | Prospect phone number |
| profession | string | Yes | Profession |
| pep | boolean | No | Is a politically exposed person |
| partnerRefSynchro | string | Yes | External partner reference |
| minIncome | string | Yes | Minimum income |
| maxIncome | string | Yes | Maximum income |
| photo | file (image) | Yes | Prospect's photo (JPG/PNG) |
| idFrontImage | file (image) | Yes | Identity document front image (JPG/PNG) |
| idBackImage | file (image) | Yes | Identity document back image (JPG/PNG) |
curl --location 'http://localhost:3000/api/developper/prospects' \
--header 'X-ADEC-APIKEY: <your_api_key>' \
--header 'Authorization: Basic <base64(username:password)>' \
--form 'firstName="Kobla"' \
--form 'lastName="Teyi"' \
--form 'idNumber="HY678787"' \
--form 'birthDate="1990-01-01"' \
--form 'address="123 Main St"' \
--form 'phoneNumber="2250700000000"' \
--form 'profession="Architect"' \
--form 'pep="false"' \
--form 'partnerRefSynchro="A03933977373"' \
--form 'minIncome="1000"' \
--form 'maxIncome="4000"' \
--form 'idFrontImage=@"/path/to/idFrontImage.jpg"'
--form 'idBackImage=@"/path/to/idBackImage.jpg"'
{
"success": true,
"message": "Prospect created successfully",
"data": {
"prospectId": "68a9980b-13ae-4505-b2e0-7c9019b8c37a"
}
}