Dokimantasyon API

Kòmanse itilize API fasil pou itilize nou an jodi a, swiv egzanp yo pou aprann kijan pou itilize li.




GET Jwenn kòd postal nan yon distans

Avèk sa a fasil yo sèvi ak pwen final ou pral jwenn yon lis kòd postal ki nan yon distans bay yo. Egzanp demann lan ap retounen yon lis kòd postal inik, yon lis konplè kòd postal ak detay yo nan chak kòd postal.

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&distance=25&zipcode=10005&country=us

API nou an aksepte mezi distans an kilomèt (Default) oswa mil.

Pou chanje mezi a kilomèt ou dwe mete ms nan demann ou an:

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&ms=km&distance=25&zipcode=10005&country=us

Repons lan pral sanble tankou sa a:

{
   "query":{
      "code": "10005",
      "country": "US",
      "range": "25",
      "measure": ""
   },
   "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 Jwenn detay postal postal yo

Egzanp sa a ap retounen detay yo nan kòd postal yo ki matche ak rechèch rechèch la.

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&zipcode=10005&country=us

Repons lan pral sanble tankou sa a:

{
   "query":{
      "code": "10005",
      "country": "us",
      "range": "",
      "measure": ""
   },
   "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"
          }
       ],
   }
}

GET Jwenn done koutim

Ou ka pase params siplemantè yo ka resevwa sèlman sa ou bezwen nan rezilta yo, jis ajoute fields valè nan demann ou an.

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&fields=["range_codes_unique"]&distance=25&zipcode=10005&country=us

Repons lan pral sanble tankou sa a:

{
   "query":{
      "code": "10005",
      "country": "US",
      "range": "25",
      "measure": ""
   },
   "results":{
       "range_codes_unique": ["07010", "07020", "07022", "07024", "07026", ...]
   }
}



Kòmanse itilize API nou an gratis jodi a!

Jwenn 240 demann chak jou gratis

+94 Sipò pou peyi yo

AD (Andorra)
AR (Ajantin)
AS (Samoa Ameriken)
AT (Otrich)
AU (Ostrali)
AX (Aland Islands)
AZ (Azerbaydjan)
BD (Bangladèch)
BE (Bèljik)
BG (Bilgari)
BM (Bermuda)
BR (Brezil)
Flag of Belarus
BY (Byelorisi)
CA (Kanada)
CH (Swis)
CL (Chili)
CO (Kolonbi)
CR (Costa Rica)
CY (Lil Chip)
CZ (Repiblik Tchekoslovaki)
Flag of Germany
DE (Almay)
DK (Denmark)
DO (Repiblik Dominikèn)
DZ (Aljeri)
EE (Estoni)
ES (Espay)
FI (Fenlann)
FM (Mikwonezi)
FO (Faroe Islands)
FR (Lafrans)
GB (Wayòm Ini)
GF (Franse gwiyane)
GG (Guernsey ak Alderney)
GL (Greenland)
GP (Gwadloup)
GT (Gwatemala)
GU (Guam)
HR (Kwoasi (Hrvatska))
HU (Ongri)
IE (Iland)
IM (Man (Isle of))
IN (Lend)
IS (Islann)
IT (Itali)
JE (Jersey)
JP (Japon)
Flag of South Korea
KR (Kore di sid)
LI (Liechtenstein)
LK (Sri Lanka)
LT (Lityani)
LU (Liksanbou)
LV (Letoni)
MC (Monako)
MD (Moldavi)
Flag of the Marshall Islands
MH (Marshall Islands)
MK (Masedwan)
MP (Zile Mariana Nò yo)
MQ (Matinik)
MT (Malta)
Flag of Malawi
MW (Malawi)