Buildings¶
Lister les buildings d'une adresse¶
Pour rechercher un building par adresse, vous pouvez lister les buildings via un GET sur l'url
/api/v2/eligibility/buildings/.
Paramètres¶
Nom du paramètre |
Présence |
Type |
Contrainte |
Description |
|---|---|---|---|---|
kosc_street_code |
Obligatoire |
string |
Max 11 chars |
Identifiant Covage de la voie (à récupérer ici) |
street_number |
Obligatoire |
string |
Max 7 chars |
Numéro de rue (à vérifier ici) |
Réponse¶
Le résultat de l'appel est une liste de dictionnaire building.
Exemple¶
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"
}
}
]
Erreurs¶
HTTP code |
Message |
|---|---|
|
Invalid input |
|
Unable to serve your request |
Obtenir les informations d'un building¶
Pour récupérer les informations d'un building, vous devez procéder à un GET sur l'url
/api/v2/eligibility/buildings/{building_ref}/.
Paramètres¶
Nom du paramètre |
Présence |
Type |
Contrainte |
Description |
|---|---|---|---|---|
include_stairs |
Optionel |
boolean |
NA |
Permet d'inclure les |
Réponse¶
Le résultat de l'appel est un dictionnaire building.
Lorsque include_stairs=True, un champ stairs est inclus dans la réponse.
Celui-ci est un dictionnaire dont la clef est de la forme BATIMENT^ESCALIER et la value
est une liste d'étages. Si le bâtiment demandé n'est pas éligible au FTTH, une clé info sera ajoutée
avec comme valeur Building is not eligibile to FTTH.
Note
La référence immeuble dans l'URL exemple est encodé, %2F correspondant au /.
Exemple¶
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"
}
Erreurs¶
HTTP code |
Message |
|---|---|
|
Invalid input |
|
Building not found |
|
Unable to serve your request |
|
External web service unreachable |