curl --request POST \
--url https://api.avest.fr/v1/external-integration/rental \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": false
},
"step": "RQUL"
},
"appointment": {
"date": "2025-01-20T00:00:00.000Z",
"startAt": "2025-01-20T10:00:00.000Z",
"endAt": "2025-01-20T11:00:00.000Z",
"note": "RDV visite du bien pour estimation"
},
"note": {
"title": "Nouveau bailleur",
"content": "Client souhaite mettre son bien en gestion"
},
"transactionType": "rental",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"address": "11 rue de Paris, 75001 Paris, France",
"transaction": {
"project": "OR",
"type": "empty",
"property": {
"mainType": "apartment",
"size": 45,
"rooms": 2,
"bedrooms": 1,
"hasElevator": true,
"floor": 2,
"DPEEnergyTag": "C"
},
"fieldValue": {
"low": 900,
"high": 1100
},
"currentValue": 950,
"parsingCustomId": "EXT-RENTAL-2025-001"
}
}
'import requests
url = "https://api.avest.fr/v1/external-integration/rental"
payload = {
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": False
},
"step": "RQUL"
},
"appointment": {
"date": "2025-01-20T00:00:00.000Z",
"startAt": "2025-01-20T10:00:00.000Z",
"endAt": "2025-01-20T11:00:00.000Z",
"note": "RDV visite du bien pour estimation"
},
"note": {
"title": "Nouveau bailleur",
"content": "Client souhaite mettre son bien en gestion"
},
"transactionType": "rental",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"address": "11 rue de Paris, 75001 Paris, France",
"transaction": {
"project": "OR",
"type": "empty",
"property": {
"mainType": "apartment",
"size": 45,
"rooms": 2,
"bedrooms": 1,
"hasElevator": True,
"floor": 2,
"DPEEnergyTag": "C"
},
"fieldValue": {
"low": 900,
"high": 1100
},
"currentValue": 950,
"parsingCustomId": "EXT-RENTAL-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: 'RQUL'
},
appointment: {
date: '2025-01-20T00:00:00.000Z',
startAt: '2025-01-20T10:00:00.000Z',
endAt: '2025-01-20T11:00:00.000Z',
note: 'RDV visite du bien pour estimation'
},
note: {
title: 'Nouveau bailleur',
content: 'Client souhaite mettre son bien en gestion'
},
transactionType: 'rental',
contact: {
firstName: 'Jean',
lastName: 'Dupont',
email: 'jean.dupont@email.com',
phone: '+33612345678'
},
address: '11 rue de Paris, 75001 Paris, France',
transaction: {
project: 'OR',
type: 'empty',
property: {
mainType: 'apartment',
size: 45,
rooms: 2,
bedrooms: 1,
hasElevator: true,
floor: 2,
DPEEnergyTag: 'C'
},
fieldValue: {low: 900, high: 1100},
currentValue: 950,
parsingCustomId: 'EXT-RENTAL-2025-001'
}
})
};
fetch('https://api.avest.fr/v1/external-integration/rental', 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/rental",
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' => 'RQUL'
],
'appointment' => [
'date' => '2025-01-20T00:00:00.000Z',
'startAt' => '2025-01-20T10:00:00.000Z',
'endAt' => '2025-01-20T11:00:00.000Z',
'note' => 'RDV visite du bien pour estimation'
],
'note' => [
'title' => 'Nouveau bailleur',
'content' => 'Client souhaite mettre son bien en gestion'
],
'transactionType' => 'rental',
'contact' => [
'firstName' => 'Jean',
'lastName' => 'Dupont',
'email' => 'jean.dupont@email.com',
'phone' => '+33612345678'
],
'address' => '11 rue de Paris, 75001 Paris, France',
'transaction' => [
'project' => 'OR',
'type' => 'empty',
'property' => [
'mainType' => 'apartment',
'size' => 45,
'rooms' => 2,
'bedrooms' => 1,
'hasElevator' => true,
'floor' => 2,
'DPEEnergyTag' => 'C'
],
'fieldValue' => [
'low' => 900,
'high' => 1100
],
'currentValue' => 950,
'parsingCustomId' => 'EXT-RENTAL-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/rental"
payload := strings.NewReader("{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"RQUL\"\n },\n \"appointment\": {\n \"date\": \"2025-01-20T00:00:00.000Z\",\n \"startAt\": \"2025-01-20T10:00:00.000Z\",\n \"endAt\": \"2025-01-20T11:00:00.000Z\",\n \"note\": \"RDV visite du bien pour estimation\"\n },\n \"note\": {\n \"title\": \"Nouveau bailleur\",\n \"content\": \"Client souhaite mettre son bien en gestion\"\n },\n \"transactionType\": \"rental\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"address\": \"11 rue de Paris, 75001 Paris, France\",\n \"transaction\": {\n \"project\": \"OR\",\n \"type\": \"empty\",\n \"property\": {\n \"mainType\": \"apartment\",\n \"size\": 45,\n \"rooms\": 2,\n \"bedrooms\": 1,\n \"hasElevator\": true,\n \"floor\": 2,\n \"DPEEnergyTag\": \"C\"\n },\n \"fieldValue\": {\n \"low\": 900,\n \"high\": 1100\n },\n \"currentValue\": 950,\n \"parsingCustomId\": \"EXT-RENTAL-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/rental")
.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\": \"RQUL\"\n },\n \"appointment\": {\n \"date\": \"2025-01-20T00:00:00.000Z\",\n \"startAt\": \"2025-01-20T10:00:00.000Z\",\n \"endAt\": \"2025-01-20T11:00:00.000Z\",\n \"note\": \"RDV visite du bien pour estimation\"\n },\n \"note\": {\n \"title\": \"Nouveau bailleur\",\n \"content\": \"Client souhaite mettre son bien en gestion\"\n },\n \"transactionType\": \"rental\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"address\": \"11 rue de Paris, 75001 Paris, France\",\n \"transaction\": {\n \"project\": \"OR\",\n \"type\": \"empty\",\n \"property\": {\n \"mainType\": \"apartment\",\n \"size\": 45,\n \"rooms\": 2,\n \"bedrooms\": 1,\n \"hasElevator\": true,\n \"floor\": 2,\n \"DPEEnergyTag\": \"C\"\n },\n \"fieldValue\": {\n \"low\": 900,\n \"high\": 1100\n },\n \"currentValue\": 950,\n \"parsingCustomId\": \"EXT-RENTAL-2025-001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avest.fr/v1/external-integration/rental")
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\": \"RQUL\"\n },\n \"appointment\": {\n \"date\": \"2025-01-20T00:00:00.000Z\",\n \"startAt\": \"2025-01-20T10:00:00.000Z\",\n \"endAt\": \"2025-01-20T11:00:00.000Z\",\n \"note\": \"RDV visite du bien pour estimation\"\n },\n \"note\": {\n \"title\": \"Nouveau bailleur\",\n \"content\": \"Client souhaite mettre son bien en gestion\"\n },\n \"transactionType\": \"rental\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"address\": \"11 rue de Paris, 75001 Paris, France\",\n \"transaction\": {\n \"project\": \"OR\",\n \"type\": \"empty\",\n \"property\": {\n \"mainType\": \"apartment\",\n \"size\": 45,\n \"rooms\": 2,\n \"bedrooms\": 1,\n \"hasElevator\": true,\n \"floor\": 2,\n \"DPEEnergyTag\": \"C\"\n },\n \"fieldValue\": {\n \"low\": 900,\n \"high\": 1100\n },\n \"currentValue\": 950,\n \"parsingCustomId\": \"EXT-RENTAL-2025-001\"\n }\n}"
response = http.request(request)
puts response.read_bodyCréer ou mettre à jour une location
Crée ou met à jour une location (fiche bailleur / gestion locative) avec déduplication automatique du contact et de la transaction.
Déduplication : recherche d’un contact par téléphone/email (mise à jour ou création), puis recherche de la location la plus récente de ce contact à la même adresse, quelle que soit son étape (une location archivée est rouverte). Allocation et routing d’étape automatiques (forçables via settings).
appointment crée une activité « meeting » (titre auto « Rendez-vous estimation ») et note une activité « note ». En cas d’erreur sur ces créations, la transaction est quand même créée. 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éé (LeadGenerationExternalRental : Agency group is not in the authorized scope of this LinkedAPI, LeadGenerationExternalRental : 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/rental \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": false
},
"step": "RQUL"
},
"appointment": {
"date": "2025-01-20T00:00:00.000Z",
"startAt": "2025-01-20T10:00:00.000Z",
"endAt": "2025-01-20T11:00:00.000Z",
"note": "RDV visite du bien pour estimation"
},
"note": {
"title": "Nouveau bailleur",
"content": "Client souhaite mettre son bien en gestion"
},
"transactionType": "rental",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"address": "11 rue de Paris, 75001 Paris, France",
"transaction": {
"project": "OR",
"type": "empty",
"property": {
"mainType": "apartment",
"size": 45,
"rooms": 2,
"bedrooms": 1,
"hasElevator": true,
"floor": 2,
"DPEEnergyTag": "C"
},
"fieldValue": {
"low": 900,
"high": 1100
},
"currentValue": 950,
"parsingCustomId": "EXT-RENTAL-2025-001"
}
}
'import requests
url = "https://api.avest.fr/v1/external-integration/rental"
payload = {
"settings": {
"allocation": {
"agencyGroupId": "66cc8a8e75c9fac35c6ecd73",
"agencyId": "66cc91d475c9fac35c86ed80",
"userId": "66cc91f05f84c9b212d9ec24",
"disableDeduplication": False
},
"step": "RQUL"
},
"appointment": {
"date": "2025-01-20T00:00:00.000Z",
"startAt": "2025-01-20T10:00:00.000Z",
"endAt": "2025-01-20T11:00:00.000Z",
"note": "RDV visite du bien pour estimation"
},
"note": {
"title": "Nouveau bailleur",
"content": "Client souhaite mettre son bien en gestion"
},
"transactionType": "rental",
"contact": {
"firstName": "Jean",
"lastName": "Dupont",
"email": "jean.dupont@email.com",
"phone": "+33612345678"
},
"address": "11 rue de Paris, 75001 Paris, France",
"transaction": {
"project": "OR",
"type": "empty",
"property": {
"mainType": "apartment",
"size": 45,
"rooms": 2,
"bedrooms": 1,
"hasElevator": True,
"floor": 2,
"DPEEnergyTag": "C"
},
"fieldValue": {
"low": 900,
"high": 1100
},
"currentValue": 950,
"parsingCustomId": "EXT-RENTAL-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: 'RQUL'
},
appointment: {
date: '2025-01-20T00:00:00.000Z',
startAt: '2025-01-20T10:00:00.000Z',
endAt: '2025-01-20T11:00:00.000Z',
note: 'RDV visite du bien pour estimation'
},
note: {
title: 'Nouveau bailleur',
content: 'Client souhaite mettre son bien en gestion'
},
transactionType: 'rental',
contact: {
firstName: 'Jean',
lastName: 'Dupont',
email: 'jean.dupont@email.com',
phone: '+33612345678'
},
address: '11 rue de Paris, 75001 Paris, France',
transaction: {
project: 'OR',
type: 'empty',
property: {
mainType: 'apartment',
size: 45,
rooms: 2,
bedrooms: 1,
hasElevator: true,
floor: 2,
DPEEnergyTag: 'C'
},
fieldValue: {low: 900, high: 1100},
currentValue: 950,
parsingCustomId: 'EXT-RENTAL-2025-001'
}
})
};
fetch('https://api.avest.fr/v1/external-integration/rental', 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/rental",
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' => 'RQUL'
],
'appointment' => [
'date' => '2025-01-20T00:00:00.000Z',
'startAt' => '2025-01-20T10:00:00.000Z',
'endAt' => '2025-01-20T11:00:00.000Z',
'note' => 'RDV visite du bien pour estimation'
],
'note' => [
'title' => 'Nouveau bailleur',
'content' => 'Client souhaite mettre son bien en gestion'
],
'transactionType' => 'rental',
'contact' => [
'firstName' => 'Jean',
'lastName' => 'Dupont',
'email' => 'jean.dupont@email.com',
'phone' => '+33612345678'
],
'address' => '11 rue de Paris, 75001 Paris, France',
'transaction' => [
'project' => 'OR',
'type' => 'empty',
'property' => [
'mainType' => 'apartment',
'size' => 45,
'rooms' => 2,
'bedrooms' => 1,
'hasElevator' => true,
'floor' => 2,
'DPEEnergyTag' => 'C'
],
'fieldValue' => [
'low' => 900,
'high' => 1100
],
'currentValue' => 950,
'parsingCustomId' => 'EXT-RENTAL-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/rental"
payload := strings.NewReader("{\n \"settings\": {\n \"allocation\": {\n \"agencyGroupId\": \"66cc8a8e75c9fac35c6ecd73\",\n \"agencyId\": \"66cc91d475c9fac35c86ed80\",\n \"userId\": \"66cc91f05f84c9b212d9ec24\",\n \"disableDeduplication\": false\n },\n \"step\": \"RQUL\"\n },\n \"appointment\": {\n \"date\": \"2025-01-20T00:00:00.000Z\",\n \"startAt\": \"2025-01-20T10:00:00.000Z\",\n \"endAt\": \"2025-01-20T11:00:00.000Z\",\n \"note\": \"RDV visite du bien pour estimation\"\n },\n \"note\": {\n \"title\": \"Nouveau bailleur\",\n \"content\": \"Client souhaite mettre son bien en gestion\"\n },\n \"transactionType\": \"rental\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"address\": \"11 rue de Paris, 75001 Paris, France\",\n \"transaction\": {\n \"project\": \"OR\",\n \"type\": \"empty\",\n \"property\": {\n \"mainType\": \"apartment\",\n \"size\": 45,\n \"rooms\": 2,\n \"bedrooms\": 1,\n \"hasElevator\": true,\n \"floor\": 2,\n \"DPEEnergyTag\": \"C\"\n },\n \"fieldValue\": {\n \"low\": 900,\n \"high\": 1100\n },\n \"currentValue\": 950,\n \"parsingCustomId\": \"EXT-RENTAL-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/rental")
.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\": \"RQUL\"\n },\n \"appointment\": {\n \"date\": \"2025-01-20T00:00:00.000Z\",\n \"startAt\": \"2025-01-20T10:00:00.000Z\",\n \"endAt\": \"2025-01-20T11:00:00.000Z\",\n \"note\": \"RDV visite du bien pour estimation\"\n },\n \"note\": {\n \"title\": \"Nouveau bailleur\",\n \"content\": \"Client souhaite mettre son bien en gestion\"\n },\n \"transactionType\": \"rental\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"address\": \"11 rue de Paris, 75001 Paris, France\",\n \"transaction\": {\n \"project\": \"OR\",\n \"type\": \"empty\",\n \"property\": {\n \"mainType\": \"apartment\",\n \"size\": 45,\n \"rooms\": 2,\n \"bedrooms\": 1,\n \"hasElevator\": true,\n \"floor\": 2,\n \"DPEEnergyTag\": \"C\"\n },\n \"fieldValue\": {\n \"low\": 900,\n \"high\": 1100\n },\n \"currentValue\": 950,\n \"parsingCustomId\": \"EXT-RENTAL-2025-001\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avest.fr/v1/external-integration/rental")
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\": \"RQUL\"\n },\n \"appointment\": {\n \"date\": \"2025-01-20T00:00:00.000Z\",\n \"startAt\": \"2025-01-20T10:00:00.000Z\",\n \"endAt\": \"2025-01-20T11:00:00.000Z\",\n \"note\": \"RDV visite du bien pour estimation\"\n },\n \"note\": {\n \"title\": \"Nouveau bailleur\",\n \"content\": \"Client souhaite mettre son bien en gestion\"\n },\n \"transactionType\": \"rental\",\n \"contact\": {\n \"firstName\": \"Jean\",\n \"lastName\": \"Dupont\",\n \"email\": \"jean.dupont@email.com\",\n \"phone\": \"+33612345678\"\n },\n \"address\": \"11 rue de Paris, 75001 Paris, France\",\n \"transaction\": {\n \"project\": \"OR\",\n \"type\": \"empty\",\n \"property\": {\n \"mainType\": \"apartment\",\n \"size\": 45,\n \"rooms\": 2,\n \"bedrooms\": 1,\n \"hasElevator\": true,\n \"floor\": 2,\n \"DPEEnergyTag\": \"C\"\n },\n \"fieldValue\": {\n \"low\": 900,\n \"high\": 1100\n },\n \"currentValue\": 950,\n \"parsingCustomId\": \"EXT-RENTAL-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
Location créée ou mise à jour. Peut aussi retourner { success: true, message: "BILLING_STANDBY" } lorsque le compte est en standby de facturation.