Name API — LASTNAMESUGGEST

Support DQE
Support DQE
  • Updated

Use this endpoint to suggest last names based on user input.

Related Name documentation:

GET request

Endpoint

https://{SERVER_ADDRESS}/LASTNAMESUGGEST/?Lastname={NAME}&NBResponse={NUM}&Licence={LICENCE_CODE}

Replace the values in braces with your own information:

Parameter Value Description Mandatory/Optional
Licence {LICENCE_CODE} Licence code assigned to your account. Mandatory
Lastname {NAME} Part of the last name already entered by the user. Mandatory
NBResponse {NUM} Maximum number of suggestions to return. Optional. Default: 10.

POST request

Endpoint

https://{SERVER_ADDRESS}/LASTNAMESUGGEST/

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

Parameter Value Description Mandatory/Optional
Licence {LICENCE_CODE} Licence code assigned to your account. Mandatory
Lastname {NAME} Part of the last name already entered by the user. Mandatory
NBResponse {NUM} Maximum number of suggestions to return. Optional. Default: 10.

Response

Success response

The JSON response is a dictionary containing the suggest key. Its value is an array of suggested items. Each item is an array of two strings: the first value is always I, and the second value is the suggested last name.

Key Description France International
suggest[X][0] I: unknown STRING(1) STRING(1)
suggest[X][1] Associated last name. STRING(255) STRING(255)

Example:

{
  "suggest": [
    ["I", "DUPONT"],
    ["I", "DUPOUY"],
    ["I", "DUPORT"]
  ]
}

Error response

Error type Request example Response type
Missing, empty, or incorrect Licence parameter https://{SERVER_ADDRESS}/LASTNAMESUGGEST/?Lastname=DUP&NBResponse=10 {}
Missing or empty Lastname parameter https://{SERVER_ADDRESS}/LASTNAMESUGGEST/?NBResponse=10&Licence={LICENCE_CODE} {"suggest": []}
Parameter typo https://{SERVER_ADDRESS}/LASTNAMESUGGEST/?Lasname=DUP&NBResponse=10&Licence={LICENCE_CODE} {"suggest": []}

Related to

Was this article helpful?

0 out of 0 found this helpful