Buildings¶
List the buildings of an address¶
To search for a building by address, you can list the buildings via a GET on the url
/api/v2/eligibility/buildings/.
Parameters¶
Name of the parameter |
Presence |
Type |
Constraint |
Description |
|---|---|---|---|---|
kosc_street_code |
Mandatory |
string |
Max 11 chars |
Kosc Street ID (to retrieve here) |
street_number |
Mandatory |
string |
Max 7 chars |
Street number (to retrieve here) |
Response¶
The result of the call is a dictionary list building.
Example¶
GET /api/v2/eligibility/buildings/?street_number=8&kosc_street_code=9307731850 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"operator_code": "FI",
"operator_name": "ORANGE",
"name": "C",
"building_ref": "IMB/93077/C/SKCH",
"type": "BUILDING",
"nro": null,
"address": {
"street_number": "8",
"street_name": "ALLEE DE L ESPERANCE",
"kosc_street_code": "9307731850",
"kosc_insee_code": "93077",
"city": "VILLEMOMBLE"
}
},
{
"operator_code": "FI",
"operator_name": "ORANGE",
"name": "F",
"building_ref": "IMB/93077/X/00HE",
"type": "BUILDING",
"nro": "93064RNY",
"address": {
"street_number": "8",
"street_name": "ALLEE DE L ESPERANCE",
"kosc_street_code": "9307731850",
"kosc_insee_code": "93077",
"city": "VILLEMOMBLE"
}
}
]
Errors¶
HTTP code |
Message |
|---|---|
|
Invalid input |
|
Unable to serve your request |
Getting information from a building¶
To retrieve information from a building, you must perform a GET on the url
/api/v2/eligibility/buildings/{building_ref}/.
Parameters¶
Name of the parameter |
Presence |
Type |
Constraint |
Description |
|---|---|---|---|---|
include_stairs |
Optional |
boolean |
NA |
Allows you to include the |
Response¶
The result of the call is a dictionary building.
When include_stairs=True, a stairs field is included in the response.
This is a dictionary whose key is of the form BUILDING^STAIR and the value
is a list of floors. If the requested building is not eligible to FTTH,
a key info is added with Building is not eligible to FTTH/FTTE
Note
The building reference in the sample URL is encoded, %2F matching the /.
Example¶
GET /api/v2/eligibility/buildings/IMB%2F94058%2FC%2FNGA3/?include_stairs=true HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
{
"operator_code": "FI",
"operator_name": "ORANGE",
"name": "",
"building_ref": "IMB/94058/C/NGA3",
"type": "BUILDING",
"nro": "94033FNY",
"stairs": {
"_NA_^C": [
"0",
"1"
],
"_NA_^_NA_": [
"_NA_"
],
"151 BIS AVENUE PIERR^B": [
"0",
"1"
],
"151 BIS AVENUE PIERR^ES": [
"-1",
"0",
"1",
"2"
],
"151 BIS AVENUE PIERR^_NA_": [
"_NA_"
]
},
"address": {
"street_number": "151B",
"street_name": "AVENUE PIERRE BROSSOLETTE",
"kosc_street_code": "940587147",
"kosc_insee_code": "94058",
"city": "LE PERREUX SUR MARNE",
"zipcode": "94170"
},
"code_interop": null,
"code_l331": "FRTE"
}
.. sourcecode:: http
GET /api/v2/eligibility/buildings/IMB2%2F74067%2FX%2F00WV%2F?include_stairs=true HTTP/1.1
Host: extranet.kosc-telecom.fr
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: application/json
{
"operator_code": "FI",
"operator_name": "ORANGE",
"name": "LE MAX",
"building_ref": "IMB/74067/X/00WV",
"type": "BUILDING",
"nro": "74010SEY",
"stairs": {},
"address": {
"street_number": "10",
"street_name": "ROUTE DU CRET D ESTY",
"kosc_street_code": "74067053A",
"kosc_insee_code": "74067",
"city": "CHAVANOD",
"zipcode": "74650"
},
"code_interop": "FTEL",
"code_l331": "FRTE",
"reference_pm": "FI-74067-0006",
"info": "Building is not eligible to FTTH/FTTE"
}
Errors¶
HTTP code |
Message |
|---|---|
|
Invalid input |
|
Building not found |
|
Unable to serve your request |
|
External web service unreachable |