İçeriğe geç

Ülkeleri Listele

GET /others/countries

Sistemin desteklediği uluslararası ülke kodlarını ve isimlerini listeler.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
geonameIdquerystringUluslararası veritabanlarına kayıtlı coğrafi bölge (ülke/şehir) ID'si.-298795
fetch('https://api.kargomucuz.com/others/countries', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
}
})
.then(response => response.json())
.then(data => console.log(data));
200: Başarılı kimlik doğrulaması sonrası dönen yanıt.
{
"status": true,
"message": "Ülkeler getirildi.",
"payload": {
"data": [
{
"continent": "AS",
"capital": "Ankara",
"languages": "tr-TR,ku,diq,az,av",
"geonameId": 298795,
"south": 35.8121761290001,
"isoAlpha3": "TUR",
"north": 42.104895001,
"fipsCode": "TU",
"population": "82319724",
"east": 44.81812800000006,
"isoNumeric": "792",
"areaInSqKm": "780580.0",
"countryCode": "TR",
"west": 25.6665057269225,
"countryName": "Türkiye",
"postalCodeFormat": "#####",
"continentName": "Asia",
"currencyCode": "TRY"
}
],
"totalCount": 250
},
"code": 500
}