Başlarken
API Endpoint https://eczaneleri.net/api/v1/pharmacies
Bu dökümanda Türkiye'deki anlık tüm nöbetçi eczane bilgileri çekmek için oluşturulmuş API entegrasyonu bilgileri yer almaktadır. Servisler, REST tabanlı web servisleridir. Web servis adresleri aşağıda listelenmiştir.
Bu API'ı kullanmak için bir API anahtarına ihtiyacınız olacaktır. Kendi API anahtarınızı almak için lütfen https://eczaneleri.net/iletisim adresinden ulaşabilir veya daha hızlı iletişim için Telegram üzerinden yazabilirsiniz..
Web Servis Adresi
# Örnek PHP Kodu
$url = "URL";
$api_key = "API_KEY";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'Content-Type:application/json', "apikey: ".$api_key
));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/76.0.3809.132 Safari/537.36');
$result = curl_exec ($ch);
$err = curl_error($ch);
curl_close ($ch);
$response = json_decode($result, true);
Endpoint adresi :
https://eczaneleri.net/api/v1/pharmacies
PARAMETERELER
Adı | Tipi | Zorunlu | Açıklama |
---|---|---|---|
apikey | String | Evet | API KEY Adresin. HEADER alanında yer almalıdır |
/all | String | Evet | Tüm nöbetçi eczaneleri çekmek için kullanılacak endpoint. |
/list | String | Evet | Belirli il ve ilçe eczanelerini çekmek için kullanılması gereken endpoint. Bu endpointte 2 adet get parametresi kullanılabilir. Bunlar city ve county. City parametresi kullanılması zorunlu iken, county parametresi zorunlu değildir |
Tüm nöbetçi eczaneleri listeleme
Bu endpoint ile Türkiye'deki bütün nöbetçi eczaneleri çekebilirsiniz. Php kod örneği eklenmiştir. Kendinize göre düzenleyip projenize ekleyebilirsiniz
Endpoint adresi :
https://eczaneleri.net/api/v1/pharmacies/all
# Örnek PHP Kodu (Tüm nöbetçi eczaneleri çeker)
$url = "https://eczaneleri.net/api/v1/pharmacies/all";
$api_key = "API_KEY";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'Content-Type:application/json', "apikey: ".$api_key
));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/76.0.3809.132 Safari/537.36');
$result = curl_exec ($ch);
$err = curl_error($ch);
curl_close ($ch);
$response = json_decode($result, true);
Result Örneği :
{
"result": {
"info": {
"key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"owner": "Demo",
"website": "https://demo.com",
"email": "[email protected]",
"ip": null,
"startDate": "2023-10-01 15:30:38",
"finishDate": "2024-10-01"
},
"data": {
"info": {
"totalPharmacy": "1262"
},
"pharmacy": [
{
"cityName": "İstanbul",
"countyName": "Adalar",
"name": "Burgazada Eczanesi",
"phone": "2163812112",
"address": "Burgazadası Mahallesi Çınarlık Sokak 3 112 acil karşısı\r\n",
"addressDirections": null,
"map": "40.87998754997840,29.06919493887330",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Avcılar",
"name": "Ispartakule Eczanesi",
"phone": "2123974131",
"address": "Tahtakale Mahallesi Abdi İpekçi Caddesi 13/1B Efes Sitesi Karşısı, The Kırmızı Restoran yanı",
"addressDirections": null,
"map": "41.0647362035729,28.7142669320631",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Bağcılar",
"name": "Leman Eczanesi",
"phone": "2124300157",
"address": "Yüzyıl Mahallesi 2172. Sokak 4 Işık Tıp Merkezi Yanı",
"addressDirections": null,
"map": "41.06300554719300,28.85491245547280",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Avcılar",
"name": "Ayten Eczanesi",
"phone": "2129842616",
"address": "Avcılar Merkez Mahallesi Fırın Sokak 21C ",
"addressDirections": null,
"map": "40.9807571245173,28.7195523522676",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Sarıyer",
"name": "Sinem Gökdemir Eczanesi",
"phone": "2128030542",
"address": "Maslak Mahallesi Hadımkoru Yolu Caddesi 2-C/16 Ağaoğlu My Home altı",
"addressDirections": null,
"map": "41.11533830614849,29.00079488754272",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Bağcılar",
"name": "Demet Eczanesi",
"phone": "2124628388",
"address": "Sancaktepe Mahallesi 892. Sokak 3/A Yeni İklim Hastanesi Yanı",
"addressDirections": null,
"map": "41.03680647795450,28.85778331520980",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Bağcılar",
"name": "Erzurum Eczanesi",
"phone": "2126510170",
"address": "Evren Mahallesi Fevzi Çakmak Caddesi 81 Özel Güneşli Erdem Hastanesi karşısı",
"addressDirections": null,
"map": "41.04034960153700,28.82480924825300",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Bahçelievler",
"name": "Melih Eczanesi",
"phone": "2126561665",
"address": "Kocasinan Merkez Mahallesi Eski Edirne Yolu Caddesi 35 Nazife Yaman Sağlık Ocağı Yakını",
"addressDirections": null,
"map": "41.01809290255720,28.83283880998060",
"note": null
}
]
}
}
PARAMETERELER
Adı | Tipi | Zorunlu | Açıklama |
---|---|---|---|
apikey | String | Evet | API KEY Adresin. HEADER alanında yer almalıdır |
İl bazlı nöbetçi eczane listeleme
Bu endpoint ile Türkiye'deki bütün nöbetçi eczaneleri çekebilirsiniz. Php kod örneği eklenmiştir. Kendinize göre düzenleyip projenize ekleyebilirsiniz
Endpoint adresi :
https://eczaneleri.net/api/v1/pharmacies/list
# Örnek PHP Kodu (İl bazlı nöbetçi eczaneleri çeker)
$url = "https://eczaneleri.net/api/v1/pharmacies/list?city=CITY_NAME&county=COUNTY_NAME";
$api_key = "API_KEY";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'Content-Type:application/json', "apikey: ".$api_key
));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/76.0.3809.132 Safari/537.36');
$result = curl_exec ($ch);
$err = curl_error($ch);
curl_close ($ch);
$response = json_decode($result, true);
Result Örneği :
{
"result": {
"info": {
"key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"owner": "Demo",
"website": "https://demo.com",
"email": "[email protected]",
"ip": null,
"startDate": "2023-10-01 15:30:38",
"finishDate": "2024-10-01"
},
"data": {
"city": {
"cityName": "İstanbul",
"dataLastUpdate": "2023-09-26 09:55:10",
"totalPharmacy": "137"
},
"pharmacy": [
{
"cityName": "İstanbul",
"countyName": "Adalar",
"name": "Burgazada Eczanesi",
"phone": "2163812112",
"address": "Burgazadası Mahallesi Çınarlık Sokak 3 112 acil karşısı\r\n",
"addressDirections": null,
"map": "40.87998754997840,29.06919493887330",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Büyükçekmece",
"name": "Sancaklı Eczanesi",
"phone": "2128821052",
"address": "Atatürk Mahallesi Parmaksız Caddesi 37/A -2 ",
"addressDirections": null,
"map": "41.0132014305303,28.6058581970456",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Fatih",
"name": "Istanbul Eczanesi",
"phone": "2126219227",
"address": "Hırka-i Şerif Mahallesi Kocasinan Caddesi 90/A Emniyet metro durağı çıkışı, İstanbul Emniyet Müdürlüğü
arkası, Ali Emiri Kültür Merkezi ve Nikah Salonu karşısı",
"addressDirections": null,
"map": "41.01985744349610,28.93992434076780",
"note": null
},
{
"cityName": "İstanbul",
"countyName": "Şile",
"name": "Ufuk Eczanesi",
"phone": "2167042088",
"address": "Çavuş Mahallesi Üsküdar Caddesi 192A ",
"addressDirections": null,
"map": "41.172984410669,29.6068597262435",
"note": null
},
]
}
}
}
PARAMETERELER
Adı | Tipi | Zorunlu | Açıklama |
---|---|---|---|
apikey | String | Evet | API KEY Adresin. HEADER alanında yer almalıdır |
city | String | Evet | Bu parametre GET formatında endpointte belirtilmesi zorunludur |
county | String | Hayır | Bu parametre city parametresi eklendikten sonra eklenmelidir. Endpointte belirtilmesi zorunlu değildir |