get https://api.postgrid.com/v1/addver/completions
Get previews of autocompleted addresses. Pass the same parameters you would into the equivalent POST endpoint and this will produce responses as follows:
{
"status": "success",
"message": "Retrieved verified address completions successfully.",
"data": [
{
"preview": {
"address": "77 BLOOR ST",
"city": "CAPREOL",
"pc": "P0M"
}
},
{
"preview": {
"address": "77 BLOOR ST E",
"city": "OSHAWA",
"pc": "L1H"
}
},
// ...any further results
]
}
Note how the addresses only contain the first line, city, and the first 3 digits of the postal code/ZIP code. This is because this endpoint does not use any lookups. You can use this to present suggestions to users and then call the POST /completions?index=N
endpoint once the user selects the Nth result.
You can also supply a provInsteadOfPC=true
query parameter which will cause the API to return prov
instead of pc
, meaning you can show province or state information rather than showing postal codes.