Classic API — Address CP

Support DQE
Support DQE
  • Updated

Use the /CP/ endpoint as the first step in the funnel address search flow. Search for localities by postal code or city name. Then pass the returned IDLocalite to /ADR/ to search streets within the selected city.

GET request

Endpoint

https://{SERVER_ADDRESS}/CP/?CodePostal={POSTAL_CODE}&Alpha=True&Instance={VALUE}&Pays={COUNTRY_CODE}&Etendue=Y&Licence={LICENCE_CODE}&NbMax={NB_MAX}&Filter={FILTER}&Langue={LANGUAGE}

Replace the values in braces with your own information.

ParameterValueDescriptionMandatory/Optional
SERVER_ADDRESS{SERVER_ADDRESS}Address of the DQE server that will process the data.Mandatory
Licence{LICENCE_CODE}Licence code assigned to your account or token generated by oauth2.Mandatory
CodePostal{POSTAL_CODE}Postal code or city name input.Mandatory
Pays{COUNTRY_CODE}ISO 3-letter country code.Mandatory
AlphaTrueMust always be set to True.Mandatory
Instance{VALUE}Allows you to pass a value during the call, returned in the response.Optional
EtendueYFrance and Belgium only. Enables search with as few as 2 digits entered.Optional
NbMax{NB_MAX}Limits the number of returned responses.Optional
Filter{FILTER}Filters returned address types. 1: postal + PO box. 2: postal + street. 3: postal only. 4: one per postal+city (Malaysia only).Optional
Langue{LANGUAGE}For Japan only: JP Kanji, JK Katakana, EN English.Optional

POST request

Endpoint

https://{SERVER_ADDRESS}/CP/

Add the parameters below in the request body using x-www-form-urlencoded.

ParameterValueDescriptionMandatory/Optional
Licence{LICENCE_CODE}Licence code assigned to your account or token generated by oauth2.Mandatory
CodePostal{POSTAL_CODE}Postal code or city name input.Mandatory
Pays{COUNTRY_CODE}ISO 3-letter country code.Mandatory
AlphaTrueMust always be set to True.Mandatory
Instance{VALUE}Allows you to pass a value during the call.Optional
EtendueYFrance and Belgium only. Enables search with as few as 2 digits.Optional
NbMax{NB_MAX}Limits the number of returned responses.Optional
Filter{FILTER}1: postal + PO box. 2: postal + street. 3: postal only. 4: one per postal+city (Malaysia).Optional
Langue{LANGUAGE}For Japan only: JP Kanji, JK Katakana, EN English.Optional

Response

Success response

The JSON response is a dictionary whose keys are numbered from 1 to n. Each element contains one locality suggestion. For France, when the postal code refers directly to a street or company, up to 100 streets may be returned with an IDVoie value.

{
  "42": {
    "Province": "*",
    "IDLocalite": "92048",
    "NbNumero": "14",
    "Pays": "FRA",
    "IDVoie": "1750416",
    "Voie": "RUE DE LA PEPINIERE",
    "Cedex": "0",
    "Numero": "",
    "TypeVoie": "",
    "Instance": "0",
    "ListeNumero": "2;2B;3;4;5;6;7;8;10;12;14;16;18;20",
    "CodePostal": "92360",
    "SousLocalite": "",
    "LieuDit": "",
    "Latitude": "48.8130414978102",
    "Localite": "MEUDON (LD. MEUDON LA FORET)",
    "Longitude": "2.23855375105306",
    "Complement": "",
    "Entreprise": ""
  }
}
FieldMeaningAlways in JSON?Type / Format
ProvinceRegion or province where the city is located.YesSTRING(50)
IDLocaliteUnique code for the city. For France, this is the INSEE code.YesSTRING(20)
PaysISO country code.YesSTRING(3)
InstanceValue passed in the request and returned in the response.YesSTRING(3)
CodePostalZIP or postal code.YesSTRING(10)
SousLocaliteAdditional locality information.YesSTRING(50)
LieuDitDependent locality or place name.YesSTRING(50)
LocaliteCity name or label.YesSTRING(50)
LatitudeLatitude of the locality center.YesDECIMAL(18), often returned as a string
LongitudeLongitude of the locality center.YesDECIMAL(18), often returned as a string
IDVoieUnique identifier for the street.YesSTRING(20), alphanumeric possible
VoieStreet name.Conditional, only if IDVoie is not emptySTRING(50)
NbNumeroNumber of house numbers on the street.YesSTRING(4), numeric in practice
ListeNumeroList of house numbers, separated by semicolons.YesSTRING(1024)
NumeroHouse number. Empty in the sample.YesSTRING, can be empty
TypeVoieStreet type. Empty in the sample.YesSTRING, can be empty
ComplementAdditional address details.YesSTRING(255)
EntrepriseCompany name.YesSTRING(255)
CedexCedex flag: 1 = Cedex, 0 = not Cedex.YesSTRING(1)

Error response

Error typeResponse type
Missing or incorrect Licence parameterEmpty response
Missing CodePostal parameter400 Bad Request
Parameter error400 Bad Request

Was this article helpful?

0 out of 0 found this helpful