Autocomplete
client.intlAddressVerification.autocomplete(IntlAddressVerificationAutocompleteParams { id, includeDetails, properCase, 2 more } params, RequestOptionsoptions?): IntlAddressVerificationAutocompleteResponse { data, message, status }
POST/v1/intl_addver/completions
Resolves an address preview id (from GET /completions) into a full address.
Optionally verifies the resolved address through the standard US/CA verifier
when verify=true is supplied and the address is in the US or Canada.
- Uses 1 lookup per call.
- When
verify=trueresolves a US or CA address, the response will be aVerifiedAddressinstead of anIntlAddressCompletion.
Autocomplete
import PostGrid from 'postgrid-node';
const client = new PostGrid({
addressVerificationAPIKey: process.env['POSTGRID_ADDRESS_VERIFICATION_API_KEY'], // This is the default and can be omitted
});
const response = await client.intlAddressVerification.autocomplete({ id: 'id' });
console.log(response.data);{
"data": {
"building": "building",
"city": "city",
"company": "company",
"country": "country",
"countryCode": "countryCode",
"department": "department",
"error": "error",
"formattedAddress": "formattedAddress",
"line1": "line1",
"line2": "line2",
"line3": "line3",
"line4": "line4",
"postalOrZip": "postalOrZip",
"provinceCode": "provinceCode",
"provinceOrState": "provinceOrState"
},
"message": "message",
"status": "success"
}Returns Examples
{
"data": {
"building": "building",
"city": "city",
"company": "company",
"country": "country",
"countryCode": "countryCode",
"department": "department",
"error": "error",
"formattedAddress": "formattedAddress",
"line1": "line1",
"line2": "line2",
"line3": "line3",
"line4": "line4",
"postalOrZip": "postalOrZip",
"provinceCode": "provinceCode",
"provinceOrState": "provinceOrState"
},
"message": "message",
"status": "success"
}