Skip to main content

Address Validation

This API is used to validate address details to ensure they are formatted corractly. Validation is based on the country and whether you are sending internationally.

Example

Json / XML

// Address Validation Example
{
    "address": {
        "validate": {
            "name": "John Smith",
            "company": "ParcelBroker",
            "email": "test@test.com",
            "phone": "01234567890",
            "line1": "14 Augustus mews",
            "line2": "",
            "line3": "",
            "town": "Braintree",
            "county": "",
            "postcode": "CM71GZ",
            "countrycode": "GB",
            "international": 1
        }
    }
}
// Address Validation Example
<address>
    <validate>
        <name>John Smith</name>
        <company>ParcelBroker</company>
        <phone>01234567890</phone>
        <email>test@test.com</email>
        <line1>14 Augustus mews</line1>
        <line2 />
        <line3 />
        <town>Braintree</town>
        <county />
        <postcode>CM71GZ</postcode>
        <countrycode>GB</countrycode>
        <international>1</international>
    </validate>
</address>
Element Required Description
address Yes Root element
validate Yes Shipment details
name Yes Contact name
company No Company name
email No* Contact email
This element may be required based on other address and international factors
phone Yes Contact phone number
line1 Yes Address line 1
line2 No Address line 2
line3 No Address line 3
town Yes Town
county No* County
Some countries do not use postcodes so must have a county provided instead
postcode Yes* Postcode
Some countries do not use postcodes
countrycode Yes Country code
international No Address requirements for sending internationally can be different, send this flag if the destination country is not the same as the collection country

Example Response

// Address Validation Response Example
{
  "header": {
    "status": "success"
  },
  "valid": true
}
// Address Validation Response Example
<response>
    <header>
        <status>Success</status>
    </header>
    <valid>true</valid>
</response>
Element Description
response Root element
header Header element
status Response status. Can be success or error
valid Successful validation of the supplied address