How do I look up an address?
An address lookup is initiated by supplying a URL of the form.
https://cloud.hopewiser.com/autoc/output/maf?parameters
where:
- output indicates the required output format – currently this must be json
- maf is the identity of the Master Address File to which the lookup is applied
- parameters is a set of request parameters
Only a single request parameter is required – the query string. All other parameters are optional and should only be supplied when a non-default setting is required. As is standard with URLs, each parameter must be separated by an ampersand (&) character.
The query string is denoted by a single ‘q‘ character. This is the address search criteria, which can be anything from a single character up to a full address. Please note that the search criteria must be URL encoded.
It is good practice to avoid sending multiple requests whilst the user is entering the search criteria. Delaying the request by a fraction of a second (for example 500 milliseconds) after each input character will allow for faster data entry with the request being made when the user stops typing.
Example address lookup request for “Downing Street,London”.
https://cloud.hopewiser.com/autoc/json/uk-rm-paf?q=Downing%20Street%2CLondon
This will return a pick-list of possible matches with the best predictions coming first. The client program would most likely reformat and present these to the end user as a list or tree. If the required address is not present then further input is needed to refine the list.