International Batch Cleanse
Cleanses a batch of international addresses (and can also be used for single addresses). To enable the best customer experience, the recommendation is to send batches of less than 100 records which are homogenous in terms of the location. Grouping the requests into countries enables the Verify engine to manage its resources more effectively.
Base URL
https://api.addressy.com/Cleansing/International/Batch/v1.00/
Note: we don't support API connections using HTTP - all calls should use HTTPS.
JSON
https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Note: A REST endpoint with a JSON payload is the only call style supported.
Request parameters
Each request to the web service requires a number of parameters, all of which are listed below. All requests require a key which can be generated in your account.
* = required field
Name | Description |
---|---|
Key* | The key you want to use to authenticate with the service (you can request we create one for you or create one in your account section) |
Geocode Boolean |
Whether you want geo-coordinates to be appended to your results (if available). There is an additional cost associated with enabling this option. |
Addresses* | An array of addresses that you want to verify. The country field must contain a valid ISO2 or ISO3 country code. We recommend that you use the structured fields (i.e. building/thoroughfare etc) over the address line input fields if the data you are cleansing is already structured. To enable the best customer experience, the recommendation is to send batches of less than 100 records which are homogenous in terms of the location. Grouping the requests into countries enables the Verify engine to manage its resources more effectively. The list of available input address fields are the "Primary Address Fields" listed here. |
Options Object |
Used to specify various options and override processes. Comprised of the following:
|
Response Fields
Name | Description |
---|---|
Input | A copy of the address that you input in the request "Addresses" array. |
Matches | An array of matched records including:
|
Errors
Below are the errors which are specific to this web service. If an error occurs, an error table like the one below will be returned. To check for an error response, test for a 4 column table with columns "Number", "Description", "Cause" and "Resolution" containing a single row.
For a list of errors applicable to all APIs, have a look at the list of common errors.
Number | Description | Cause | Resolution |
---|---|---|---|
1000 | Invalid JSON object | The JSON object in the POST body was invalid. | Try again sending a valid JSON request object in the POST body. |
1001 | No address supplied | No addresses supplied. | Ensure you send at least one address in the request for cleansing. |
1002 | Batch processing failed | Error cleansing your records. | There was a server error whilst processing your batch. Please try again shortly. |
1003 | Batch processing timeout | Your batch took too long to process and timed out. | Please reduce the batch size or increase the quality of the input in order to ensure your requests don't time out. |
1004 | Too many addresses supplied | Address input limit reached. | Please limit input length to 100 records or less. |
Examples
Below are a selection of requests and responses to the API.
Example Verify and Geocode Request
POST https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Content-Type: application/json
{
"Key": “AA11-AA11-AA11-AA11",
"Geocode":true,
"Addresses": [
{
"Address":"",
"Address1":"Sageweg 27",
"Address2":"Neuenburg",
"Address3":"",
"Address4":"",
"Address5":"",
"Address6":"",
"Address7":"",
"Address8":"",
"Country":"DEU",
"SuperAdministrativeArea":"",
"AdministrativeArea":"",
"SubAdministrativeArea":"",
"Locality":"",
"DependentLocality":"",
"DoubleDependentLocality":"",
"Thoroughfare":"",
"DependentThoroughfare":"",
"Building":"",
"Premise":"",
"SubBuilding":"",
"PostalCode":"79395",
"Organization":"",
"PostBox":""
},
{
"Address":"",
"Address1":"Schubartstr. 111",
"Address2":"Bietigheim-Bissingen",
"Address3":"74321",
"Address4":"",
"Address5":"",
"Address6":"",
"Address7":"",
"Address8":"",
"Country":"DEU",
"SuperAdministrativeArea":"",
"AdministrativeArea":"",
"SubAdministrativeArea":"",
"Locality":"",
"DependentLocality":"",
"DoubleDependentLocality":"",
"Thoroughfare":"",
"DependentThoroughfare":"",
"Building":"",
"Premise":"",
"SubBuilding":"",
"PostalCode":"",
"Organization":"",
"PostBox":""
}
]
}
Example Response
[
{
"Input": {
"Address": "",
"Address1": "Sageweg 27",
"Address2": "Neuenburg",
"Address3": "",
"Address4": "",
"Address5": "",
"Address6": "",
"Address7": "",
"Address8": "",
"Country": "DEU",
"SuperAdministrativeArea": "",
"AdministrativeArea": "",
"SubAdministrativeArea": "",
"Locality": "",
"DependentLocality": "",
"DoubleDependentLocality": "",
"Thoroughfare": "",
"DependentThoroughfare": "",
"Building": "",
"Premise": "",
"SubBuilding": "",
"PostalCode": "79395",
"Organization": "",
"PostBox": ""
},
"Matches": [
{
"AQI": "A",
"AVC": "V44-I44-P6-100",
"Address": "Sägeweg 27,79395 Neuenburg Am Rhein",
"Address1": "Sägeweg 27",
"Address2": "79395 Neuenburg Am Rhein",
"AdministrativeArea": "Baden-Württemberg",
"CountryName": "Germany",
"DeliveryAddress": "Sägeweg 27",
"DeliveryAddress1": "Sägeweg 27",
"GeoAccuracy": "P4",
"GeoDistance": "0.0",
"HyphenClass": "C",
"ISO3166-2": "DE",
"Country": "DE",
"ISO3166-3": "DEU",
"ISO3166-N": "276",
"Latitude": "47.807820",
"Locality": "Neuenburg Am Rhein",
"Longitude": "7.569160",
"MatchRuleLabel": "Rlfnp",
"PostalCode": "79395",
"PostalCodePrimary": "79395",
"Premise": "27",
"PremiseNumber": "27",
"SubAdministrativeArea": "Reg.-Bez. Freiburg",
"Thoroughfare": "Sägeweg"
}
]
},
{
"Input": {
"Address": "",
"Address1": "Schubartstr. 111",
"Address2": "Bietigheim-Bissingen",
"Address3": "74321",
"Address4": "",
"Address5": "",
"Address6": "",
"Address7": "",
"Address8": "",
"Country": "DEU",
"SuperAdministrativeArea": "",
"AdministrativeArea": "",
"SubAdministrativeArea": "",
"Locality": "",
"DependentLocality": "",
"DoubleDependentLocality": "",
"Thoroughfare": "",
"DependentThoroughfare": "",
"Building": "",
"Premise": "",
"SubBuilding": "",
"PostalCode": "",
"Organization": "",
"PostBox": ""
},
"Matches": [
{
"AQI": "A",
"AVC": "V44-I44-P6-100",
"Address": "Schubartstr. 111,74321 Bietigheim-Bissingen",
"Address1": "Schubartstr. 111",
"Address2": "74321 Bietigheim-Bissingen",
"AdministrativeArea": "Baden-Württemberg",
"CountryName": "Germany",
"DeliveryAddress": "Schubartstr. 111",
"DeliveryAddress1": "Schubartstr. 111",
"DependentLocality": "Bissingen",
"GeoAccuracy": "P4",
"GeoDistance": "0.0",
"HyphenClass": "C",
"ISO3166-2": "DE",
"Country": "DE",
"ISO3166-3": "DEU",
"ISO3166-N": "276",
"Latitude": "48.942220",
"Locality": "Bietigheim-Bissingen",
"Longitude": "9.106600",
"MatchRuleLabel": "Rlfnp",
"PostalCode": "74321",
"PostalCodePrimary": "74321",
"Premise": "111",
"PremiseNumber": "111",
"SubAdministrativeArea": "Reg.-Bez. Stuttgart",
"Thoroughfare": "Schubartstr."
}
]
}
]
Example ReverseGeocode Request
POST https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Content-Type: application/json
{
"Key": "AA11-AA11-AA11-AA11",
"Options": {
"Process": "ReverseGeocode",
"ServerOptions": {
"MaxResults": 2
}
},
"Addresses": [
{
"Latitude": "37.491400",
"Longitude": "-122.228800",
"Country": "US"
},
{
"Latitude": "43.713384",
"Longitude": "-79.398706",
"Country": "CA"
}
]
}
Example ReverseGeocode Response
[
{
"Input": {
"Latitude": "37.491400",
"Longitude": "-122.228800",
"Country": "US"
},
"Matches": [
{
"Address": "805 Veterans Blvd,Redwood City Ca 94063",
"Address1": "805 Veterans Blvd",
"Address2": "Redwood City Ca 94063",
"AdministrativeArea": "Ca",
"CountryName": "United States",
"DeliveryAddress": "805 Veterans Blvd",
"DeliveryAddress1": "805 Veterans Blvd",
"GeoDistance": "0.000000",
"ISO3166-2": "US",
"Country": "US",
"ISO3166-3": "USA",
"ISO3166-N": "840",
"Latitude": "37.491400",
"Locality": "Redwood City",
"Longitude": "-122.228800",
"PostalCode": "94063",
"PostalCodePrimary": "94063",
"Premise": "805",
"PremiseNumber": "805",
"PremiseNumberRangeField": "805",
"SubAdministrativeArea": "San Mateo",
"Thoroughfare": "Veterans Blvd"
},
{
"Address": "409 Brewster Ave,Redwood City Ca 94063",
"Address1": "409 Brewster Ave",
"Address2": "Redwood City Ca 94063",
"AdministrativeArea": "Ca",
"CountryName": "United States",
"DeliveryAddress": "409 Brewster Ave",
"DeliveryAddress1": "409 Brewster Ave",
"GeoDistance": "40.314589",
"ISO3166-2": "US",
"Country": "US",
"ISO3166-3": "USA",
"ISO3166-N": "840",
"Latitude": "37.491750",
"Locality": "Redwood City",
"Longitude": "-122.229490",
"PostalCode": "94063",
"PostalCodePrimary": "94063",
"Premise": "409",
"PremiseNumber": "409",
"PremiseNumberRangeField": "409",
"SubAdministrativeArea": "San Mateo",
"Thoroughfare": "Brewster Ave"
}
]
},
{
"Input": {
"Latitude": "43.713384",
"Longitude": "-79.398706",
"Country": "CA"
},
"Matches": [
{
"Address": "11 Sherwood Ave,Toronto On M4P 2A6",
"Address1": "11 Sherwood Ave",
"Address2": "Toronto On M4P 2A6",
"AdministrativeArea": "On",
"CountryName": "Canada",
"DeliveryAddress": "11 Sherwood Ave",
"DeliveryAddress1": "11 Sherwood Ave",
"GeoDistance": "12.817361",
"ISO3166-2": "CA",
"Country": "CA",
"ISO3166-3": "CAN",
"ISO3166-N": "124",
"Latitude": "43.713360",
"Locality": "Toronto",
"Longitude": "-79.398830",
"PostalCode": "M4P 2A6",
"PostalCodePrimary": "M4P 2A6",
"Premise": "11",
"PremiseNumber": "11",
"PremiseNumberRangeField": "11",
"SubAdministrativeArea": "Toronto",
"Thoroughfare": "Sherwood Ave"
},
{
"Address": "15 Sherwood Ave,Toronto On M4P 2A6",
"Address1": "15 Sherwood Ave",
"Address2": "Toronto On M4P 2A6",
"AdministrativeArea": "On",
"CountryName": "Canada",
"DeliveryAddress": "15 Sherwood Ave",
"DeliveryAddress1": "15 Sherwood Ave",
"GeoDistance": "17.655316",
"ISO3166-2": "CA",
"Country": "CA",
"ISO3166-3": "CAN",
"ISO3166-N": "124",
"Latitude": "43.713420",
"Locality": "Toronto",
"Longitude": "-79.398540",
"PostalCode": "M4P 2A6",
"PostalCodePrimary": "M4P 2A6",
"Premise": "15",
"PremiseNumber": "15",
"PremiseNumberRangeField": "15",
"SubAdministrativeArea": "Toronto",
"Thoroughfare": "Sherwood Ave"
}
]
}
]
Example Multi-Country Certify Request
POST https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Content-Type: application/json
{
"Key": "AA11-AA11-AA11-AA11",
"Options": {
"Certify": true
},
"Addresses": [
{
"Address1": "805 Veterans Street",
"Address2": "#305",
"Locality": "redwoodcity",
"AdministrativeArea": "california",
"PostalCode": "",
"Country": "USA"
},
{
"Address1": "8 Charlotte St #8, Toronto, Ontario M5V 0K4",
"Country": "Canada"
},
{
"Address1": "6/19 Brittain Crescent Hillsdale NSW 2036 AUS",
"Country": "Australia"
}
]
}
Example Multi-Country Certify Response
[
{
"Input": {
"Address1": "805 VETERANS STREET",
"Address2": "#305",
"Locality": "REDWOODCITY",
"AdministrativeArea": "CALIFORNIA",
"PostalCode": "",
"Country": "USA"
},
"Matches": [
{
"AQI": "D",
"AVC": "V55-I55-P3-083",
"Address": "805 VETERANS BLVD STE 305,REDWOOD CITY CA 94063-1737",
"Address1": "805 VETERANS BLVD STE 305",
"Address2": "REDWOOD CITY CA 94063-1737",
"AdministrativeArea": "CA",
"AutoZoneIndicator": "D",
"BusinessIndicator": " ",
"CMRAIndicator": "N",
"CarrierRoute": "C018",
"CentralizedIndicator": "",
"CheckDigit": "2",
"CongressionalDistrict": "15",
"CountryName": "UNITED STATES",
"CurbIndicator": "",
"DPVConfirmedIndicator": "Y",
"DPVFootnotes": "AABB",
"DPVLACSIndicator": " ",
"DefaultFlag": " ",
"DeliveryAddress": "805 VETERANS BLVD STE 305",
"DeliveryAddress1": "805 VETERANS BLVD STE 305",
"DeliveryPointBarCode": "802",
"DependentLocality": "",
"DropCount": "",
"DropSiteIndicator": " ",
"EducationalIndicator": " ",
"FIPSCountyCode": "081",
"FalsePositiveIndicator": " ",
"Finance": "056378",
"Footnotes": "B#L#",
"ISO3166-2": "US",
"Country": "US",
"ISO3166-3": "USA",
"ISO3166-N": "840",
"LACSLinkCode": "",
"LACSLinkIndicator": " ",
"Locality": "REDWOOD CITY",
"NDCBUIndicator": "",
"NoStatIndicator": "N",
"Organization": "",
"OtherIndicator": "",
"PMBNumber": "",
"PMBType": "",
"PostBoxNumber": "",
"PostBoxType": "",
"PostalCode": "94063-1737",
"PostalCodePrimary": "94063",
"PostalCodeSecondary": "1737",
"PostalCodeSecondaryRangeHigh": "1737",
"PostalCodeSecondaryRangeLow": "1737",
"Premise": "805",
"PremiseNumber": "805",
"PrimaryAddressLine": "805 VETERANS BLVD STE 305",
"PrimaryNumRangeCode": "O",
"PrimaryNumRangeHigh": "0000000805",
"PrimaryNumRangeLow": "0000000805",
"RecordType": "H",
"ResidentialDelivery": "N",
"ReturnCode": "31",
"SUITELinkFootnote": "",
"SeasonalIndicator": " ",
"SecondaryAddressLine": "REDWOOD CITY CA 94063-1737",
"SecondaryNumRangeCode": "B",
"SecondaryNumRangeHigh": "00000322",
"SecondaryNumRangeLow": "00000228",
"SubAdministrativeArea": "SAN MATEO",
"SubBuilding": "STE 305",
"SubBuildingLeadingType": "STE",
"SubBuildingNumber": "305",
"Thoroughfare": "VETERANS BLVD",
"ThoroughfareName": "VETERANS",
"ThoroughfarePostDirection": "",
"ThoroughfarePreDirection": "",
"ThoroughfareTrailingType": "BLVD",
"ThrowbackIndicator": "N",
"VacantIndicator": "N",
"eLOTCode": "",
"eLOTNumber": ""
}
]
},
{
"Input": {
"Address1": "8 CHARLOTTE ST #8, TORONTO, ONTARIO M5V 0K4",
"Country": "CANADA"
},
"Matches": [
{
"AQI": "C",
"AVC": "V55-I55-P6-091",
"AddInfo": "",
"Address": "8-8 CHARLOTTE ST,TORONTO ON M5V 0K4",
"Address1": "8-8 CHARLOTTE ST",
"Address2": "TORONTO ON M5V 0K4",
"AdministrativeArea": "ON",
"CountryName": "CANADA",
"DeliveryAddress": "8-8 CHARLOTTE ST",
"DeliveryAddress1": "8-8 CHARLOTTE ST",
"EndExpiryDate": "2023-03-16",
"ISO3166-2": "CA",
"Country": "CA",
"ISO3166-3": "CAN",
"ISO3166-N": "124",
"Locality": "TORONTO",
"PostalCode": "M5V 0K4",
"PostalCodePrimary": "M5V 0K4",
"Premise": "8",
"PremiseNumber": "8",
"Result": "VALID",
"SerpStatusEx": "V",
"StartExpiryDate": "2023-02-17",
"SubBuilding": "8",
"SubBuildingNumber": "8",
"SubBuildingType": "-",
"Thoroughfare": "CHARLOTTE ST",
"ThoroughfareName": "CHARLOTTE",
"ThoroughfareTrailingType": "ST",
"ThoroughfareType": "ST"
}
]
},
{
"Input": {
"Address1": "6/19 BRITTAIN CRESCENT HILLSDALE NSW 2036 AUS",
"Country": "AUSTRALIA"
},
"Matches": [
{
"AQI": "A",
"AVC": "V55-I55-P6-100",
"Address": "6,19 BRITTAIN CRES,HILLSDALE NSW 2036",
"Address1": "6",
"Address2": "19 BRITTAIN CRES",
"Address3": "HILLSDALE NSW 2036",
"AdministrativeArea": "NSW",
"Barcode": "1301012202101110210212322302233112213",
"Building": "",
"CountryName": "AUSTRALIA",
"DPID": "82343725",
"DeliveryAddress": "6,19 BRITTAIN CRES",
"DeliveryAddress1": "6",
"DeliveryAddress2": "19 BRITTAIN CRES",
"ErrorCode": "4",
"FloorNumber": "",
"FloorType": "",
"ISO3166-2": "AU",
"Country": "AU",
"ISO3166-3": "AUS",
"ISO3166-N": "036",
"Locality": "HILLSDALE",
"LotNumber": "",
"PostalCode": "2036",
"PreSortZone": "10",
"Premise": "19",
"PrimaryAddressLine": "U 6 19 BRITTAIN CRES",
"PrimaryPremise": "19",
"PrimaryPremiseSuffix": "",
"PrintPostZone": "10",
"SecondaryAddressLine": "",
"SecondaryPremise": "",
"SecondaryPremiseSuffix": "",
"SubBuilding": "6",
"SubBuildingFloor": "",
"SubBuildingLeadingType": "U",
"SubBuildingNumber": "6",
"Thoroughfare": "BRITTAIN CRES",
"ThoroughfareName": "BRITTAIN",
"ThoroughfarePostDirection": "",
"ThoroughfareTrailingType": "CRES"
}
]
}
]
Example Enhance (for a US address) request
POST https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Content-Type: application/json
{
"Key": "AA11-AA11-AA11-AA11",
"Options": {
"Enhance": true
},
"Addresses": [
{
"Address1": "805 Veterans Street RedwoodCity california USA ",
"Address2": "",
"Country": "",
"Locality": "",
"PostalCode": ""
}
]
}
Example Enhance (for a US address) response
[
{
"Input": {
"Address1": "805 Veterans Street RedwoodCity california USA ",
"Address2": "",
"Country": "",
"Locality": "",
"PostalCode": ""
},
"Matches": [
{
"AQI": "C",
"AVC": "V42-I44-P3-092",
"Address": "805 Veterans Blvd,Redwood City CA 94063-1734",
"Address1": "805 Veterans Blvd",
"Address2": "Redwood City CA 94063-1734",
"AdministrativeArea": "CA",
"AdministrativeAreaISO2": "US-CA",
"CBSAMetropolitanStatisticalArea": "San Francisco-Oakland-Berkeley, Ca=41860",
"CensusClassCode": "C1",
"CensusCode": "60102",
"CensusIndicator": "Locality",
"CountryName": "United States",
"DeliveryAddress": "805 Veterans Blvd",
"DeliveryAddress1": "805 Veterans Blvd",
"GNISFeatureID": "2410919",
"HyphenClass": "C",
"ISO3166-2": "US",
"Country": "US",
"ISO3166-3": "USA",
"ISO3166-N": "840",
"Locality": "Redwood City",
"MatchRuleLabel": "C2 d1 d1 d1",
"MetropolitanDivision": "San Francisco-San Mateo-Redwood City, Ca=41884",
"PostalCode": "94063-1734",
"PostalCodePrimary": "94063",
"PostalCodeSecondary": "1734",
"Premise": "805",
"PremiseNumber": "805",
"SubAdministrativeArea": "San Mateo",
"Thoroughfare": "Veterans Blvd",
"ThoroughfareName": "Veterans",
"ThoroughfareTrailingType": "St",
"ThoroughfareType": "St",
"TimeZone_DST": "-07:00",
"TimeZone_Name": "Pacific Standard Time",
"TimeZone_UTC": "-08:00"
}
]
}
]
Example Verify, Geocode, and Transliteration Request (output Japanese address in Latin)
POST https://api.addressy.com/Cleansing/International/Batch/v1.00/json4.ws
Content-Type: application/json
{
"Key": "AA11-AA11-AA11-AA11",
"Geocode": true,
"Options": {
"Process": "Verify",
"ServerOptions": {
"OutputScript": "Latn"
}
},
"Addresses": [
{
"Address": "つきみ野 618 大和市 神奈川県 242-0002 JPN"
}
]
}
Example Verify, Geocode, and Transliteration Response (output Japanese address in Latin)
[
{
"Input": {
"Address": "つきみ野 618 大和市 神奈川県 242-0002 JPN"
},
"Matches": [
{
"AQI": "A",
"AVC": "V44-I44-P6-100",
"Address": "6-1-8 Tsukimino,Yamato-Shi Kanagawa 242-0002",
"Address1": "6-1-8 Tsukimino",
"Address2": "Yamato-Shi Kanagawa 242-0002",
"AdministrativeArea": "Kanagawa",
"CountryName": "Japan",
"DeliveryAddress": "6-1-8 Tsukimino",
"DeliveryAddress1": "6-1-8 Tsukimino",
"GeoAccuracy": "P4",
"GeoDistance": "0.0",
"HyphenClass": "C",
"ISO3166-2": "JP",
"Country": "JP",
"ISO3166-3": "JPN",
"ISO3166-N": "392",
"Latitude": "35.512035",
"Locality": "Yamato-Shi",
"LocalityName": "Taiwashi",
"LocalityTrailingType": "Shi",
"LocalityType": "Shi",
"Longitude": "139.453619",
"MatchRuleLabel": "V1a",
"PostalCode": "242-0002",
"PostalCodePrimary": "242-0002",
"Premise": "6-1-8",
"PremiseNumber": "6-1-8",
"Thoroughfare": "Tsukimino",
"ThoroughfareName": "Tukimi",
"ThoroughfareTrailingType": "Ya",
"ThoroughfareType": "Ya"
}
]
}
]