Address Validation API
Address Validation API
Address Validation API validates and normalizes US addresses, and provides valuable insights like latitude and longitude coordinates.
Address Validation API 3.0
Query Parameters
string
required
The first line of the street part in the structured address. Example:
street_line_1=800 Bellevue Way NEstring
The second line of the street part in the structured address (e.g. apartment or suite number). Example:
street_line_2=Ste 100string
The name of the city in the structured address. Example:
city=Bellevuestring
The state code of the structured address. Example:
state_code=WAstring
The postal code of the structured address. Example:
postal_code=98004Headers
string
required
Your API key for authentication. Example:
{{ apiKey }}Response
string or null <Location.<uuid>>
The persistent ID of the validated address. Format:
Location.<uuid>. Only present when the address is valid.boolean or null
True if the address is valid.
string or null
The first line of the street part in the structured address, normalized by USPS CASS standards.
string or null
The second line of the street part in the structured address. Returns
null for this API — unit information is incorporated into street_line_1 during normalization.string or null
The name of the city in the structured address.
string or null
The 5-digit postal code of the structured address.
string or null
The 4-digit ZIP+4 extension of the structured address (USA).
string or null
The state code of the structured address.
string or null (ISO-3166-2)
The ISO-3166 alpha-2 country code of the address. Always
US for valid responses from this API.object or null
The coordinates of the geographical location of the address. Only present when CASS returns coordinate data.
string or null
An error message string if a partial error occurred during processing, otherwise
null.string[]
Warnings returned as part of the response, if applicable.Enum: Missing Input Invalid address Invalid house/building number Missing unit/apt/suite number Invalid unit/apt/suite number Non-US country address validation is not supported. Address validation could not be completed at this time. Please try again later
Error Responses
400 Bad Request
The server cannot process the request due to client-side errors.Check for: Syntax errors in the request script, malformed JSON, or invalid parameters.403 Forbidden
The request is understood, but the server is refusing to fulfill it. Error responses include anerrorCode field identifying the cause:-
Invalid API Key (
INVALID_API_KEY): The key is incorrect, deactivated, or missing from the request. Check for: Trailing spaces, syntax errors, incorrect character counts, or a missingx-api-keyheader. -
API Key Disabled (Portal Issue) (
FORBIDDEN): The key is inactive. Check for: Insufficient funds in your self-serve wallet or if a Trestle Admin manually deactivated your API key. -
API Key does not have Product Access (Portal Issue) (
FORBIDDEN): The API key is active, but it is not enabled for this product or API version. Check for: Incorrect endpoint, incorrect API version, or missing product access on the key. -
API Key Expired (
FORBIDDEN): The key has reached its end-of-life (primarily affects Trial users).
429 Too Many Requests
You have sent too many requests in a given amount of time.-
Rate Limit Exceeded (
RATE_LIMIT_EXCEEDED): You have surpassed the queries-per-second (QPS) threshold for your tier. -
Quota Exceeded (Portal Issue) (
QUOTA_EXCEEDED): You have reached the total volume allowed for your current billing cycle. Upgrade your plan in the portal to resume service.
