---
title: "Parses and validates an address"
method: GET
path: "/v2/address/validate"
tags: ["Address"]
---

# Parses and validates an address

`GET /v2/address/validate`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/address/validate`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/address/validate/get.ts> (a function with typed inputs; its response is checked against the schema)

Use to parse an address line into an AddressValidationX object and validate it.  Address format should be in the form of number, street name, street suffix, ie 135 Front St.  Please note that the <a href="#/~schema/AddressValidationX">addressValidation.customerServiceRecordX.country</a> is not currently being populated in the response.

## Query parameters

- `address` string, required
- `country` 'USA' | 'CAN' | 'UNK', required
- `postalCode` string, required

## Response `200`

Successful operation

- AddressValidationX
  - `requiredFields` string[]
  - `customerServiceRecord` CustomerServiceRecordX
    - `id` string
    - `firstName` string
    - `middleInitial` string
    - `lastName` string
    - `businessName` string
    - `streetNumber` string
    - `streetNumberSuffix` string
    - `preDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `streetName` string
    - `streetSuffix` string
    - `postDirectional` '' | 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW'
    - `city` string
    - `state` string: A two-letter state abbreviation
    - `country` string: Alianza supports accounts in the USA and Canada.
    - `postalCode` string
    - `secondaryLocationDescription` '' | 'APARTMENT' | 'BUILDING' | 'BASEMENT' | 'DEPARTMENT' | 'FLOOR' | 'FRONT' | 'HANGER' | 'KEY' | 'LOBBY' | 'LOT' | 'LOWER' | 'OFFICE' | 'PENTHOUSE' | 'PIER' | 'REAR' | 'ROOM' | 'SIDE' | 'SLIP' | 'SPACE' | 'SUITE' | 'STOP' | 'TRAILER' | 'UNIT' | 'UPPER'
    - `unit` string
    - `customerType` 'BUSINESS' | 'RESIDENTIAL'
    - `firstNameSecondary` string
    - `blockCustomerName` boolean
    - `customerName` string
  - `latitude` string
  - `longitude` string
  - `valid` boolean

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized
- `404`: Zipcodes not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
