API Referansı
IBAN doğrulama ve banka bilgileri sorgulama API'si. RESTful mimarisi, JSON formatında yanıtlar.
https://test.ibansource.com/api/v1
Kimlik Doğrulama
API anahtarınızı aşağıdaki yöntemlerden biriyle gönderin:
| Yöntem | Kullanım |
|---|---|
| X-API-Key | X-API-Key: ibsrc_live_xxx |
| Bearer Token | Authorization: Bearer ibsrc_live_xxx |
| Query Param | ?api_key=ibsrc_live_xxx |
IBAN Doğrulama
/api/v1/iban/validate
IBAN Doğrulama
Tek bir IBAN numarasını doğrular ve banka bilgilerini döner.
| iban | zorunlu — Doğrulanacak IBAN numarası |
curl -X POST https://test.ibansource.com/api/v1/iban/validate \
-H "X-API-Key: ibsrc_live_xxx" \
-H "Content-Type: application/json" \
-d '{"iban": "TR330006100519786457841326"}'
Toplu IBAN Doğrulama
/api/v1/iban/batch
Toplu IBAN Doğrulama
Birden fazla IBAN numarasını tek istekte doğrular (maks. 50).
| ibans | zorunlu — IBAN dizisi (array) |
const response = await fetch('https://test.ibansource.com/api/v1/iban/batch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'ibsrc_live_xxx'
},
body: JSON.stringify({
ibans: ['TR330006100519786457841326', 'TR120006200119000006672315']
})
});
const data = await response.json();
Bankalar
/api/v1/banks
Banka Listesi
Finansal kurumları listeler ve filtreler.
| type_slug | opsiyonel — Kurum tipi filtresi |
| search | opsiyonel — Arama sorgusu |
| page | opsiyonel — Sayfa numarası (varsayılan: 1) |
| per_page | opsiyonel — Sayfa başına kayıt (varsayılan: 10, maks: 100) |
$ch = curl_init('https://test.ibansource.com/api/v1/banks?search=garanti');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ibsrc_live_xxx']
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
/api/v1/health
Sağlık Kontrolü
API durumunu kontrol eder. Kimlik doğrulama gerektirmez.
Yanıt Formatı
{
"success": true,
"data": { ... },
"message": "İşlem başarılı",
"meta": {
"version": "1.0.0",
"request_id": "20250101-120000-abc123",
"timestamp": 1704106800,
"datetime": "2025-01-01T12:00:00+03:00",
"execution_time_ms": 12.5
}
}
{
"type": "https://ibansource.com/errors/validation_error",
"title": "Validation Error",
"status": 422,
"detail": "Doğrulama hatası",
"instance": "/api/v1/iban/validate",
"timestamp": "2025-01-01T12:00:00+03:00",
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Doğrulama hatası",
"http_status": 422,
"details": { "iban": ["IBAN 26 karakter olmalıdır"] }
},
"meta": { ... }
}
Rate Limiting
Her endpoint'in farklı rate limit'i vardır. API anahtarı ile kimlik doğrulaması yapıldığında limitlerin artırılır.
| Endpoint | Anonim | API Key | Pencere |
|---|---|---|---|
| /iban/* | 100 | 500 | 60 sn |
| /banks | 200 | 1,000 | 1 saat |
| blog | 200 | 1,000 | 60 sn |
| blog_detail | 60 | 300 | 60 sn |
| /banks/{slug} | 60 | 300 | 60 sn |
| provinces | 120 | 600 | 60 sn |
| districts | 150 | 750 | 60 sn |
X-RateLimit-Limit,
X-RateLimit-Remaining,
X-RateLimit-Reset
Hata Kodları
| HTTP | Kod | Açıklama |
|---|---|---|
| 400 | BAD_REQUEST | Geçersiz parametre veya eksik alan |
| 401 | UNAUTHORIZED | Geçersiz veya eksik API anahtarı |
| 403 | FORBIDDEN | Bu endpoint için yetkiniz yok |
| 404 | RESOURCE_NOT_FOUND | İstenen kaynak bulunamadı |
| 405 | METHOD_NOT_ALLOWED | HTTP metodu desteklenmiyor |
| 422 | VALIDATION_ERROR | Doğrulama hatası (detaylı) |
| 429 | RATE_LIMIT_EXCEEDED | İstek limiti aşıldı |
| 500 | INTERNAL_SERVER_ERROR | Sunucu hatası |
Kod Örnekleri
import requests
resp = requests.post(
"https://test.ibansource.com/api/v1/iban/validate",
json={"iban": "TR330006100519786457841326"},
headers={"X-API-Key": "ibsrc_live_xxx"}
)
data = resp.json()
print(data["data"])
const res = await fetch(
'https://test.ibansource.com/api/v1/iban/validate',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'ibsrc_live_xxx'
},
body: JSON.stringify({
iban: 'TR330006100519786457841326'
})
}
);
const data = await res.json();