{% load url from future %}

lookup by postcode

URL:
/postcode/[postcode]
Returns:

Information on a particular postcode, including its location in {% if country == 'GB' %}both National Grid and {% endif %} WGS84 latitude/longitude, and the areas it is contained within.

Optional query parameters:

generation, to return results from a previous generation.

Example:
{% if country == 'GB' %}

If your postcode was SW1A 1AA you would load /postcode/SW1A1AA

By default the response is in JSON, if you want a human readable page then append ‘.html’ to the url /postcode/SW1A1AA.html

{% endif %} {% if country == 'NO' %}

If your postcode was 0373 you would load /postcode/0373

By default the response is in JSON, if you want a human readable page then append ‘.html’ to the url /postcode/0373.html

{% endif %}

lookup by partial postcode

URL:
/postcode/partial/[partial postcode]
Returns:

Geographical details for the centroid of the partial postcode specified.

Example:
{% if country == 'GB' %} {% endif %} {% if country == 'NO' %} {% endif %}