Skip to content

getPostOffice

function getPostOffice(code): PostOffice | null;

Defined in: post-offices.ts:48

Returns the delivery post office for a post code, from Pakistan Post’s directory of about 2,560 offices.

Unlike getCityByPostalCode, which only answers for codes in the cities pakdatakit lists, this knows every delivery office, including those in towns and villages.

Parameter Type Description
code string Post code (whitespace is ignored)

PostOffice | null

The post office, or null if the code is not in the directory

getPostOffice('48330');
// { code: '48330', office: 'Dulmial', town: 'Dulmial', district: null, province: 'Punjab' }