Introduction
Cette documentation concerne l'API MLI pour les tiers permettant de consulter des annonces.
Changelog
21/03/2024
Ajout des champs "longitude" et "latitude"
25/07/2023
Ajout des champs "dpe_letter" et "ges_letter"
03/03/2023
Ajout des champs "phone", "website", "logo", "addr", "city" et "zip_code" dans le endpoint agencies
28/10/2022
Ajout du champ "fees_pdf" qui contient l'URL vers le PDF des honoraires de l'agence
25/10/2022
Correction dans la doc des types de "city" et "agency" array => object
Ajout du champ "contact" contenant les informations de contact préférées par l'agence pour l'annonce
19/07/2022
Ajout de la valeur "vendu loué" dans le champ "sub_category"
24/06/2022
Ajout des champs youtube et visit_3d dans le endpoint properties
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Endpoints
Agences
requires authentication
Liste des agences mise à votre disposition
Example request:
curl --request GET \
--get "https://api.mli.immo/third-party-api/agencies" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.mli.immo/third-party-api/agencies"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api.mli.immo/third-party-api/agencies';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api.mli.immo/third-party-api/agencies'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
[
{
"id" : uuid "43430adf-cd54-4a30-9566-29c98683ad77",
"name" : string "Nom de l'agence",
"email" : string "E-mail de l'agence",
"phone" : string "Téléphone de l'agence",
"website" : string "Site internet",
"logo" : string "Url du logo",
"addr" : string "Adresse de l'agence",
"city" : string "Ville de l'agence",
"zip_code" : string "Code postal",
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Annonces
requires authentication
Liste des annonces, il est conseillé de restreindre la liste via un ID d'agence.
Tous les champs peuvent être null à l'exception de id, category
Example request:
curl --request GET \
--get "https://api.mli.immo/third-party-api/properties?Page=17&Limit=17&websites[]=consequatur&agencies[]=consequatur&filters%5Breference%5D=consequatur" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api.mli.immo/third-party-api/properties"
);
const params = {
"Page": "17",
"Limit": "17",
"websites[0]": "consequatur",
"agencies[0]": "consequatur",
"filters[reference]": "consequatur",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://api.mli.immo/third-party-api/properties';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'Page' => '17',
'Limit' => '17',
'websites[0]' => 'consequatur',
'agencies[0]' => 'consequatur',
'filters[reference]' => 'consequatur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api.mli.immo/third-party-api/properties'
params = {
'Page': '17',
'Limit': '17',
'websites[0]': 'consequatur',
'agencies[0]': 'consequatur',
'filters[reference]': 'consequatur',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"total": 25, // nombre d'annonce au total
"page": 1, // page actuelle
"per_page": 100, // nombre d'annonce par page
"properties" : [
{
"id": int 1234,
"reference": string,
"category": enum "vente|location|location saisonnière|viager",
"sub_category": enum "Viager libre|Viager occupé|Nue-propriété|Vente à terme|Viager semi-occupé|Vente à terme libre|Vente à terme semi-occupée|Vente à terme occupée|Viager sans rente|Programme|Programme neuf|Vente à l'unité|Vente en bloc|Vide|Meublée|Colocation|Étudiant|Vacances|Événementiel|Vendu loué",
"type": string "Maison",
"mandate": string "AZ 123", // Numéro de mandat
"price": int 123000, // Prix (Bouquet pour viager) en euro
"title": string "Titre de l'annonce",
"description": string "Description de l'annonce",
"rooms": int 2, // Nombre de pièces
"surface": int 34,
"surface_carrez": float 34.25, // Surface loi carrez
"garbage_tax": int|float 32, // Ordures ménagères
"housing_tax": int|float 32.56, // Taxe d'habitation
"property_tax": int|float 32, // Taxe foncière
"commission_buyer": int|float 24610, // Honoraires acheteur
"commission_buyer_rate": int|float 10.23, // Honoraires acheteur en %
"cellar": int 2, // Nombre de cave
"floor": string "3ème", // étage dans le batiment
"levels": int 2, // nombre d'étages dans l'annonce
"bathroom": int 1, // nombre de salle de bain
"shower_room": int 2, // nombre de salle d'eau
"toilet": int 2, // nombre de WC
"bedroom": int 3, // nombre de chambres
"parking": int 1, // nombre de parking
"land": int|float 456.52, // surface terrain en m²
"elevator": bool true, // ascenseur
"heating": string "Pompe à chaleur avec plancher chauffant", // chauffage
"dpe_status": enum "Vierge|Réalisé|En attente|Non applicable", // Status du DPE
"dpe_value": string "16", // score DPE en kWhEP/m².an
"dpe_letter": string "B", // lettre du DPE
"dpe_date": string "2021-03-25", // date de réalisation du DPE
"dpe_annual_expenses_min": float, // Dépenses annuelles d'énergie
"dpe_annual_expenses_max": float, // Dépenses annuelles d'énergie max. (pour les nouveaux DPE)
"dpe_annual_expenses_date":string "2021-03-25", // date de l'indexation du prix des dépenses annuelles
"ges_status": enum "Vierge|Réalisé|En attente|Non applicable", // Status du DPE
"ges_value": string "6", // score GES en kg éq CO₂/m²/an
"ges_letter": string "A", // lettre GES
"ges_date": string "2021-03-25", // date de réalisation du GES
"construction_year": int 1999, // année de construction
"balcony": int 2, // nombre de balcon
"terrace": int 2, // nombre de terrasse
"pool": bool true, // piscine
"favorite": bool true, // annonce marqué comme favoris
"exclusive": bool false, // exclusivité
"prestige": bool true, // annonce marqué comme prestige
"sold": bool false, // annonce vendu par l'agence
"under_offer": bool false, // Sous offre ou réservation
"orientation": string "Nord Est",
"is_co_ownership": bool true, // cette annonce fait partie d'une co-propriété
"co_ownership_lots": int 54, // nombre de lots dans la co-propriété
"co_ownership_annual_share": int|float 123.45, // montant annuel de la quote-part de la co-propriété
"is_co_ownership_troubled": bool false, // co-propriété en difficulté
"annuities": int|float 125.35, // montant de la rente
"annuities_duration": int 48, // durée de la rente en mois
"market_value": int 480000, // valeur vénale
"life_capita_1_gender": enum "Homme|Femme", // sexe tête 1
"life_capita_1_age": int 77, // age tête 1
"life_capita_2_gender": enum "Homme|Femme", // sexe tête 2
"life_capita_2_age": int 77, // age tête 2
"inventory_of_fixtures": int|float 12.34, // montant état des lieux
"tenant_fees": int|float 12, // honoraire locataire
"security_deposit": int|float 12.34, // dépot de garantie
"state": enum "À rafraîchir|À rénover|Bon état|Excellent état|Neuf", // état
"digicode": bool false,
"intercom": bool false, // interphone
"keeper": bool false, // gardien
"handicapped": bool false, // accès handicapé
"youtube": string "https://...", // Url video youtube
"visit_3d": string "https://...", // Url visite 3D
"photos": array|null [
{
"id": uuid "d2530c39-a166-45f8-8581-263c1a01e59f",
"src": string "https://....jpg",
}
],
"city": object|null {
"zip_code": string "26600",
"fullname": string "Mercurol",
},
"longitude": float|null, // longitude
"latitude": float|null, // latitude
"agency": object {
"id": uuid "78feaa4c-6df7-4ae7-a471-8a862b5ff4ae",
"name": string "Agence de test",
"phone": string "+33 (0)5 67 09 75 76",
"website": string "example.com",
},
"fees_pdf": string|null "https://mli.ams3.digitaloceanspaces.com/agency/fees-pdf/demo.pdf", // PDF avec les honnoraires de l'agence
"contact": object { // informations de contact préférées par l'agence pour l'annonce
"name": string "Jean Dupont",
"phone": string "05 00 00 00 00",
"email": string "test@example.com",
},
"created_at": int 1641286094, // timestamp date de création
"updated_at": int 1641286094, // timestamp date de mise à jour
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.