# parseElectricityRef

Source: https://pakdatakit.dev/api/typescript/bills/functions/parseelectricityref/

```ts
function parseElectricityRef(input): 
  | ElectricityRef
  | null;
```

Defined in: [bills.ts:52](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/bills.ts#L52)

Parses a Pakistani electricity bill identifier: a DISCO reference number,
a DISCO customer ID or a K-Electric account number.

Formats are those the utilities' own bill pages ask for (retrieved
2026-11-18; see DATA.md): PITC's bill pages take a 14-digit reference
number with a separate U/R choice, or a 10-digit customer ID (11 digits
for LESCO); K-Electric asks for a "13 digits KE Account Number starting
from 04000". No check digit is published, so only the format is checked.

Spaces, dashes and dots are ignored, and Urdu digits are accepted.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `input` | `string` |

## Returns

  \| [`ElectricityRef`](https://pakdatakit.dev/api/typescript/bills/interfaces/electricityref/)
  \| `null`

The identifier, or `null` if it matches none of the formats.
  Never throws.
