API - Description - CityDate - CPFRA

Support DQE
Support DQE
  • Updated

The CPFRA endpoint validates whether a city or locality existed and was valid for a given birthdate.

Related CityDate documentation:

GET request

Endpoint

https://{SERVER_ADDRESS}/CPFRA/?DDN={BIRTHDATE}&INSEE={INSEE_CODE}&CP={POSTAL_CODE}&Localite={CITY_NAME}&Licence={LICENCE_CODE}

Replace the values in braces with your own information:

Parameter Value Description Mandatory/Optional
SERVER_ADDRESS {SERVER_ADDRESS} Address of the DQE server that will process the data. Mandatory
Licence {LICENCE_CODE} Licence code. Mandatory
DDN {BIRTHDATE} Birthdate in YYYY-MM-DD format. Mandatory
INSEE {INSEE_CODE} INSEE code. One of INSEE, CP, or Localite is mandatory.
CP {POSTAL_CODE} Postal code. One of INSEE, CP, or Localite is mandatory.
Localite {CITY_NAME} City name. One of INSEE, CP, or Localite is mandatory.

POST request

Endpoint

https://{SERVER_ADDRESS}/CPFRA/

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

Parameter Value Description Mandatory/Optional
Licence {LICENCE_CODE} Licence code. Mandatory
DDN {BIRTHDATE} Birthdate in YYYY-MM-DD format. Mandatory
INSEE {INSEE_CODE} INSEE code. One of INSEE, CP, or Localite is mandatory.
CP {POSTAL_CODE} Postal code. One of INSEE, CP, or Localite is mandatory.
Localite {CITY_NAME} City name. One of INSEE, CP, or Localite is mandatory.

Response

Success response

The JSON response is a dictionary containing one or more elements. Each element contains the following keys:

Key Possible values Description Type
Insee 75113 INSEE code of the city. STRING(10)
Localite Paris City name. STRING(50)
Pays FR ISO 2 country code. STRING(2)
CodePostal 75013 Postal code of the city. STRING(10)
Status OK / KO Indicates whether the city is valid for the given birthdate. STRING(2)

Example:

{
  "1": {
    "Localite": "EVRY",
    "Pays": "FR",
    "Insee": "89162",
    "CodePostal": "89140",
    "Status": "OK"
  },
  "3": {
    "Localite": "EVRY",
    "Pays": "FR",
    "Insee": "91228",
    "CodePostal": "91080",
    "Status": "KO"
  },
  "2": {
    "Localite": "EVRY",
    "Pays": "FR",
    "Insee": "91228",
    "CodePostal": "91000",
    "Status": "KO"
  }
}

Related to

Was this article helpful?

0 out of 0 found this helpful