If you are unsure what datasets you can use or which datasets can be combined in a single request, you can use our GET /datasets endpoint to find out.
Check your datasets
- Go to our API specification page and click the GET /address/datasets/v1, so that it expands.
- Click Try it out in the upper-right corner.
- In the Parameter section:
- Enter your token in the Auth-Token field.
- (Optional) Enter a 3-letter country ISO code code, if you are interested in only datasets for one country.
- Click Execute to send the request to the API.
- View the response returned by the API under Responses. This will tell you what datasets you have under your license key, as well as what datasets work together.
Response status codes
Note that your request was successful only if the API returned an HTTP status code of 200 - Success. Check out the possible Response status codes to find out more about scenarios where the API returns errors.
An address can be submitted as one or as many fields; the prompt_set
property defines which address elements can be entered in each field, for example a field might be constrained so that it only accepts postcodes. The prompt set definition depends on the search type used.
The available values are:
- OneLine - All search text to be submitted upon a single line.
- Default - The default prompt set for the engine.
- Generic - A general data-independent prompt set.
- Optimal - Requires the minimum possible amount of search text to perform a search.
- Alternate - An extended country-specific set for where the information required for an optimal search is not available.
- Alternate2 - A different alternative prompt set (USA only).
To see the prompt set definitions:
- Go to our API specification page and click the POST /address/promptset/v1, so that it expands.
- Click Try it out in the upper-right corner.
- In the Parameter section:
- Enter your token in the Auth-Token field.
- In the Request body section you can select an example request from the dropdown. You can either use it as is or update the request body with your desired values.
- Click Execute to send the request to the API.
- View the response returned by the API under Responses.
Response status codes
Note that your request was successful only if the API returned an HTTP status code of 200 - Success. Check out the possible Response status codes to find out more about scenarios where the API returns errors.
prompt set
body parameter
You need to submit the search according to the prompt set you are using. If you have not explicitly set a prompt set, the 'default' one will be used. Formatting your search in line with the defined lines in the prompt set results in a higher match rate. If the search is not formatted correctly, you might not be able to make a successful match.