WRDAddressVerificationBase::CheckAddress (open)
Check the validity of an address
Syntax
LOADLIB "mod::wrd/lib/address.whlib";
RECORD FUNCTION CheckAddress(RECORD addressdata, RECORD options)Parameters
RECORD addressdataThe address to check
STRING cityCity
STRING countryTwo-letter country code
STRING nr_detailHouse number and addition
STRING streetStreet name
STRING zipZIP or postal code
RECORD optionsOptions
BOOLEAN alwaysverifyAlways verify the address, even if it appears complete (potentially costs extra API calls)
Return value
RECORDThe validation result
RECORD dataThe (normalized) input data
RECORD looked_upThe result of the address lookup, contains the complete address if the status is "incomplete"
STRING statusLookup Status
- "ok" (the address is valid or addresses for this country cannot be checked)
- "not_enough_data" (NL: not enough data to do an address lookup)
- "invalid_city" city is not correct (eg a number)
- "invalid_zip" (NL: the supplied zip is invalid)
- "invalid_nr_detail" (NL: the nr_detail is invalid)
- "different_citystreet" (NL: given city and street are different from the city and street that are found for the given zip and nr_detail)
- "incomplete" (NL: the input data was incomplete - the looked_up field contains the missing fields)
- "zip_not_found" (NL: there is no address with the given zip and nr_detail)
- "address_not_found" (NL: there is no address with the given street nr_detail and city),
- "lookup_failed" (there was an error looking up data - maybe the service is not configured correctly or was unavailable)
- "not_supported" (the operation is not supported for this service)