List the companies linked to a building
curl --request GET \
--url https://api.gabin.ai/v1/buildings/{id}/companies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gabin.ai/v1/buildings/{id}/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gabin.ai/v1/buildings/{id}/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"company": {
"siren": "999100017",
"name": "Atelier Thermique du Rhône",
"naf_code": "43.29A",
"naf_label": "Travaux d'isolation",
"sector": "renovation-energetique",
"created_on": "2014-03-12",
"active": true,
"partial_diffusion": false,
"gabin_url": "https://gabin.ai/entreprise/atelier-thermique-du-rhone-999100017",
"legal_form": "SAS, société par actions simplifiée",
"headcount_range": "11",
"headquarters": {
"address": "12 rue Émile Zola",
"postal_code": "69100",
"city": "Villeurbanne"
},
"latest_revenue": null,
"latest_revenue_year_end": null
},
"roles": [
"occupant"
],
"establishment": {
"siret": "99910001700011",
"headquarters": true,
"trade_name": null,
"naf_code": "43.29A",
"naf_label": "Travaux d'isolation",
"active": true
}
}
],
"meta": {
"page": {
"next_cursor": null,
"limit": 20
},
"total": 1,
"total_kind": "exact"
}
}Buildings
List the companies linked to a building
Companies linked to a building: occupants (an establishment located there, matched by address or position) and corporate owners (land files), merged by SIREN. Active companies first, then by name.
Sole proprietorships (entrepreneurs individuels) are listed as occupants by their registered name; companies under partial diffusion never are. Up to 500 companies can be reached; above 100 linked companies, the address is usually a business domiciliation.
GET
/
v1
/
buildings
/
{id}
/
companies
List the companies linked to a building
curl --request GET \
--url https://api.gabin.ai/v1/buildings/{id}/companies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gabin.ai/v1/buildings/{id}/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gabin.ai/v1/buildings/{id}/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"company": {
"siren": "999100017",
"name": "Atelier Thermique du Rhône",
"naf_code": "43.29A",
"naf_label": "Travaux d'isolation",
"sector": "renovation-energetique",
"created_on": "2014-03-12",
"active": true,
"partial_diffusion": false,
"gabin_url": "https://gabin.ai/entreprise/atelier-thermique-du-rhone-999100017",
"legal_form": "SAS, société par actions simplifiée",
"headcount_range": "11",
"headquarters": {
"address": "12 rue Émile Zola",
"postal_code": "69100",
"city": "Villeurbanne"
},
"latest_revenue": null,
"latest_revenue_year_end": null
},
"roles": [
"occupant"
],
"establishment": {
"siret": "99910001700011",
"headquarters": true,
"trade_name": null,
"naf_code": "43.29A",
"naf_label": "Travaux d'isolation",
"active": true
}
}
],
"meta": {
"page": {
"next_cursor": null,
"limit": 20
},
"total": 1,
"total_kind": "exact"
}
}Authorizations
API key gab_live_… or OAuth access token gat_….
Path Parameters
BDNB building id (batiment_groupe_id). Example: "bdnb-bg-CJ69-HW8G-PTTG".
Maximum string length:
40Pattern:
^bdnb-[a-z]{2,4}-[A-Za-z0-9]{4}(-[A-Za-z0-9]{4})*$Query Parameters
Cursor returned in meta.page.next_cursor by the previous page. Keep the same filters; the page size is the one of the first page.
Maximum string length:
300Results per page, 1 to 100. Default 20.
Required range:
1 <= x <= 100⌘I