Skip to content
Get started

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=true resolves a US or CA address, the response will be a VerifiedAddress instead of an IntlAddressCompletion.
ParametersExpand Collapse
params: IntlAddressVerificationAutocompleteParams { id, includeDetails, properCase, 2 more }
id: string

Body param

includeDetails?: boolean

Query param

properCase?: boolean

Query param

useEnhancedChinaDataset?: boolean

Query param

verify?: boolean

Query param

ReturnsExpand Collapse
IntlAddressVerificationAutocompleteResponse { data, message, status }
data: IntlAddressCompletion { building, city, company, 12 more } | VerifiedAddress { city, country, line1, 13 more }

A fully resolved international address returned by POST /completions.

One of the following:
IntlAddressCompletion { building, city, company, 12 more }

A fully resolved international address returned by POST /completions.

building?: string

The building name, if applicable.

city?: string

The city or locality.

company?: string

The company or organization name, if applicable.

country?: string

The country name.

countryCode?: string

The ISO 2-letter country code.

department?: string

The department or floor, if applicable.

error?: string

An error message if resolution failed.

formattedAddress?: string

The full formatted address string.

line1?: string

The first address line.

line2?: string

The second address line.

line3?: string

The third address line.

line4?: string

The fourth address line.

postalOrZip?: string

The postal or ZIP code.

provinceCode?: string

The province or state code.

provinceOrState?: string

The province or state name.

VerifiedAddress { city, country, line1, 13 more }

The result of a verified international address.

city: string

The city or locality.

country: string

The country code (ISO 3166-1 alpha-2).

line1: string

The first address line.

postalOrZip: string

The postal or ZIP code.

provinceOrState: string

The province or state.

countryName?: string

The full country name.

details?: Details { building, buildingType, cityName, 30 more }

Additional details about the verified address, such as premise, thoroughfare, and locality.

building?: string

The building name or number.

buildingType?: string

The type of building (e.g., apartment, office).

cityName?: string

The full city name.

citySecondary?: string

Secondary city information.

cityType?: string

The type of city (e.g., city, town, village).

deliveryAddress?: string

The full delivery address.

dependentLocality?: string

The dependent locality (UK addresses).

doubleDependentLocality?: string

The double dependent locality (UK addresses).

organization?: string

The organization or company name.

postalOrZipPrimary?: string

The primary part of the postal or ZIP code.

postalOrZipSecondary?: string

The secondary part of the postal or ZIP code.

postBox?: string

The post box number.

premise?: string

The premise name or number.

premiseNumber?: string

The premise number.

premiseSecondary?: string

Secondary premise information.

premiseType?: string

The type of premise (e.g., house, flat).

provinceOrStateName?: string

The full name of the province or state.

provinceOrStateType?: string

The type of province or state (e.g., province, state, region).

street?: string

The street name.

streetPostDirection?: string

The directional suffix for the street (e.g., N, S, E, W).

streetPreDirection?: string

The directional prefix for the street (e.g., N, S, E, W).

streetType?: string

The type of street (e.g., St, Ave, Blvd).

subAdministrativeArea?: string

The sub-administrative area.

subBuilding?: string

The sub-building name or number (e.g., unit, suite).

SubBuildingFloor?: string

The floor of the sub-building.

subBuildingNumber?: string

The sub-building number.

subBuildingType?: string

The type of sub-building (e.g., floor, wing).

subStreet?: string

The sub-street name.

subStreetPostDirection?: string

The directional suffix for the sub-street.

subStreetPreDirection?: string

The directional prefix for the sub-street.

subStreetType?: string

The type of sub-street.

superAdministrativeArea?: string

The super-administrative area.

telephone?: string

The telephone number associated with the address.

errors?: Errors { city, generic, line1, 3 more }

Errors encountered during address verification.

city?: Array<string>

Errors related to the city.

generic?: Array<string>

Generic errors not tied to a specific field.

line1?: Array<string>

Errors related to the first address line.

line2?: Array<string>

Errors related to the second address line.

postalOrZip?: Array<string>

Errors related to the postal or ZIP code.

provinceOrState?: Array<string>

Errors related to the province or state.

firmName?: string

The firm or company name, if available.

formattedAddress?: string

The formatted address string.

geoData?: GeoData { geoAccuracy, latitude, longitude }

Geocoding result for the verified address.

geoAccuracy?: string

The geocode accuracy.

latitude?: string

The latitude of the address.

longitude?: string

The longitude of the address.

line2?: string

The second address line.

line3?: string

The third address line, if available.

status?: Status

The verification status of an address.

One of the following:
"verified"
"corrected"
"failed"
summary?: Summary { contextIdentificationMatchLevel, lexiconIdentificationMatchLevel, matchScore, 6 more }

A summary of the verification process and match levels.

contextIdentificationMatchLevel?: string

Context identification match level.

lexiconIdentificationMatchLevel?: string

Lexicon identification match level.

matchScore?: number

The match score (0-100).

message?: string

Additional message about the verification.

parsingStatus?: string

The parsing status of the address.

postCodeStatus?: string

The status of the postal code.

postProcessedVerificationMatchLevel?: string

The match level after post-processing.

preProcessedVerificationMatchLevel?: string

The match level before post-processing.

verificationStatus?: string

The overall verification status.

zipPlus4?: string

The ZIP+4 code (for US addresses).

message: string
status: "success" | "error"
One of the following:
"success"
"error"

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"
}