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

400

Invalid input

500

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 stairs of a building.

Response

The result of the call is a dictionary building.

When include_stairs=True, a field stairs is included in the response. This is a dictionnary where key has structure BUILDING^STAIR and value is a list of floors.

Example

GET /api/v2/eligibility/buildings/IMB%2F93077%2FX%2F00HE/?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": "F",
    "building_ref": "IMB/93077/X/00HE",
    "type": "BUILDING",
    "nro": "93064RNY",
    "stairs": {
        "_NA_^_NA_": [
            "-1",
            "0",
            "1",
            "2",
            "3"
        ]
    },
    "address": {
        "street_number": "8",
        "street_name": "ALLEE DE L ESPERANCE",
        "kosc_street_code": "9307731850",
        "kosc_insee_code": "93077",
        "city": "VILLEMOMBLE"
    }
}

Errors

HTTP code

Message

400

Invalid input

404

Building not found

500

Unable to serve your request

504

External web service unreachable