> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postcode.gov.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Postcode format

> How the 5 segments map to administrative areas.

A postcode is **12 characters across 5 segments**, template `AA-99-H77-BB-55`
(displayed with spaces: `AA 99 H77 BB 55`).

| Segment | Example | Meaning                           | Format                  |
| ------- | ------- | --------------------------------- | ----------------------- |
| `AA`    | `EK`    | **State**                         | 2 alpha                 |
| `99`    | `01`    | **LGA** within the state          | 2 numeric (zero-filled) |
| `H77`   | `A03`   | **District** within the LGA       | 3 alphanumeric          |
| `BB`    | `FK`    | **Area** within the district      | 2 alpha                 |
| `55`    | `01`    | **Building unit** within the area | 2 numeric (zero-filled) |

So `EK-01-A03-FK-01` = building `01`, in area `FK`, district `A03`, LGA `01` (Ado-Ekiti),
state `EK` (Ekiti).

## Rules

* Numeric segments are zero-filled (`1` → `01`) and range `01–99` (never `00`).
* The three styles are interchangeable on input — the API is tolerant of spaces, hyphens and case:
  `EK-01-A03-FK-01`, `EK 01 A03 FK 01`, `ek01a03fk01`.

## Assemble & disassemble

Use the Assembly endpoints to build or parse codes programmatically:

```bash theme={null}
# Assemble (zero-fills + formats)
curl -X POST "https://api.postcode.gov.ng/v1/assembly/assemble" \
  -d '{"state":"ek","lga":"1","district":"a03","area":"fk","unit":"1"}'
# → { "data": { "postcode": "EK-01-A03-FK-01", "display": "EK 01 A03 FK 01", "compact": "EK01A03FK01" } }

# Disassemble
curl "https://api.postcode.gov.ng/v1/assembly/disassemble?code=EK01A03FK01"
```
