Workflow

Autocomplete can be used to simplify the entry of addresses by making it easier and faster to enter an address and to avoid incorrect entries by making suitable suggestions. The following diagram is a workflow of how autocomplete should be used. Further technical details can be found on pages Structured Autocompletion and Single-Line Autocompletion

Autocomplete Workflow
Figure 1. Autocomplete Workflow
Step Description

Start session

Before entering an address you have to start a new autocomplete session.

Use autocomplete service

After an autocomplete session is created, the autocomplete service can be used. As many autocomplete requests as desired can be requested within a session. Therefore it’s possible to send an autocomplete request for each keystroke while entering an address. The suggestion list is improved with each keystroke until finally the desired address is suggested. The second and more important reason is that the house number is also checked during validation and this check can also affect the result again.

Select address

At the end, the user only has to select the suggested address.

Validate address

This step is not mandatory, but it is strongly recommended for two reasons:
The first reason is that the JavaScript execution environment inside the browser is not tamper-proof (or the form may even have been completed by a bot).
The second and more important reason is that the house number can only be checked during address validation and this check can also affect the result.
Please include the session token in the authorization header to make sure the validate request isn’t billed separately.