Postcode Lookup Services Implementation
This article details the parameters available when using the getAddressByPostcode and getAddressById AJAX requests for the Postcode Anywhere service.
Example Implementation
A simple example implementation can be viewed by logging into Aurora and navigating to the following page: www.yourdomain.com/**aurora/orders/postcode**.
Ajax Requests
There are two possible AJAX requests: getAddressByPostcode and getAddressById.
getAddressByPostcode
Find addresses matching a search term.
Parameter | Example | Required | Explanation |
---|---|---|---|
postcode | E3 4WE | Y | The search term to find. If the LastId is provided, the SearchTerm searches within the results from the LastId. |
search_for | PostalCodes | Y | Filters the search results. |
country | GBR | N | The name or ISO 2 or 3 character code for the country to search in. Most country names will be recognised, but the use of the ISO country code is recommended for clarity. |
language | en | N | The 2 or 4 character language preference identifier e.g. (en, en-gb, en-us etc). |
max_suggestions | 10 | N | The maximum number of autocomplete suggestions to return. |
max_results | 10 | N | The maximum number of results to return. (Only for use with Capture Plus) |
last_id | 1 | N | The ID from a previous Find or FindByPosition. |
getAddressById
Returns the full address based on the Id.
Parameter | Example | Required | Explanation |
---|---|---|---|
id | GBR|52509478 | Y | The ID from a Find method to retrieve the detailed address for. |
Updated about 2 years ago