resolve_address

Resolve Address

Returns the complete address for an autocomplete suggestion, identified by its address ID.

This is the step of the autocomplete flow that costs a lookup. Fetching suggestions is free.

The API returns resolved addresses, including addresses outside the UK, in a UK format (up to 3 address lines) using UK nomenclature such as postcode and county.

An ID that matches no address returns 404.

Endpoint​

GET /autocomplete/addresses/{address}/gbr

See the API reference for this endpoint.

Import​

from ideal_postcodes import IdealPostcodes

Call resolve_address on the IdealPostcodes client. Path parameters are positional; query and body parameters are keyword-only.

Path Parameters​

NameTypeRequiredDescription
addressstryesID of address suggestion ID of address suggestion provided by the API to fully resolve.

Query Parameters​

NameTypeRequiredDescription
tagsstrnoTags A comma separated list of tags to query over. Useful if you want to specify the circumstances in which the request was made. If you specify multiple tags, the response comprises only requests that satisfy all of them. Searching "foo,bar" queries only requests tagged both "foo" and "bar".
remove_organisationLiteral['true'] | strnoRemove Organisation Removes organisation and department names from the address lines (line_1, line_2, ...). Remaining lines move up. Useful when delivering to people rather than businesses. Set remove_organisation=true to enable. organisation_name, department_name and the native record are unchanged. If removing the organisation and department would leave no address lines (e.g. Asda PLC, London, SW1A 1AA), they are kept and the lines are returned unchanged. Building and farm names (e.g. hofname, adressetilleggsnavn, bdg_name) are not removed.

Response Type​

from ideal_postcodes.types import ResolveAddressResult

Errors​

Unsuccessful HTTP responses raise APIError or a subclass, with the HTTP status and the API error code and message. Connection failures and timeouts raise TransportError. Unexpected responses raise ProtocolError. All derive from ClientError. A result that does not match the spec is returned unvalidated with a ResponseValidationWarning. See error handling.

Example​

resolve_address.pypython
from ideal_postcodes import IdealPostcodes

with IdealPostcodes("ak_test") as client:
    address = client.resolve_address("paf_2670849")