Address Lookup Service
This module allows you to search for an address on everything (by using any search text, ideally postcode or the start of the address), PostalCodes, Companies, Places across all the countries that are supported by Loqate (previously known as PCA Predict)
Typical usage scenario
If you are looking for postcode lookup service solutions to find address based on any search text, flat or house number and/or postal / zip code then this module can help you to get started in just few clicks.
If you are working on any project and want to quickly integrate address lookup functionality with less or no effort which looks great to present, then this is the right module for you.
Features and limitations
You can start searching for any address across different countries within few clicks by configuring this module as described below.
Note: By default, language preference is set to 'en' when find API request object is created, if you want the results to appear in your preferred language than please update this attribute. This should be a 2 or 4-character language code e.g. (en, fr, en-gb, en-us etc).
This module support both web service (SOAP) and REST API calls to find and retrieve address.
Note: Address lookup consists of two main API requests: a Find request is used to narrow down a possible list of addresses; and a Retrieve request is used to retrieve a fully formatted address. A typical address search is made up of a series of Find requests, followed by a Retrieve based on the user selection. (Find and retrieve APIs are already developed and configured in this module)
This API will charge based on per address that is retrieved (Find address API call can be made as many times required and are not charged). If you register for first time you may get some free credit. For more details on different pricing option visit https://www.loqate.com/en-gb/pricing/ or https://www.loqate.com/en-gb/pricing/price-per-lookup/ , for any FAQs visit https://www.loqate.com/resources/support/faqs/Pricing/
2. Set constants
a. Add API key to the constant 'KEY'. (_USE ME >> Constants >> Key)
b. Update constant if required ‘CallAddressLookupAPIUsingREST’. (_USE ME >> Constants >>CallAddressLookupAPIUsingREST). By default it is set to true.
If True than REST API call will be made to Find and Retrieve address (Recommended)
If False than SOAP API call will be made to Find and Retrieve address.
3. To test the APIs, add 'IVK_CreateOrGetAddress' microflow to your project navigation (_USE ME >> Example >> IVK_CreateOrGetAddress)
4. Go to your project security to update required user roles with AddressLookupAPI module roles. (if project security is turned on)
5. You can configure entities, associations, pages and microflows according to your project requirements. If you want to use ‘address entity’ of your project instead of using from this module then make sure to create a new module called ‘AddressLookupAPICustom’ and then duplicate the required snippets, page and microflows accordingly. The example folder (_USE ME >> Example) contains all the page, snippets and microflows that are required to be duplicated and updated if you want to associate to your address entity. ‘RetrieveAddress’ entity has got more details about the retrieved address, please copy / use them in address entity according to your project requirements. (log in as Admin and see ‘Retrieved address details’ section in ‘AddressLookupOverviewSnippet’)
TIP: If you want to use your existing address entity than follow steps below;
1. Add 1-1 association from your existing ‘address’ entity to ‘AddressRequest’ entity
2. Create new module called ‘AddressLookupAPICustom’
3. Go to example folder (_USE ME >> Example) and duplicate page, snippets and microflows from this folder and move all the duplicated ones to ‘AddressLookupAPICustom’ module.
4. For all the duplicated page, snippets and microflows;
- Rename to add '_Custom' at the end of existing names.
- Update references from address entity of this module to your ‘address’ entity.
5. Make sure you select the duplicated custom microflows for all the buttons, datasource, onChange and onClick on the duplicated snippets.
6. Add Boolean attribute ‘ShowAddressInputFields’ in your existing address entity and update AddressLookupOverviewSnippet and relevant microflows accordingly.
Note: If you are UK focused business and want the end user to search specifically by postcode and/or house number then;
- While using REST API call, you can set attributes ValidatePostcode = true and Country = GB in the AddressRequest and call 'IVK_ValidateAndGetAddress_AL' microflow
- While using WEB / SOAP API call, you can set attributes SearchBy = Postalcodes, ValidatePostcode = true and Country = GB in the AddressRequest and call 'IVK_ValidateAndGetAddress_AL' microflow(to see example add 'IVK_CreateOrGetAddress' microflow to your project navigation [ _USE ME >> Example >> IVK_CreateOrGetAddress] and log in as administrator).
Please contact me for any questions or bugs related to this module.
Note: SOAP APIs are deprecated and will be removed in next release. SOAP APIs may not work as expected, it is recommended to always call loqate address lookup APIs using REST.
Frequently Asked Questions