> For the complete documentation index, see [llms.txt](https://docs.os.uk/os-downloads/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.os.uk/os-downloads/products/areas-and-zones-portfolio/code-point-open/code-point-open-overview/product-details.md).

# Product details

## Postcodes <a href="#bookmark4" id="bookmark4"></a>

Postcodes are stored in Code-Point Open as alphanumerical values with a maximum length of eight characters (the number of characters in a postcode can vary from six to eight). A postcode contains two parts:

* **The outcode (also called outward code)**: The first two to four characters of the postcode, constituting the postcode area and the postcode district. It is the part of the postcode that enables mail to be sent from the accepting office to the correct area for delivery.
* **The incode (also called inward code)**: The last three characters of the postcode, constituting the postcode sector and the postcode unit. It is used to sort mail at the local delivery office.

For example:

| Outcode |          | Incode |        |
| ------- | -------- | ------ | ------ |
| **NW**  | **6**    | **4**  | **DP** |
| Area    | District | Sector | Unit   |

When used in an address, the incode is always separated from the outcode by a single space. The single space counts as a character.

The following table provides a list of the valid formats of postcodes. In the first two columns, an *A* indicates an alphabetic character, while an *N* indicates a numeric character. The last column shows how many characters each example postcode contains.

<table data-full-width="true"><thead><tr><th width="202">Outcode</th><th width="209">Incode</th><th>Example postcode</th><th>Number of characters in the example postcode</th></tr></thead><tbody><tr><td>AN</td><td>NAA</td><td>M2 5BQ</td><td>6</td></tr><tr><td>ANN</td><td>NAA</td><td>M34 3AB</td><td>7</td></tr><tr><td>AAN</td><td>NAA</td><td>DN5 7XY</td><td>7</td></tr><tr><td>AANN</td><td>NAA</td><td>DN16 9AA</td><td>8</td></tr><tr><td>ANA</td><td>NAA</td><td>W1A 4WW</td><td>7</td></tr><tr><td>AANA</td><td>NAA</td><td>EC1A 1HQ</td><td>8</td></tr></tbody></table>

## Postcode position <a href="#bookmark5" id="bookmark5"></a>

Each postcode unit will be allocated a National Grid reference of a point that falls within the notional extent of the postcode unit, given as an Easting and Northing. This point is the co-ordinate of the nearest delivery point to the calculated mean position of the delivery points in the postcode unit. These coordinates are provided to a resolution of 1metre.

Where several postcode units apply to one surveyed position (for example, a block of flats or offices), there is an identical location for each. However, there may be instances where the location is imprecise or approximate, due to the manual allocation by Royal Mail of a postcode outside the recognised geographical extent of that postcode. There may also be a small number of instances where coordinates cannot be allocated.

The accuracy of each postcode unit coordinate pair is defined by the Positional Quality Indicator (PQI), which provides a quality statement for the position of that Code-Point Open record. There are seven PQI values for the positional quality. A lower positional quality indicator will be allocated to postcode units awaiting a surveyed position, or which relate to addresses that do not have a surveyed position. Full details of the PQI can be found in the product's Technical Specificatio&#x6E;*.*

## Coordinate reference system <a href="#bookmark6" id="bookmark6"></a>

The coordinates for postcodes in Great Britain (England, Wales, and Scotland) are provided in British National Grid (BNG). BNG uses the OSGB36 (EPSG 27700) geodetic datum and a single Transverse Mercator projection for the whole of Great Britain. Positions on this projection are described using Easting and Northing coordinates in units of metres. The BNG is a horizontal spatial reference system only; it does not specify a vertical (height) reference system.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.os.uk/os-downloads/products/areas-and-zones-portfolio/code-point-open/code-point-open-overview/product-details.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
