Test Ortam
URL olarak https://www.ilaclat.com/api-test
adresi kullanılır.
Gerçek Ortam
URL olarak https://www.ilaclat.com/api
adresi kullanılır.
API endpointlerine ulaşmak için kullanacağınız access_token
'ı destek@ilaclat.com adresinden talepte bulunmanız gerekmektedir.
İstekleri gönderirken Content-Type
header'ı olarak application/json
göndermelisiniz.
Aldığınız access_token
'ı sorgulara Authorization
header'ı olarak Bearer access_token
şeklinde göndermelisiniz.
Bireysel ── Kurumsal ── Dezenfeksiyon └── Şehir Listesi │ └── İlçe Listesi ├── Hizmet Yeri │ └── Hizmet Alanı ── Hizmet Ölçüleri ├── Hizmet Türü └── Fiyat Listesi └── Şipariş Listesi └── Sipariş Ekle └── Sipariş Sil
Sistemde kayıtlı tüm şehirleri listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array();
$url = "https://www.ilaclat.com/api-test/liste/sehir";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "data": [ { "id": "1", "sehir": "Adana" }, { "id": "2", "sehir": "Adıyaman" }, { "id": "3", "sehir": "Afyonkarahisar" }, ................... ................... { "id": "77", "sehir": "Yalova" }, { "id": "66", "sehir": "Yozgat" }, { "id": "67", "sehir": "Zonguldak" } ], "kod": 900 }
Sistemde kayıtlı tüm şehirleri listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
"id" => 35 // şehir plaka kodu * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/liste/ilce";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "plaka": { "id": "35", "sehir": "İzmir" }, "data": [ { "id": "474", "ilce": "Aliağa" }, { "id": "475", "ilce": "Balçova" }, { "id": "476", "ilce": "Bayındır" }, ................... ................... { "id": "501", "ilce": "Tire" }, { "id": "502", "ilce": "Torbalı" }, { "id": "503", "ilce": "Urla" } ], "kod": 900 }
Sistemde kayıtlı tüm hizmet yerleri ve varsa o yerlere ait alanlar listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
"hizmet_tipi" => "bireysel" // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/liste/hizmet-yeri";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "hizmet_tipi": "bireysel", "data": [ { "id": "1", "hizmet_tipi": "Daire", "data": [ { "id": 0, "hizmet_alani": "" } ] }, { "id": "4", "hizmet_tipi": "Müstakil Ev", "data": [ { "id": 0, "hizmet_alani": "" } ] }, { "id": "2", "hizmet_tipi": "Bina-Toplu Konut", "data": [ { "id": "1", "hizmet_alani": "1 Daire" }, { "id": "11", "hizmet_alani": "2 Daire" }, { "id": "12", "hizmet_alani": "3 Daire" }, ................... ................... { "id": "60", "hizmet_alani": "70 - 80 Daire" }, { "id": "61", "hizmet_alani": "80 - 90 Daire" }, { "id": "62", "hizmet_alani": "90 - 100 Daire" } ] }, { "id": "17", "hizmet_tipi": "Bina Ortak Alan", "data": [ { "id": 0, "hizmet_alani": "" } ] }, { "id": "6", "hizmet_tipi": "Bahçeli Ev", "data": [ { "id": 0, "hizmet_alani": "" } ] }, { "id": "3", "hizmet_tipi": "Bahçe", "data": [ { "id": 0, "hizmet_alani": "" } ] }, { "id": "30", "hizmet_tipi": "Diğer", "data": [ { "id": 0, "hizmet_alani": "" } ] } ], "kod": 900 }
Sistemde kayıtlı alanlar M2 cinsinden listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array();
$url = "https://www.ilaclat.com/api-test/liste/hizmet-alani-olculer";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "data": [ { "id": "7", "hizmet_alani_olculer": "0-100 M2" }, { "id": "1", "hizmet_alani_olculer": "100-200 M2" }, { "id": "2", "hizmet_alani_olculer": "200-300 M2" }, { "id": "3", "hizmet_alani_olculer": "300-500 M2" }, { "id": "4", "hizmet_alani_olculer": "500-1000 M2" }, { "id": "5", "hizmet_alani_olculer": "1000-2000 M2" }, { "id": "6", "hizmet_alani_olculer": "3000 M2" } ], "kod": 900 }
Sistemde kayıtlı talep edilecek tüm hizmet türleri listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
"hizmet_tipi" => "bireysel" // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/liste/hizmet-turu";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "hizmet_tipi": "bireysel", "data": [ { "id": "9", "hizmet_turu": "Koruyucu/kovucu Genel (Yürüyen/uçkun) Haşere Kontrolü" }, { "id": "18", "hizmet_turu": "Karınca" }, { "id": "19", "hizmet_turu": "Gümüş Böceği" }, ................... ................... { "id": "12", "hizmet_turu": "Bit" }, { "id": "8", "hizmet_turu": "Sivrisinek/yakarca" }, { "id": "6", "hizmet_turu": "Karasinek" } ], "kod": 900 }
Talep edilecek hizmet türüne ait fiyat bilgisi listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
/*
"hizmet_il" => "35", // izmir * ZORUNLU
"hizmet_ilce" => "480", // bornova * ZORUNLU
"hizmet_tipi" => "bireysel", // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
"hizmet_turu" => "18", // Karınca * ZORUNLU
"hizmet_yeri" => "2", // 2 Bina-Toplu Konut * ZORUNLU
"hizmet_alani" => "23", // 15 Daire * ZORUNLU
"hizmet_alani_olculer" => "1" // 100-200 M2 * ZORUNLU
*/
/*
"hizmet_il" => "35", // izmir * ZORUNLU
"hizmet_ilce" => "480", // bornova * ZORUNLU
"hizmet_tipi" => "dezenfeksiyon", // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
"hizmet_turu" => "22", // Dezenfeksiyon * ZORUNLU
"hizmet_yeri" => "2", // 2 Bina-Toplu Konut * ZORUNLU
"hizmet_alani" => "23", // 15 Daire * ZORUNLU
"hizmet_alani_olculer" => "1" // 100-200 M2 * ZORUNLU
*/
"hizmet_il" => "35", // izmir * ZORUNLU
"hizmet_ilce" => "480", // bornova * ZORUNLU
"hizmet_tipi" => "kurumsal", // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
"hizmet_turu" => "18", // Karınca * ZORUNLU
"hizmet_yeri" => "8", // Ofis * ZORUNLU
"hizmet_alani" => "0", * ZORUNLU
"hizmet_alani_olculer" => "1" // 100-200 M2 * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/liste/fiyat";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "data": [ { "hizmet_tipi": "kurumsal", "hizmet_il": { "plaka": "35", "adi": "İzmir" }, "hizmet_ilce": { "id": "480", "adi": "Bornova" }, "hizmet_turu": { "id": "18", "adi": "Karınca" }, "hizmet_yeri": { "id": "8", "adi": "Ofis" }, "hizmet_alani": { "id": "0", "adi": "" }, "hizmet_alani_olculer": { "id": "1", "adi": "100-200 M2" }, "hizmet_odemesi": [ { "hizmet_plani": "teksefer", "hizmet_tutari": "500.94" }, { "hizmet_plani": "1ay", "hizmet_tutari": "500.94" }, { "hizmet_plani": "3ay", "hizmet_tutari": "1471.77" }, { "hizmet_plani": "6ay", "hizmet_tutari": "2881.44" }, { "hizmet_plani": "12ay", "hizmet_tutari": "5638.68" } ] } ], "kod": 900 }
Talep edilecek hizmete ait sipariş sisteme eklenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
"hizmet_adsoyad" => "Adı Soyadı", // * ZORUNLU
"hizmet_telefon" => "05551112233", // * ZORUNLU
"hizmet_eposta" => "deneme@ilaclat.com", // * ZORUNLU DEĞİL
"hizmet_adres" => "123 sokak", // * ZORUNLU DEĞİL
/*
"hizmet_il" => "35", // izmir * ZORUNLU
"hizmet_ilce" => "480", // bornova * ZORUNLU
"hizmet_tipi" => "bireysel", // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
"hizmet_turu" => "18", // Karınca * ZORUNLU
"hizmet_yeri" => "2", // Bina-Toplu Konut * ZORUNLU
"hizmet_alani" => "23", // 15 Daire * ZORUNLU
"hizmet_alani_olculer" => "1", // 100-200 M2 * ZORUNLU
"hizmet_plan" => "teksefer", // teksefer * ZORUNLU
*/
"hizmet_il" => "35", // izmir * ZORUNLU
"hizmet_ilce" => "480", // bornova * ZORUNLU
"hizmet_tipi" => "kurumsal", // bireysel, kurumsal, dezenfeksiyon * ZORUNLU
"hizmet_turu" => "18", // Karınca * ZORUNLU
"hizmet_yeri" => "8", // Ofis * ZORUNLU
"hizmet_alani" => "0", // * ZORUNLU DEĞİL
"hizmet_alani_olculer" => "1", // 100-200 M2 * ZORUNLU
"hizmet_plan" => "6ay", // teksefer, 1ay, 3ay, 6ay, 12ay * ZORUNLU
"hizmet_talep_tarihi" => "2022-12-27 19:00:00", // hizmet ne zaman yapılsın * ZORUNLU DEĞİL
"odeme_sekli" => "kapidaodeme", // kapidaodeme, kredikarti * ZORUNLU
"siparis_notu" => "sipariş notu", // * ZORUNLU DEĞİL
"ip" => "127.0.0.1" // * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/ekle/siparis";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "data": [ { "id": 4, "siparis_kodu": "618BC1214135315" } ], "kod": 900 }
Sistemde kayıtlı tüm siparişler listelenir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
"siparis_kodu" => "", // sipariş kodu * ZORUNLU DEĞİL
"current_page" => 1 // sayfa numarası * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/liste/siparis";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "meta": { "current_page": 0, "total_pages": 0 }, "data": [ { "siparis_kodu": "618BC1214135315", "siparis_tarihi": "2022-12-14 13:53:16", "siparis_tutari": "2881.44", "siparis_durumu": "beklemede", "siparis_notu": "sipariş notu", "hizmet_adsoyad": "Adı Soyadı", "hizmet_telefon": "05551112233", "hizmet_eposta": "deneme@ilaclat.com", "hizmet_adres": "123 sokak", "hizmet_tipi": "kurumsal", "hizmet_il": { "plaka": "35", "adi": "İzmir" }, "hizmet_ilce": { "id": "480", "adi": "Bornova" }, "hizmet_turu": { "id": "18", "adi": "Karınca" }, "hizmet_yeri": { "id": "8", "adi": "Ofis" }, "hizmet_alani": { "id": "0", "adi": "" }, "hizmet_alani_olculer": { "id": "1", "adi": "100-200 M2" }, "hizmet_plan": "6ay", "hizmet_plan_bitis_tarihi": "2023-06-14", "hizmet_talep_tarihi": "2022-12-27 19:00:00", "odeme_sekli": "kapidaodeme", "odeme_durumu": "odenmemis", "teslim_tarihi": "0000-00-00 00:00:00" } ], "kod": 900 }
Sistemde kayıtlı sipariş kalıcı olarak silinir.
$token = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$veriler = array(
"siparis_kodu" => "68AA61208213217" // sipariş kodu * ZORUNLU
);
$url = "https://www.ilaclat.com/api-test/sil/siparis";
$ch = curl_init($url);
$headers = array(
"Accept: application/json",
"Content-Type: application/json",
"Authorization: Bearer ".$token
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($veriler));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); // false for json format, true array format
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$jsonData = curl_exec($ch);
if ($jsonData === false){
print "hata: ".curl_error($ch);
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$httpResponse = json_decode($jsonData, true);
if ($httpCode != 200){
if ($httpCode==400) echo "400 Bad Request ".$httpResponse;
else if ($httpCode==401) echo "401 Authentication Error ".$httpResponse;
else if ($httpCode==403) echo "403 Forbidden ".$httpResponse;
else if ($httpCode==404) echo "404 Not Found Error ".$httpResponse;
else if ($httpCode==422) echo "422 Unprocessable Entity Error ".$httpResponse;
else if ($httpCode==500) echo "500 Internal Server Error ".$httpResponse;
//echo $httpCode." ".$httpResponse;
}else{
if ($httpResponse["kod"] == 900){ // başarılı
//print_r($httpResponse);
}else{ // hatalı
//print_r($httpResponse);
}
}
{ "data": "Sipariş Başarıyla Silindi", "kod": 900 }
Parametre | Anlamı |
---|---|
hizmet_tipi | "bireysel", "kurumsal", "dezenfeksiyon" değerlerinir alır. |
hizmet_plan | Hizmet Tipi "bireysel" veya "dezenfeksiyon" ise "teksefer" değerini alır, Hizmet Tipi "kurumsal" ise "teksefer" veya "1ay" veya "3ay" veya "6ay" veya "12ay" değerlerinden birini alır. |
hizmet_talep_tarihi | İleri Bir tarihte randevulu hizmet istediğinde gereklidir. Y-m-d H:i:s (24 saat formatı) |
hizmet_plan_bitis_tarihi | Sistem tarafından üretilir. İleri Bir tarihte randevulu hizmet istedğininde hizmetin bitiş tarihidir. Y-m-d |
odeme_sekli | "kapidaodeme" veya "kredikarti" değerlerinir alır. |
odeme_durumu | Sistem tarafından üretilir, "odenmis" veya "odenmemis" değerlerini alır. |
teslim_tarihi | Sistem tarafından üretilir, hizmetin tamamlandığı tarih ve saati belirtir. |
siparis_kodu | Sistem tarafından üretilir, en az 15 karakterdir. |
siparis_durumu | Sistem tarafından üretilir, "beklemede" veya "takvime_alindi" veya "teslimedildi" veya "iade" değerlerini alır. |
siparis_notu | Müşteriye ait opsiyonel sipariş notudur. |
ip | Müşteriye ait IP adresidir zorunlu alandır. |
Hata Kodu | Anlamı |
---|---|
900 | Başarılı İşlem |
901 | Yetkisiz Erişim - Token tanımlanmamış veya yanlış iletilmiş |
902 | Hizmet Alanı Ölçüler Bulunamadı |
903 | Hizmet Türü Bulunamadı |
904 | Hizmet Yeri Bulunamadı |
905 | Pasif Kullanıcı - API kullanıcısı pasif moda alınmış |
906 | Token Gereklidir |
907 | Hatalı İstek - GET, POST, DELETE metodları yanlış gönderilmiş |
908 | Geçersiz Hizmet Tipi |
909 | Hizmetler Eklenemedi - Veritabanı hatası |
910 | Siparişler Eklenemedi - Veritabanı hatası |
911 | Sipariş Kodu Gereklidir |
912 | Sipariş Kodu Oluşturulamadı - Servis hatası |
913 | Geçersiz Sipariş Kodu |
914 | Hatalı Hizmet Alanı ID |
915 | Hatalı Hizmet Alanı Ölçü ID |
916 | Hatalı Hizmet Türü ID |
917 | Hatalı Hizmet Yeri ID |
918 | Hatalı Şehir ID |
919 | Hatalı İlçe ID |
920 | Sipariş Silinemedi - Veritabanı hatası |
921 | Sipariş Bulunamadı - Sipariş tablosu boş |
922 | Sipariş Kodu Bulunamadı |
923 | Fiyat Hesaplanamadı - Servis hatası |
924 | Hizmet yerine ait olmayan hizmet alanı ID |
925 | Geçersiz Hizmet Planı ID |
926 | Hatalı Hizmet Planı ID |
927 | Geçersiz Ödeme Şekli |
928 | IP Gereklidir |
929 | Geçersiz Ip |
930 | Ad Soyad Gereklidir |
931 | Telefon Gereklidir |
932 | Geçersiz Telefon |
933 | Geçersiz E-Posta |
934 | Şehir Bulunamadı - Servis hatası |
935 | İlçe Bulunamadı |
936 | Sayfa Numarası Gereklidir |
937 | Geçersiz Sayfa Numarası |
ilaclat.com API'yi kullanmak veya görüşlerinizi bizimle paylaşmak isterseniz lütfen bizimle aşağıdaki kanallar üzerinden iletişime geçiniz.
E-Posta : destek@ilaclat.com
Telefon : 0850 303 51 81