Address funnel

List the communes (kosc_insee_code) of a postal code

To list the different INSEE Covage codes identifying the commune, you must search by postal code via a GET on the url /api/v2/eligibility/cities/.

Parameters

Parameter name

Presence

Type

Constraint

Description

zipcode

Mandatory

string

5 chars number

Postal code of the address you are looking for

Response

The result of the call is a city dictionary list.

Field Name

Type

Description

kosc_insee_code

string

Kosc INSEE code of the city

city

string

City name

locality

string

locality name

zipcode

string

Postal Code of the locality

Example

GET /api/v2/eligibility/cities/?zipcode=06130 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json

[
    {
        "kosc_insee_code": "06069",
        "locality": "GRASSE",
        "zipcode": "06130",
        "city": "GRASSE"
    },
    {
        "kosc_insee_code": "06069",
        "locality": "LE PLAN DE GRASSE",
        "zipcode": "06130",
        "city": "GRASSE"
    },
    {
        "kosc_insee_code": "06069",
        "locality": "PLASCASSIER",
        "zipcode": "06130",
        "city": "GRASSE"
    }
]

Errors

HTTP code

Message

400

Invalid input

500

Unable to serve your request

List the streets (kosc_street_code) of a city from its kosc_insee_code

Searching the endpoint or building address requires providing a kosc_street_code identifying the path. To retrieve it, you must perform a GET on the url /api/v2/eligibility/streets/ from the kosc_insee_code.

Parameters

Name of the parameter

Presence

Type

Constraint

Description

kosc_insee_code

Mandatory

string

5 chars number

Kosc INSEE Code

Response

The result of the call is a street dictionary list.

Field Name

Type

Description

street_name

string

Street Name

kosc_street_code

string

Kosc street ID

Example

GET /api/v2/eligibility/streets/?kosc_insee_code=06069 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json

[
    {
        "street_name": "ALLEE AGAPANTHES  DOM OISEAUX",
        "kosc_street_code": "06069012M2"
    },
    {
        "street_name": "ALLEE AGATHEES  DOM OISEAUX",
        "kosc_street_code": "06069007M2"
    },
    {
        "street_name": "ALLEE ALTHEAS  DOM OISEAUX",
        "kosc_street_code": "06069003M2"
    },
]

Errors

HTTP code

Message

400

Invalid input

500

Unable to serve your request

List the numbers of a street from its kosc_street_code

It is possible to list street numbers via a GET on the /api/v2/eligibility/street_numbers/ url.

Parameters

Field Name

Presence

Type

Constraint

Description

kosc_street_code

Mandatory

string

Max 11 chars

Kosc Street ID

Response

The result of the call is a list of street numbers.

Example

GET /api/v2/eligibility/street_numbers/?kosc_street_code=06069012M1 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json

[
    "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"
]

Errors

HTTP code

Message

400

Invalid input

500

Unable to serve your request

List the addresses close to a geographical point (longitude, latitude)

It is possible to list the addresses via a GET o, the /api/v2/eligibility/coordinates/.

Parameters

Parameter name

Presence

Type

Constraint

Description

lon

Mandatory

Decimal

-180 <= value <= 180

Longitude (+ to the Est, - to the West). The value must be in mainland France or in Corse

lat

Mandatory

Decimal

-90 <= value <= 90

Latitude. The value must be in mainland France or in Corse

dist

Optional

integer

5 <= value <= 999

Distance in meters. If not specified, the default value is equal to 10

Response

The result of the call is a list of dictionary.

Example

GET /api/v2/eligibility/coordinates/?lon=2.12&lat=48.56&dist=150 HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json

[
    {
        "locality": "VILLEMOMBLE",
        "zipcode": "93250",
        "street_number": "8",
        "street_name": "ALLEE DE L ESPERANCE",
        "kosc_street_code": "9307731850",
        "distance": 123,
        "lon_result": "2.1212",
        "lat_result": "48.5578",
        "lon_source": "2.12",
        "lat_source": "48.56",
        "kosc_insee_code": "93077"
    }
]

Errors

HTTP code

Message

400

Invalid input

500

Unable to serve your request