POST address/validate

Validate address

Request Information

URI Parameters

None.

Body Parameters

Address model

AddressValidationModel
NameDescriptionTypeAdditional information
Street1

Street address line one

string

Max length: 100

Street2

Street address line two

string

Max length: 100

City

City

string

Max length: 100

StateProvince

State / Province code Valid 2 character State or Province code. See ISO-3166

string

Max length: 100

PostalCode

Postal code

string

Max length: 20

CountryCode

Country Code Standard ISO-3166 2-Character country code

string

Max length: 2

Request Formats

application/json, text/json

Sample:
{
  "Street1": "sample string 1",
  "Street2": "sample string 2",
  "City": "sample string 3",
  "StateProvince": "sample string 4",
  "PostalCode": "sample string 5",
  "CountryCode": "sample string 6"
}

application/xml, text/xml

Sample:
<AddressValidationModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Street1>sample string 1</Street1>
  <Street2>sample string 2</Street2>
  <City>sample string 3</City>
  <StateProvince>sample string 4</StateProvince>
  <PostalCode>sample string 5</PostalCode>
  <CountryCode>sample string 6</CountryCode>
</AddressValidationModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AddressValidationModel'.

Response Information

Resource Description

AddressValidationResponse
NameDescriptionTypeAdditional information
State

State such as STANDARDIZED, NORMALIZED, RAW Standardized is returned when validation can match address

string

None.

Classification

Classification such as BUSINESS, RESIDENTIAL, MIXED, UNKNOWN

string

None.

Attributes

Array of attributes used to determine if address is valid

Collection of AddressValidationAttribute

None.

EffectiveAddress

If there was an address match this will include the new full address otherwise it returns the input address

AddressValidationModel

None.

Response Formats

application/json, text/json

Sample:
{
  "State": "sample string 1",
  "Classification": "sample string 2",
  "Attributes": [
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    },
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    }
  ],
  "EffectiveAddress": {
    "Street1": "sample string 1",
    "Street2": "sample string 2",
    "City": "sample string 3",
    "StateProvince": "sample string 4",
    "PostalCode": "sample string 5",
    "CountryCode": "sample string 6"
  }
}

application/xml, text/xml

Sample:
<AddressValidationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <State>sample string 1</State>
  <Classification>sample string 2</Classification>
  <Attributes>
    <AddressValidationAttribute>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </AddressValidationAttribute>
    <AddressValidationAttribute>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </AddressValidationAttribute>
  </Attributes>
  <EffectiveAddress>
    <Street1>sample string 1</Street1>
    <Street2>sample string 2</Street2>
    <City>sample string 3</City>
    <StateProvince>sample string 4</StateProvince>
    <PostalCode>sample string 5</PostalCode>
    <CountryCode>sample string 6</CountryCode>
  </EffectiveAddress>
</AddressValidationResponse>