Use the /compl/ endpoint to retrieve building or apartment complement details for an address selected from a /single/ response. Pass the StreetId and StreetNumber values returned by /single/ as input.
GET request
Endpoint
https://{SERVER_ADDRESS}/{VERSION}/compl/?StreetId={STREETID}&StreetNumber={STREETNUMBER}&Country={COUNTRY_CODE}&Licence={LICENCE_CODE}&Length={LENGTH}&Search={SEARCH}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 |
| VERSION | {VERSION} | Version of the API (e.g. v1). | Mandatory |
| Licence | {LICENCE_CODE} | Licence code assigned to your account or token generated by oauth2. | Mandatory |
| StreetId | {STREETID} | Street ID returned by /single/. | Mandatory |
| StreetNumber | {STREETNUMBER} | Street number returned by /single/. Can be empty. | Mandatory |
| Country | {COUNTRY_CODE} | ISO 3-letter country code. | Mandatory |
| Length | {LENGTH} | Character limit for the address. Works only on Latin addresses. | Optional. Default: 38. Recommended minimum: 32. |
| Search | {SEARCH} | USA only. Filters complement types (e.g. apt). | Optional |
POST request
Endpoint
https://{SERVER_ADDRESS}/{VERSION}/compl/Add the parameters below in the request body using x-www-form-urlencoded.
| Parameter | Value | Description | Mandatory/Optional |
|---|---|---|---|
| Licence | {LICENCE_CODE} | Licence code assigned to your account or token generated by oauth2. | Mandatory |
| StreetId | {STREETID} | Street ID returned by /single/. | Mandatory |
| StreetNumber | {STREETNUMBER} | Street number returned by /single/. Can be empty. | Mandatory |
| Country | {COUNTRY_CODE} | ISO 3-letter country code. | Mandatory |
| Length | {LENGTH} | Character limit for the address. | Optional. Default: 38. Recommended minimum: 32. |
| Search | {SEARCH} | USA only. Filters complement types. | Optional |
Response
Success response
{
"Found": 3,
"AdditionalAddresses": [
{
"AdditionalAddress": "Bat A",
"PostalCode": "75008"
},
{
"AdditionalAddress": "Bat B",
"PostalCode": "75008"
},
{
"AdditionalAddress": "Bat C",
"PostalCode": "75008"
}
],
"Geolocalisation": {
"Latitude": "48.871556",
"Longitude": "2.307789"
}
}| Key | Description |
|---|---|
| Found | Number of complements returned. |
| AdditionalAddresses | Array of complement objects. |
| AdditionalAddresses.AdditionalAddress | Building or apartment complement label. |
| AdditionalAddresses.PostalCode | Postal code associated with the complement. |
| Geolocalisation | Geolocation object. |
| Geolocalisation.Latitude | Latitude of the address. |
| Geolocalisation.Longitude | Longitude of the address. |
Error response
Errors are returned as JSON in the following format:
{
"status": 400,
"message": "Bad Request",
"details": "Missing mandatory parameter: StreetId",
"error": "Bad Request"
}| Status | Cause |
|---|---|
400 | Missing mandatory parameter, or invalid parameter value. |
401 | Missing, empty, or incorrect Licence parameter. |