1.2.1 • Published 4 years ago

indian-post v1.2.1

Weekly downloads
6
License
-
Repository
-
Last release
4 years ago

Postal Data Library

Postal PIN Code API allows developers to get details of Post Office by searching Postal PIN Code

Features of this library

  • Postal PIN Code API returns the response in JSON format.
  • "Status" field in response is set to SUCCESS or ERROR, "Message" field will return message against the request
  • "PostOffice" field will return data.

How to use

Let's see about js code:

let { postalData } = require('indian-post')

postalData.getPostData(400017).then(function (res) {
  console.log('Post office data', res)
})

Response For Valid PIN Codes:

{
  "Message": "Number of Post office(s) found: 2",
  "Status": "Success",
  "PostOffice": [
    {
      "Name": "Dharavi",
      "Description": "",
      "BranchType": "Sub Post Office",
      "DeliveryStatus": "Delivery",
      "Taluk": "Mumbai",
      "Circle": "Mumbai",
      "District": "Mumbai",
      "Division": "Mumbai  West",
      "Region": "Mumbai",
      "State": "Maharashtra",
      "Country": "India"
    }
  ]
}

Response For Invalid PIN Codes or Error messages:

{
   "Message":"No records found",
   "Status":"Error",
   "PostOffice":null
}
1.2.0

4 years ago

1.2.1

4 years ago

1.0.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago