Dokumentazzjoni API

Ibda tuża l-API faċli biex tużah illum, segwi l-eżempji biex titgħallem kif tużaha.




GET Ikseb kodiċi postali f'distanza

B'dan il-punt tat-tmiem faċli biex tużah ikollok lista ta 'kodiċijiet postali li jinsabu f'distanza partikolari. L-eżempju tat-talba jirritorna lista ta 'kodiċi postali uniċi, lista sħiħa ta' kodiċi postali u d-dettalji ta 'kull kodiċi postali.

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

L-API tagħna taċċetta kejl tad-distanza f'kilometri (Default) jew mili.

Biex tibdel il-kejl għal kilometri trid tpoġġi l- ms fit-talba tiegħek:

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

It-tweġiba tidher hekk:

{
   "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 Ikseb dettalji tal-kodiċi postali

L-eżempju li ġej jagħti lura d-dettalji tal-kodiċi postali li jaqblu mat-tfittxija.

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

It-tweġiba tidher hekk:

{
   "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 Ikseb dejta personalizzata

Tista 'tgħaddi params żejda biex tikseb biss dak li għandek bżonn fir-riżultati, sempliċement żid l- fields valur fit-talba tiegħek.

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

It-tweġiba tidher hekk:

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



Ibda tuża l-API tagħna b'xejn illum!

Ikseb 240 talba kuljum b'xejn

+94 Pajjiżi appoġġati

AD (Andorra)
AR (Arġentina)
AS (Samoa Amerikana)
AT (L-Awstrija)
AU (Awstralja)
AX (Gżejjer Aland)
AZ (Ażerbajġan)
BD (Bangladexx)
BE (Belġju)
BG (Bulgarija)
BM (Bermuda)
BR (Brażil)
Flag of Belarus
BY (Belarus)
CA (Kanada)
CH (Isvizzera)
CL (Ċili)
CO (Kolombja)
CR (Kosta Rika)
CY (Ċipru)
CZ (Repubblika Ċeka)
Flag of Germany
DE (Il-Ġermanja)
DK (Id-Danimarka)
DO (Repubblika Dominikana)
DZ (L-Alġerija)
EE (Estonja)
ES (Spanja)
FI (Finlandja)
FM (Mikronesja)
FO (Gżejjer Faroe)
FR (Franza)
GB (Ir-Renju Unit)
GF (Gujana Franċiża)
GG (Guernsey u Alderney)
GL (Greenland)
GP (Guadeloupe)
GT (Gwatemala)
GU (Guam)
HR (Il-Kroazja (Hrvatska))
HU (Ungerija)
IE (Irlanda)
IM (Raġel (Gżira))
IN (Indja)
IS (Iżlanda)
IT (L-Italja)
JE (Jersey)
JP (Ġappun)
Flag of South Korea
KR (Korea t'Isfel)
LI (Liechtenstein)
LK (Sri Lanka)
LT (Il-Litwanja)
LU (Lussemburgu)
LV (Latvja)
MC (Monako)
MD (Moldova)
Flag of the Marshall Islands
MH (Gżejjer Marshall)
MK (Maċedonja)
MP (Gżejjer Mariana tat-Tramuntana)
MQ (Martinique)
MT (Malta)
Flag of Malawi
MW (Malawi)