curl --request POST \
--url https://api.avest.fr/v1/external-integration/acquisition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": false
},
"step": "AQUL",
"matching": {
"ref": "REF-2025-001"
}
},
"note": {
"title": "Demande sur annonce",
"content": "Client intéressé par l'annonce REF-2025-001"
},
"transactionType": "acquisition",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"transaction": {
"project": "buyer",
"activityLevel": "hot",
"propertiesTypes": [
"apartment",
"house"
],
"priceRange": {
"low": 200000,
"high": 350000
},
"sizeRange": {
"low": 60,
"high": 120
},
"bedroomRange": {
"low": 2,
"high": 4
},
"elevator": "preferable",
"outdoor": "essential",
"parking": "unnecessary",
"mortgageType": "standard",
"purpose": "primaryResidence",
"areas": [
{
"type": "postalCode",
"postalCode": "75001",
"name": "Paris",
"countryCode": "FR"
}
],
"parsingCustomId": "EXT-ACQ-2025-001"
}
}
EOFimport requests
url = "https://api.avest.fr/v1/external-integration/acquisition"
payload = {
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": False
},
"step": "AQUL",
"matching": { "ref": "REF-2025-001" }
},
"note": {
"title": "Demande sur annonce",
"content": "Client intéressé par l'annonce REF-2025-001"
},
"transactionType": "acquisition",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"transaction": {
"project": "buyer",
"activityLevel": "hot",
"propertiesTypes": ["apartment", "house"],
"priceRange": {
"low": 200000,
"high": 350000
},
"sizeRange": {
"low": 60,
"high": 120
},
"bedroomRange": {
"low": 2,
"high": 4
},
"elevator": "preferable",
"outdoor": "essential",
"parking": "unnecessary",
"mortgageType": "standard",
"purpose": "primaryResidence",
"areas": [
{
"type": "postalCode",
"postalCode": "75001",
"name": "Paris",
"countryCode": "FR"
}
],
"parsingCustomId": "EXT-ACQ-2025-001"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
allocation: {
agencyGroupId: '66cc8a8e75c9fac35c6ecd73',
agencyId: '66cc91d475c9fac35c86ed80',
userId: '66cc91f05f84c9b212d9ec24',
disableDeduplication: false
},
step: 'AQUL',
matching: {ref: 'REF-2025-001'}
},
note: {
title: 'Demande sur annonce',
content: 'Client intéressé par l\'annonce REF-2025-001'
},
transactionType: 'acquisition',
contact: {
firstName: 'Jean',
lastName: 'Dupont',
email: 'jean.dupont@email.com',
phone: '+33612345678'
},
transaction: {
project: 'buyer',
activityLevel: 'hot',
propertiesTypes: ['apartment', 'house'],
priceRange: {low: 200000, high: 350000},
sizeRange: {low: 60, high: 120},
bedroomRange: {low: 2, high: 4},
elevator: 'preferable',
outdoor: 'essential',
parking: 'unnecessary',
mortgageType: 'standard',
purpose: 'primaryResidence',
areas: [{type: 'postalCode', postalCode: '75001', name: 'Paris', countryCode: 'FR'}],
parsingCustomId: 'EXT-ACQ-2025-001'
}
})
};
fetch('https://api.avest.fr/v1/external-integration/acquisition', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.avest.fr/v1/external-integration/acquisition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'allocation' => [
'agencyGroupId' => '66cc8a8e75c9fac35c6ecd73',
'agencyId' => '66cc91d475c9fac35c86ed80',
'userId' => '66cc91f05f84c9b212d9ec24',
'disableDeduplication' => false
],
'step' => 'AQUL',
'matching' => [
'ref' => 'REF-2025-001'
]
],
'note' => [
'title' => 'Demande sur annonce',
'content' => 'Client intéressé par l\'annonce REF-2025-001'
],
'transactionType' => 'acquisition',
'contact' => [
'firstName' => 'Jean',
'lastName' => 'Dupont',
'email' => 'jean.dupont@email.com',
'phone' => '+33612345678'
],
'transaction' => [
'project' => 'buyer',
'activityLevel' => 'hot',
'propertiesTypes' => [
'apartment',
'house'
],
'priceRange' => [
'low' => 200000,
'high' => 350000
],
'sizeRange' => [
'low' => 60,
'high' => 120
],
'bedroomRange' => [
'low' => 2,
'high' => 4
],
'elevator' => 'preferable',
'outdoor' => 'essential',
'parking' => 'unnecessary',
'mortgageType' => 'standard',
'purpose' => 'primaryResidence',
'areas' => [
[
'type' => 'postalCode',
'postalCode' => '75001',
'name' => 'Paris',
'countryCode' => 'FR'
]
],
'parsingCustomId' => 'EXT-ACQ-2025-001'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.avest.fr/v1/external-integration/acquisition"
payload := strings.NewReader("{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"AQUL\",\n \"matching\": {\n \"ref\": \"REF-2025-001\"\n }\n },\n \"note\": {\n \"title\": \"Demande sur annonce\",\n \"content\": \"Client intéressé par l'annonce REF-2025-001\"\n },\n \"transactionType\": \"acquisition\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"transaction\": {\n \"project\": \"buyer\",\n \"activityLevel\": \"hot\",\n \"propertiesTypes\": [\n \"apartment\",\n \"house\"\n ],\n \"priceRange\": {\n \"low\": 200000,\n \"high\": 350000\n },\n \"sizeRange\": {\n \"low\": 60,\n \"high\": 120\n },\n \"bedroomRange\": {\n \"low\": 2,\n \"high\": 4\n },\n \"elevator\": \"preferable\",\n \"outdoor\": \"essential\",\n \"parking\": \"unnecessary\",\n \"mortgageType\": \"standard\",\n \"purpose\": \"primaryResidence\",\n \"areas\": [\n {\n \"type\": \"postalCode\",\n \"postalCode\": \"75001\",\n \"name\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n ],\n \"parsingCustomId\": \"EXT-ACQ-2025-001\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.avest.fr/v1/external-integration/acquisition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"AQUL\",\n \"matching\": {\n \"ref\": \"REF-2025-001\"\n }\n },\n \"note\": {\n \"title\": \"Demande sur annonce\",\n \"content\": \"Client intéressé par l'annonce REF-2025-001\"\n },\n \"transactionType\": \"acquisition\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"transaction\": {\n \"project\": \"buyer\",\n \"activityLevel\": \"hot\",\n \"propertiesTypes\": [\n \"apartment\",\n \"house\"\n ],\n \"priceRange\": {\n \"low\": 200000,\n \"high\": 350000\n },\n \"sizeRange\": {\n \"low\": 60,\n \"high\": 120\n },\n \"bedroomRange\": {\n \"low\": 2,\n \"high\": 4\n },\n \"elevator\": \"preferable\",\n \"outdoor\": \"essential\",\n \"parking\": \"unnecessary\",\n \"mortgageType\": \"standard\",\n \"purpose\": \"primaryResidence\",\n \"areas\": [\n {\n \"type\": \"postalCode\",\n \"postalCode\": \"75001\",\n \"name\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n ],\n \"parsingCustomId\": \"EXT-ACQ-2025-001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avest.fr/v1/external-integration/acquisition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"AQUL\",\n \"matching\": {\n \"ref\": \"REF-2025-001\"\n }\n },\n \"note\": {\n \"title\": \"Demande sur annonce\",\n \"content\": \"Client intéressé par l'annonce REF-2025-001\"\n },\n \"transactionType\": \"acquisition\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"transaction\": {\n \"project\": \"buyer\",\n \"activityLevel\": \"hot\",\n \"propertiesTypes\": [\n \"apartment\",\n \"house\"\n ],\n \"priceRange\": {\n \"low\": 200000,\n \"high\": 350000\n },\n \"sizeRange\": {\n \"low\": 60,\n \"high\": 120\n },\n \"bedroomRange\": {\n \"low\": 2,\n \"high\": 4\n },\n \"elevator\": \"preferable\",\n \"outdoor\": \"essential\",\n \"parking\": \"unnecessary\",\n \"mortgageType\": \"standard\",\n \"purpose\": \"primaryResidence\",\n \"areas\": [\n {\n \"type\": \"postalCode\",\n \"postalCode\": \"75001\",\n \"name\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n ],\n \"parsingCustomId\": \"EXT-ACQ-2025-001\"\n }\n}"
response = http.request(request)
puts response.read_bodyCréer ou mettre à jour une acquisition
Crée ou met à jour une acquisition (fiche acquéreur) avec déduplication automatique du contact et de la transaction, et possibilité de créer un match avec une vente existante.
Déduplication : recherche d’un contact par téléphone/email (mise à jour ou création), puis recherche d’une acquisition de ce contact, quelle que soit son étape. Allocation et routing d’étape automatiques (forçables via settings) ; sur une acquisition retrouvée, l’étape ne change pas.
settings.matching (acquisition uniquement) crée un match avec une vente existante via ref (référence d’annonce) OU saleId — mutuellement exclusifs. Le match est initialisé à l’étape MRQT ; il n’est pas recréé s’il existe déjà — mais un match existant situé avant MRQT (MSND ou une étape « sans suite » _NF) est remonté à MRQT, ce qui rouvre une mise en relation close. Si la vente n’est pas trouvée, l’acquisition est quand même créée. note crée une activité « note ». parsingCustomId est enregistré et renvoyé en lecture ; il ne sert pas à la déduplication.
settings.allocation.agencyGroupId doit être le groupe de votre clé, et agencyId, s’il est fourni, une agence de GET Agencies. Sinon 400, aucun lead créé (LeadGenerationExternalAcquisition : Agency group is not in the authorized scope of this LinkedAPI, LeadGenerationExternalAcquisition : Agency is not in the authorized scope of this LinkedAPI). Sans agencyId, l’attribution est automatique, parmi les agences du groupe. Les identifiants de l’exemple sont ceux de l’exemple de GET Agencies : remplacez-les par ceux que GET Agencies renvoie pour votre clé, et userId par un collaborateur de cette agence (GET Users liste ceux du groupe).
curl --request POST \
--url https://api.avest.fr/v1/external-integration/acquisition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": false
},
"step": "AQUL",
"matching": {
"ref": "REF-2025-001"
}
},
"note": {
"title": "Demande sur annonce",
"content": "Client intéressé par l'annonce REF-2025-001"
},
"transactionType": "acquisition",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"transaction": {
"project": "buyer",
"activityLevel": "hot",
"propertiesTypes": [
"apartment",
"house"
],
"priceRange": {
"low": 200000,
"high": 350000
},
"sizeRange": {
"low": 60,
"high": 120
},
"bedroomRange": {
"low": 2,
"high": 4
},
"elevator": "preferable",
"outdoor": "essential",
"parking": "unnecessary",
"mortgageType": "standard",
"purpose": "primaryResidence",
"areas": [
{
"type": "postalCode",
"postalCode": "75001",
"name": "Paris",
"countryCode": "FR"
}
],
"parsingCustomId": "EXT-ACQ-2025-001"
}
}
EOFimport requests
url = "https://api.avest.fr/v1/external-integration/acquisition"
payload = {
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": False
},
"step": "AQUL",
"matching": { "ref": "REF-2025-001" }
},
"note": {
"title": "Demande sur annonce",
"content": "Client intéressé par l'annonce REF-2025-001"
},
"transactionType": "acquisition",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"transaction": {
"project": "buyer",
"activityLevel": "hot",
"propertiesTypes": ["apartment", "house"],
"priceRange": {
"low": 200000,
"high": 350000
},
"sizeRange": {
"low": 60,
"high": 120
},
"bedroomRange": {
"low": 2,
"high": 4
},
"elevator": "preferable",
"outdoor": "essential",
"parking": "unnecessary",
"mortgageType": "standard",
"purpose": "primaryResidence",
"areas": [
{
"type": "postalCode",
"postalCode": "75001",
"name": "Paris",
"countryCode": "FR"
}
],
"parsingCustomId": "EXT-ACQ-2025-001"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
allocation: {
agencyGroupId: '66cc8a8e75c9fac35c6ecd73',
agencyId: '66cc91d475c9fac35c86ed80',
userId: '66cc91f05f84c9b212d9ec24',
disableDeduplication: false
},
step: 'AQUL',
matching: {ref: 'REF-2025-001'}
},
note: {
title: 'Demande sur annonce',
content: 'Client intéressé par l\'annonce REF-2025-001'
},
transactionType: 'acquisition',
contact: {
firstName: 'Jean',
lastName: 'Dupont',
email: 'jean.dupont@email.com',
phone: '+33612345678'
},
transaction: {
project: 'buyer',
activityLevel: 'hot',
propertiesTypes: ['apartment', 'house'],
priceRange: {low: 200000, high: 350000},
sizeRange: {low: 60, high: 120},
bedroomRange: {low: 2, high: 4},
elevator: 'preferable',
outdoor: 'essential',
parking: 'unnecessary',
mortgageType: 'standard',
purpose: 'primaryResidence',
areas: [{type: 'postalCode', postalCode: '75001', name: 'Paris', countryCode: 'FR'}],
parsingCustomId: 'EXT-ACQ-2025-001'
}
})
};
fetch('https://api.avest.fr/v1/external-integration/acquisition', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.avest.fr/v1/external-integration/acquisition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'allocation' => [
'agencyGroupId' => '66cc8a8e75c9fac35c6ecd73',
'agencyId' => '66cc91d475c9fac35c86ed80',
'userId' => '66cc91f05f84c9b212d9ec24',
'disableDeduplication' => false
],
'step' => 'AQUL',
'matching' => [
'ref' => 'REF-2025-001'
]
],
'note' => [
'title' => 'Demande sur annonce',
'content' => 'Client intéressé par l\'annonce REF-2025-001'
],
'transactionType' => 'acquisition',
'contact' => [
'firstName' => 'Jean',
'lastName' => 'Dupont',
'email' => 'jean.dupont@email.com',
'phone' => '+33612345678'
],
'transaction' => [
'project' => 'buyer',
'activityLevel' => 'hot',
'propertiesTypes' => [
'apartment',
'house'
],
'priceRange' => [
'low' => 200000,
'high' => 350000
],
'sizeRange' => [
'low' => 60,
'high' => 120
],
'bedroomRange' => [
'low' => 2,
'high' => 4
],
'elevator' => 'preferable',
'outdoor' => 'essential',
'parking' => 'unnecessary',
'mortgageType' => 'standard',
'purpose' => 'primaryResidence',
'areas' => [
[
'type' => 'postalCode',
'postalCode' => '75001',
'name' => 'Paris',
'countryCode' => 'FR'
]
],
'parsingCustomId' => 'EXT-ACQ-2025-001'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.avest.fr/v1/external-integration/acquisition"
payload := strings.NewReader("{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"AQUL\",\n \"matching\": {\n \"ref\": \"REF-2025-001\"\n }\n },\n \"note\": {\n \"title\": \"Demande sur annonce\",\n \"content\": \"Client intéressé par l'annonce REF-2025-001\"\n },\n \"transactionType\": \"acquisition\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"transaction\": {\n \"project\": \"buyer\",\n \"activityLevel\": \"hot\",\n \"propertiesTypes\": [\n \"apartment\",\n \"house\"\n ],\n \"priceRange\": {\n \"low\": 200000,\n \"high\": 350000\n },\n \"sizeRange\": {\n \"low\": 60,\n \"high\": 120\n },\n \"bedroomRange\": {\n \"low\": 2,\n \"high\": 4\n },\n \"elevator\": \"preferable\",\n \"outdoor\": \"essential\",\n \"parking\": \"unnecessary\",\n \"mortgageType\": \"standard\",\n \"purpose\": \"primaryResidence\",\n \"areas\": [\n {\n \"type\": \"postalCode\",\n \"postalCode\": \"75001\",\n \"name\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n ],\n \"parsingCustomId\": \"EXT-ACQ-2025-001\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.avest.fr/v1/external-integration/acquisition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"AQUL\",\n \"matching\": {\n \"ref\": \"REF-2025-001\"\n }\n },\n \"note\": {\n \"title\": \"Demande sur annonce\",\n \"content\": \"Client intéressé par l'annonce REF-2025-001\"\n },\n \"transactionType\": \"acquisition\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"transaction\": {\n \"project\": \"buyer\",\n \"activityLevel\": \"hot\",\n \"propertiesTypes\": [\n \"apartment\",\n \"house\"\n ],\n \"priceRange\": {\n \"low\": 200000,\n \"high\": 350000\n },\n \"sizeRange\": {\n \"low\": 60,\n \"high\": 120\n },\n \"bedroomRange\": {\n \"low\": 2,\n \"high\": 4\n },\n \"elevator\": \"preferable\",\n \"outdoor\": \"essential\",\n \"parking\": \"unnecessary\",\n \"mortgageType\": \"standard\",\n \"purpose\": \"primaryResidence\",\n \"areas\": [\n {\n \"type\": \"postalCode\",\n \"postalCode\": \"75001\",\n \"name\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n ],\n \"parsingCustomId\": \"EXT-ACQ-2025-001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avest.fr/v1/external-integration/acquisition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"AQUL\",\n \"matching\": {\n \"ref\": \"REF-2025-001\"\n }\n },\n \"note\": {\n \"title\": \"Demande sur annonce\",\n \"content\": \"Client intéressé par l'annonce REF-2025-001\"\n },\n \"transactionType\": \"acquisition\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"transaction\": {\n \"project\": \"buyer\",\n \"activityLevel\": \"hot\",\n \"propertiesTypes\": [\n \"apartment\",\n \"house\"\n ],\n \"priceRange\": {\n \"low\": 200000,\n \"high\": 350000\n },\n \"sizeRange\": {\n \"low\": 60,\n \"high\": 120\n },\n \"bedroomRange\": {\n \"low\": 2,\n \"high\": 4\n },\n \"elevator\": \"preferable\",\n \"outdoor\": \"essential\",\n \"parking\": \"unnecessary\",\n \"mortgageType\": \"standard\",\n \"purpose\": \"primaryResidence\",\n \"areas\": [\n {\n \"type\": \"postalCode\",\n \"postalCode\": \"75001\",\n \"name\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n ],\n \"parsingCustomId\": \"EXT-ACQ-2025-001\"\n }\n}"
response = http.request(request)
puts response.read_bodyAutorisations
Token LinkedAPI avec scope externalIntegration. La clé doit avoir un agencyGroup configuré (sinon 400 LinkedAPI agencyGroup is required). Fourni via l'en-tête Authorization: Bearer {linkedAPI_token}. Si la clé a secure === true, l'IP appelante doit être whitelistée (en-tête X-Real-IP), sinon 403 Not authorized to access this resource.
La clé porte aussi un niveau d'accès : en lecture seule, elle n'autorise que les GET ; un POST ou un PATCH renvoie alors 403 Not authorized to access this resource, soit la même réponse qu'une requête sans en-tête Authorization. Voir le guide Authentification.
Corps
Réponse
Acquisition créée ou mise à jour. Peut aussi retourner { success: true, message: "BILLING_STANDBY" } lorsque le compte est en standby de facturation.