Creates a seller lead with a customer and a product. Requires SITE_LEADS permission and RS:LEADS_SELLER right.
Synchronization & duplicate behavior:
- The system automatically checks for duplicate customers by email OR phone OR mobile_phone.
- Without
check_duplicate(orfalse): if a duplicate is found, the existing contact is silently updated with the provided data and linked to the product. The returnedcustomer_idis the existing one. - With
check_duplicate: true: returns HTTP 409 with error codeCONFLICTwhen a duplicate is found. You must then decide to proceed without the flag or skip.
Customer address: Include address fields directly in the customer object (address, postalcode, city, country, latitude, longitude). These are persisted on the contact record.
Product creation: If product_id is not provided, a product is created from the product object. Criteria follow the same rules as POST /products:
idaccepts either the XML key (e.g."TypeBien") or the numeric ID (e.g."27")valueformat depends on criteria type- DPE is auto-calculated from
conso_energ/valeur_GESif letters are not provided - GPS is auto-geocoded from
Adresse+CodePostal+VilleifAlentouris not provided
User assignment: If user_id is omitted, the system uses the configured lead distribution rule (DEFAULT_LEADS_AFFECTATION) to automatically assign a user within the target agency.
Target agency ID. Must be among the agencies accessible from the authenticated site. Use GET /agencies to discover available IDs.
Assigned user (agent) ID. When omitted, the system uses the configured lead distribution rule (DEFAULT_LEADS_AFFECTATION) to automatically assign a user within the target agency.
Controls duplicate behavior:
falseor omitted (default): if a duplicate customer is found by email OR phone OR mobile_phone, the existing contact is silently updated and linked to the product.true: returns HTTP 409 with error codeCONFLICTwhen a duplicate is found.
Customer data for the lead. Uses snake_case field names. Duplicate detection is performed on email OR phone OR mobile_phone.
Existing product ID to link the seller lead to. Mutually exclusive with the product object — provide one or the other, not both. The product must exist and be within the site scope.
Product to create (required if product_id is not provided). Criteria follow the same rules as POST /products:
idaccepts either the XML key (e.g."TypeBien") or numeric ID (e.g."27")valueformat depends on criteria type (see Products documentation)- DPE auto-calculated, GPS auto-geocoded (see Products pack for details)
- Mock serverhttps://api-doc.immo-facile.com/_mock/openapi/leads/sellers
- https://v2.immo-facile.com/api/v2/sitehttps://v2.immo-facile.com/api/v2/site/leads/sellers
curl -i -X POST \
https://api-doc.immo-facile.com/_mock/openapi/leads/sellers \
-H 'Authorization: Bearer <YOUR_opaque_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"agency_id": 123,
"user_id": 456,
"check_duplicate": true,
"customer": {
"firstname": "Marie",
"lastname": "Martin",
"email": "marie.martin@example.com",
"phone": "+33698765432",
"gender": "F",
"group": 4,
"address": "10 rue des Lilas",
"postalcode": "69001",
"city": "Lyon"
},
"product": {
"criteria": [
{
"id": "TypeBien",
"value": "Maison"
},
{
"id": "TypeTransaction",
"value": "Vente"
},
{
"id": "Surface",
"value": "120"
},
{
"id": "NbPieces",
"value": "5"
},
{
"id": "CodePostal",
"value": "69001"
},
{
"id": "Ville",
"value": "Lyon"
}
]
}
}'{ "data": { "customer_id": 789, "product_id": 12345 } }