{
"query":{
"code": "10005",
"country": "US",
"range": "25",
"measure": "mi",
},
"results":{
"range_codes_unique": [
"07010",
"07020",
"07022",
"07024",
"07026",
...
],
"range_codes": [
"07010",
"07020",
"07022",
"07024",
"07026",
...
],
"range_codes_details": [
{
"postal_code":"07010",
"country_code":"US",
"city":"Cliffside Park",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07020",
"country_code":"US",
"city":"Edgewater",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07022",
"country_code":"US",
"city":"Fairview",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07024",
"country_code":"US",
"city":"Fort Lee",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07026",
"country_code":"US",
"city":"Garfield",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
...
],
}
}
ਐਂਡ ਪੁਆਇੰਟ ਦੀ ਵਰਤੋਂ ਲਈ ਇਸ ਅਸਾਨ ਨਾਲ ਤੁਸੀਂ ਡਾਕ ਕੋਡਾਂ ਦੀ ਇੱਕ ਸੂਚੀ ਪ੍ਰਾਪਤ ਕਰੋਗੇ ਜੋ ਇੱਕ ਨਿਰਧਾਰਤ ਦੂਰੀ ਦੇ ਅੰਦਰ ਹਨ. ਬੇਨਤੀ ਦੀ ਉਦਾਹਰਣ ਵਿਲੱਖਣ ਡਾਕ ਕੋਡਾਂ ਦੀ ਸੂਚੀ, ਡਾਕ ਕੋਡਾਂ ਦੀ ਇੱਕ ਪੂਰੀ ਸੂਚੀ ਅਤੇ ਹਰੇਕ ਡਾਕ ਕੋਡ ਦੇ ਵੇਰਵਿਆਂ ਨੂੰ ਵਾਪਸ ਕਰੇਗੀ.
GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&distance=25&zipcode=10005&country=us
ਸਾਡੀ ਏਪੀਆਈ ਦੂਰੀ ਮਾਪ ਨੂੰ ਕਿਲੋਮੀਟਰ (ਡਿਫੌਲਟ) ਜਾਂ ਮੀਲਾਂ ਵਿੱਚ ਸਵੀਕਾਰਦੀ ਹੈ.
ਮਾਪ ਨੂੰ ਕਿਲੋਮੀਟਰ ਤੱਕ ਬਦਲਣ ਲਈ ਤੁਹਾਨੂੰ ਆਪਣੀ ਬੇਨਤੀ ਵਿੱਚ ms
GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&ms=km&distance=25&zipcode=10005&country=us
ਜਵਾਬ ਇਸ ਤਰ੍ਹਾਂ ਦਿਖਾਈ ਦੇਵੇਗਾ:
{
"query":{
"code": "10005",
"country": "US",
"range": "25",
"measure": "mi"
},
"results":{
"range_codes_unique": ["07010", "07020", "07022", "07024", "07026", ...],
"range_codes": ["07010", "07020", "07022", "07024", "07026", ...],
"range_codes_details": [
{
"postal_code":"07010",
"country_code":"US",
"city":"Cliffside Park",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07020",
"country_code":"US",
"city":"Edgewater",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07022",
"country_code":"US",
"city":"Fairview",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07024",
"country_code":"US",
"city":"Fort Lee",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
{
"postal_code":"07026",
"country_code":"US",
"city":"Garfield",
"state":"New Jersey",
"state_code":"NJ",
"province":"Bergen",
"province_code":"003"
},
...
],
}
}
ਹੇਠ ਦਿੱਤੀ ਉਦਾਹਰਣ ਪੋਸਟਲ ਕੋਡ ਦੇ ਵੇਰਵਿਆਂ ਨੂੰ ਵਾਪਸ ਕਰੇਗੀ ਜੋ ਖੋਜ ਪੁੱਛਗਿੱਛ ਨਾਲ ਮੇਲ ਖਾਂਦੀਆਂ ਹਨ.
GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&zipcode=10005&country=us
ਜਵਾਬ ਇਸ ਤਰ੍ਹਾਂ ਦਿਖਾਈ ਦੇਵੇਗਾ:
{
"query":{
"code": "10005",
"country": "us",
"range": "",
"measure": "mi"
},
"results":{
"range_codes_unique": ["10005"],
"range_codes": ["10005"],
"range_codes_details": [
{
"postal_code":"10005",
"country_code":"US",
"city":"New York",
"state":"New York",
"state_code":"NY",
"province":"New York",
"province_code":"061"
}
],
}
}
ਤੁਸੀਂ ਨਤੀਜਿਆਂ ਵਿਚ ਸਿਰਫ ਉਹੋ ਪ੍ਰਾਪਤ ਕਰਨ ਲਈ ਵਾਧੂ ਪੈਰਾ ਪਾਸ ਕਰ ਸਕਦੇ ਹੋ, ਸਿਰਫ ਤੁਹਾਡੀ ਬੇਨਤੀ ਵਿਚ fields
GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&fields=["range_codes_unique"]&distance=25&zipcode=10005&country=us
ਜਵਾਬ ਇਸ ਤਰ੍ਹਾਂ ਦਿਖਾਈ ਦੇਵੇਗਾ:
{
"query":{
"code": "10005",
"country": "US",
"range": "25",
"measure": "mi"
},
"results":{
"range_codes_unique": ["07010", "07020", "07022", "07024", "07026", ...]
}
}