API Dökümanları

Tüm API endpoint'leri, parametreleri ve örnek kullanımları.

🔑 Base URL: https://apiverse.com.tr/api/  ·  Kredi sorgusu: https://apiverse.com.tr/api/v1/?route=time/current

Kimlik Doğrulama

Her istekte API anahtarınızı X-API-Key header'ı veya api_key parametresi ile gönderin.

curl -H "X-API-Key: af_your_key_here" "https://apiverse.com.tr/api/v1/?route=time/current"

# Alternatif
curl "https://apiverse.com.tr/api/v1/?route=time/current&api_key=af_your_key_here"

Kredi Sistemi

Her API isteği 1 kredi tüketir. Mail ve fatura API'larında kullanım uzunluğa göre değişir (1 kredi/karakter).

📧 Mail Gönder

POST /api/mail/send.php 1 kredi/karakter HTML veya düz metin mail gönder
ParametreTürAçıklama
mail_config_idintZorunluDashboard'dan eklediğiniz SMTP yapılandırma ID'si
tostringZorunluAlıcı e-posta adresi
subjectstringZorunluMail konusu
bodystringZorunluMail içeriği (HTML destekli)
is_htmlboolOpsiyonelHTML formatı (varsayılan: true)
curl -X POST "https://apiverse.com.tr/api/mail/send.php" \
  -H "X-API-Key: af_your_key" \
  -H "Content-Type: application/json" \
  -d '{"mail_config_id":1,"to":"user@example.com","subject":"Merhaba!","body":"<h1>Test</h1>"}'

// Yanıt:
{"success":true,"credits_used":82,"credits_remaining":418,"recipient":"user@example.com"}

🧾 Fatura Oluştur

POST /api/invoice/create.php 1 kredi/karakter
curl -X POST "https://apiverse.com.tr/api/invoice/create.php" \
  -H "X-API-Key: af_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_name": "Ahmet Yılmaz",
    "customer_email": "ahmet@example.com",
    "tax_rate": 18,
    "items": [
      {"name": "Web Tasarım", "quantity": 1, "unit_price": 5000},
      {"name": "SEO", "quantity": 3, "unit_price": 500}
    ],
    "send_to_email": true,
    "return_html": false
  }'

🌤️ Hava Durumu

GET /api/weather/current.php 1 kredi
# Şehir adıyla
curl "https://apiverse.com.tr/api/weather/current.php?city=Istanbul" -H "X-API-Key: af_key"

# Koordinatlarla
curl "https://apiverse.com.tr/api/weather/current.php?lat=41.01&lon=28.97" -H "X-API-Key: af_key"

🕐 Anlık Saat

GET /api/v1/?route=time/current 1 kredi
curl "https://apiverse.com.tr/api/v1/?route=time/current&timezone=Europe/Istanbul" -H "X-API-Key: af_key"
// {"success":true,"timezone":"Europe/Istanbul","datetime":"2025-04-08 15:30:22","time":"15:30:22",...}

💱 Döviz Kurları

GET /api/v1/?route=currency/rates 1 kredi
curl "https://apiverse.com.tr/api/v1/?route=currency/rates&base=TRY" -H "X-API-Key: af_key"

🗺️ IP Sorgulama

GET /api/v1/?route=ip/lookup 1 kredi
curl "https://apiverse.com.tr/api/v1/?route=ip/lookup&ip=8.8.8.8" -H "X-API-Key: af_key"

📊 QR Kod

GET /api/v1/?route=qr/generate 1 kredi
curl "https://apiverse.com.tr/api/v1/?route=qr/generate&text=https://example.com&size=300" -H "X-API-Key: af_key"

🔐 Şifre & Token Üretme

GET /api/v1/?route=password/generate 1 kredi
# length=16, count=5 şifre
curl "https://apiverse.com.tr/api/v1/?route=password/generate&length=16&count=5&symbols=1" -H "X-API-Key: af_key"

Hata Kodları

KodAçıklama
401API anahtarı geçersiz veya eksik
402Yetersiz kredi
403Hesap askıya alınmış
404Kaynak bulunamadı
429Rate limit aşıldı
500Sunucu hatası