You will first need to authenticate the session to create a token using the createtoken endpoint. To call this endpoint, you will need to pass a valid API key.
See the Create Token documentation for full details.
When the end user is typing, each keystroke is passed to the autocomplete endpoint. This endpoint has 2 requirements, the token from step 1 and the address the user has typed in.
See the Autocomplete documentation for full details.
Each autocomplete call will return an array options and each would contain a link object. The link object contains two important attributes:
- title - The address text to be displayed to the end user
- href - The hyperlink to follow if this option is chosen
You will need to show the link.title attribute for each element of the options array to the end-user. Once you have displayed the available options, the end-user will need to select one.
Each option returned has a href attribute which will invoke another endpoint.
There are two endpoints that this attribute can call to:
- Lookup Endpoint - This will return the fully captured address
- Drilldown Endpoint - This will return further options
When the attribute invokes the drilldown endpoint, there are still options to display. These options should continue to be displayed until the end-user selects a full address and then the attribute will call the lookup endpoint.
See the Drilldown documentation for full details.