Open Nav

Integration Configuration

Standard configuration settings for our address validation integrations

Updated 25 Jun 2020

You can configure many of our integrations with the settings listed in this guide.

Initialise and configure your integration by adding idpcConfig to the window object on your page. This will look something like:

  <script>
  window.idpcConfig = {
    // Your configuration settings go here
  };
  </script>

Not all the configuration settings listed below will be applicable to your integration. Check your integration defaults (listed in the integration's guide) to see if a specific setting is usable.

Required Settings

Authentication

apiKey

A string of characters. Typically begins with ak_

The API Key is required to verify your account for address validation. View your API Keys from your account dashboard.

See our API Key guide to find out more.

Example:

window.idpcConfig = {
    apiKey: "ak_ksqa49sjSdAEDq9I88"
};

Optional Settings

You can update the following settings. They will have sensible defaults and may be left alone for most use cases.

Autocomplete Configuration

Configure how address autocomplete integration works on your address forms.

autocomplete

Boolean. Can be true or false.

Setting this to true will enable autocomplete integration on your address forms.

See our Address Finder Demo to try it out.

Example:

window.idpcConfig = {
    autocomplete: true
};

autocompleteOverride

Advanced. Override the autocompletion plugin configuration.

Pass in a valid configuration object to override specific autocomplete configuration attributes.

Example:

window.idpcConfig = {
    autocompleteOverride: {
        licensee: "sl_jsmm339Sd"
    }
};

Postcode Lookup Configuration

Configure how postcode lookup works on your address forms.

postcodeLookup

Boolean. Can be true or false.

Setting this to true will enable postcode lookup integration on your address forms.

See our Postcode Finder Demo to try it out.

Example:

window.idpcConfig = {
    postcodeLookup: true
};

postcodeLookupOverride

Advanced. Override the postcode lookup plugin configuration.

Pass in a valid configuration object to override specific postcode lookup configuration settings.

Example:

window.idpcConfig = {
    postcodeLookupOverride: {
        licensee: "sl_jsmm339Sd"
    }
};

Data Configuration

Configure how data is populated

populateOrganisation

Boolean. Can be true or false.

Addresses with an organisation will overwrite the value of the company name field.

window.idpcConfig = {
    populateOrganisation: true
};

populateCounty

Boolean. Can be true or false.

Populate the county field of an address. County data is optional for premise identification.

We recommend avoiding using county data altogether. Find out more from our UK county data guide.

window.idpcConfig = {
    populateCounty: true
};

Frequently Asked Questions

I have added idpcConfig but the integration does not load

Check the following:

The integration plugin is also included on your page. Located on your page, the plugin script should be requested.

For example, something like the following should be present:

    <script async src="https://cdn.jsdelivr.net/npm/@ideal-postcodes/integration-name@Y.Y.Y"></script>

idpcConfig is defined before the plugin loads. This can be achieved by:

  • Including the configuration script tag before the plugin script tag
  • Loading your plugin script tag asynchronously. So you script tag should include async: <script async src="https://...."></script>