POST api/shipping/validateaddress

Performs address validation in preparation for shipping. Non-US addresses may return unpredictable results.

Request Information

URI Parameters

None.

Body Parameters

A struture describing the address to validate

AddressValidationRequest
NameDescriptionTypeAdditional information
BusinessUnitId

A number identifying the business unit to validate the address for

integer

Required

PreferredShippingMethod

Which shipping method is the address validation being performed for

ShippingMethod

Range: inclusive between 1 and 8

Address

The address to validate

DetailedAddress

Required

Request Formats

application/json, text/json

Sample:
{
  "BusinessUnitId": 1,
  "PreferredShippingMethod": 1,
  "Address": {
    "Company": "sample string 1",
    "Attention": "sample string 2",
    "IsResidential": true,
    "Country": "sample string 3",
    "AddressSource": "sample string 4",
    "Street1": "sample string 5",
    "Street2": "sample string 6",
    "City": "sample string 7",
    "Region": "sample string 8",
    "Postalcode": "sample string 9",
    "PostalZip4": "sample string 10",
    "CountryCode": "sample string 11"
  }
}

application/xml, text/xml

Sample:
<AddressValidationRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <BusinessUnitId>1</BusinessUnitId>
  <PreferredShippingMethod>Ups</PreferredShippingMethod>
  <Address>
    <Street1>sample string 5</Street1>
    <Street2>sample string 6</Street2>
    <City>sample string 7</City>
    <Region>sample string 8</Region>
    <Postalcode>sample string 9</Postalcode>
    <PostalZip4>sample string 10</PostalZip4>
    <CountryCode>sample string 11</CountryCode>
    <Company>sample string 1</Company>
    <Attention>sample string 2</Attention>
    <IsResidential>true</IsResidential>
    <Country>sample string 3</Country>
    <AddressSource>sample string 4</AddressSource>
  </Address>
</AddressValidationRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

A structure describing the results of the address validation

AddressValidationResponse
NameDescriptionTypeAdditional information
PreferredAddress

The preferred address returned from the validation system

DetailedAddress

None.

PossibleAddresses

All possible addresses returned from the validation system

Collection of DetailedAddress

None.

ValidationIssues

A string that describes what issues were encountered, causing no possible addresses to be returned.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "PreferredAddress": {
    "Company": "sample string 1",
    "Attention": "sample string 2",
    "IsResidential": true,
    "Country": "sample string 3",
    "AddressSource": "sample string 4",
    "Street1": "sample string 5",
    "Street2": "sample string 6",
    "City": "sample string 7",
    "Region": "sample string 8",
    "Postalcode": "sample string 9",
    "PostalZip4": "sample string 10",
    "CountryCode": "sample string 11"
  },
  "PossibleAddresses": [
    {
      "Company": "sample string 1",
      "Attention": "sample string 2",
      "IsResidential": true,
      "Country": "sample string 3",
      "AddressSource": "sample string 4",
      "Street1": "sample string 5",
      "Street2": "sample string 6",
      "City": "sample string 7",
      "Region": "sample string 8",
      "Postalcode": "sample string 9",
      "PostalZip4": "sample string 10",
      "CountryCode": "sample string 11"
    },
    {
      "Company": "sample string 1",
      "Attention": "sample string 2",
      "IsResidential": true,
      "Country": "sample string 3",
      "AddressSource": "sample string 4",
      "Street1": "sample string 5",
      "Street2": "sample string 6",
      "City": "sample string 7",
      "Region": "sample string 8",
      "Postalcode": "sample string 9",
      "PostalZip4": "sample string 10",
      "CountryCode": "sample string 11"
    }
  ],
  "ValidationIssues": "sample string 1"
}

application/xml, text/xml

Sample:
<AddressValidationResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <PreferredAddress>
    <Street1>sample string 5</Street1>
    <Street2>sample string 6</Street2>
    <City>sample string 7</City>
    <Region>sample string 8</Region>
    <Postalcode>sample string 9</Postalcode>
    <PostalZip4>sample string 10</PostalZip4>
    <CountryCode>sample string 11</CountryCode>
    <Company>sample string 1</Company>
    <Attention>sample string 2</Attention>
    <IsResidential>true</IsResidential>
    <Country>sample string 3</Country>
    <AddressSource>sample string 4</AddressSource>
  </PreferredAddress>
  <PossibleAddresses>
    <DetailedAddress>
      <Street1>sample string 5</Street1>
      <Street2>sample string 6</Street2>
      <City>sample string 7</City>
      <Region>sample string 8</Region>
      <Postalcode>sample string 9</Postalcode>
      <PostalZip4>sample string 10</PostalZip4>
      <CountryCode>sample string 11</CountryCode>
      <Company>sample string 1</Company>
      <Attention>sample string 2</Attention>
      <IsResidential>true</IsResidential>
      <Country>sample string 3</Country>
      <AddressSource>sample string 4</AddressSource>
    </DetailedAddress>
    <DetailedAddress>
      <Street1>sample string 5</Street1>
      <Street2>sample string 6</Street2>
      <City>sample string 7</City>
      <Region>sample string 8</Region>
      <Postalcode>sample string 9</Postalcode>
      <PostalZip4>sample string 10</PostalZip4>
      <CountryCode>sample string 11</CountryCode>
      <Company>sample string 1</Company>
      <Attention>sample string 2</Attention>
      <IsResidential>true</IsResidential>
      <Country>sample string 3</Country>
      <AddressSource>sample string 4</AddressSource>
    </DetailedAddress>
  </PossibleAddresses>
  <ValidationIssues>sample string 1</ValidationIssues>
</AddressValidationResponse>