İçeriğe Geç
API v1 · BETA

API Dokümantasyon

REST API ile 273 sözleşme şablonu, 315 hesaplama aracı ve AI sözleşme analizine erişin.

1. Authentication

Tüm API istekleri Authorization: Bearer scp_YOUR_KEY header'ı gerektirir. Key oluşturmak için Hesabım → API Anahtarlarım sayfasına gidin.

Authentication header bash
curl https://sozlesmecepte.com/api/v1/templates \
  -H "Authorization: Bearer scp_YOUR_KEY"

2. Endpoints

GET/api/v1/templates

Şablonları Listele

273 aktif sözleşme şablonu (kira, iş, NDA, hizmet, ortaklık vb.)

Query parametreleri:

  • categoryKategori filtresi (örn. 'kira', 'is')
  • limitMax 200, default 50
  • offsetPagination offset
Example response json
{
  "data": [
    {
      "slug": "konut-kira-sozlesmesi",
      "name": "Konut Kira Sözleşmesi",
      "category": "Kira & Gayrimenkul",
      "estimated_minutes": 5,
      "question_count": 12,
      "version": "2.1",
      "url": "https://sozlesmecepte.com/sozlesmeler/konut-kira-sozlesmesi"
    }
    // ... 200+ daha
  ],
  "meta": { "total": 273, "limit": 50, "offset": 0 }
}
GET/api/v1/templates/{slug}

Şablon Detayı

Şablonun tüm alanları, soru listesi, placeholder mapping. Bu detayla form oluşturup kullanıcıdan input alabilirsiniz.

Example response json
{
  "slug": "konut-kira-sozlesmesi",
  "name": "Konut Kira Sözleşmesi",
  "questions": [...],
  "placeholders": {...},
  "create_url": "https://sozlesmecepte.com/sozlesmeler/konut-kira-sozlesmesi/olustur"
}
GET/api/v1/calculations

Hesaplama Araçlarını Listele

315 aktif hesaplama aracı (kıdem, ihbar, faiz, KDV, miras, vb.)

Query parametreleri:

  • categoryKategori filtresi
  • limitMax 500
GET/api/v1/calculations/{slug}

Hesaplama Aracı Detayı

Aracın input/output şeması — hangi alanlar zorunlu, format ne, kategori ne

POST/api/v1/calculations/{slug}/compute

Hesaplama Yap

Input gönder, sonucu al. Formula sunucuda güvenli sandbox'ta çalışır.

Example response json
# Request
POST /api/v1/calculations/kidem-tazminati/compute
{
  "inputs": {
    "son_brut_maas": 35000,
    "ise_baslangic": "2020-01-15",
    "is_son": "2026-05-19"
  }
}

# Response
{
  "slug": "kidem-tazminati",
  "tool": "Kıdem Tazminatı Hesaplayıcı",
  "result": {
    "kidem_tutar": 67421.50,
    "hizmet_yili": 6.34,
    "tavan_uygulandi": false
  }
}

3. Rate Limits

TierPer minutePer dayFiyat
Free601.000Ücretsiz
Startup60025.000499 TL/ay
Growth3.000200.0001.999 TL/ay
Enterpriseİletişim

Rate limit aşımında HTTP 429 + X-RateLimit-Limit-Minute header döner.

4. Hata Kodları

{
  "error": {
    "code": "missing_api_key",
    "message": "Authorization: Bearer scp_... header gerekli"
  }
}
  • 401 missing_api_key / invalid_api_key — Key yok veya yanlış
  • 401 revoked_api_key / expired_api_key — Key iptal/sürmüş
  • 403 insufficient_scope — Write endpoint için read-only key
  • 429 rate_limit_minute / rate_limit_day — Limit aşıldı
  • 422 compute_error — Hesaplama input hatası
  • 404 not_found — Kaynak yok
  • 500 internal_error — Sunucu hatası

5. Interactive API Explorer

Aşağıdaki Swagger UI ile API'yi tarayıcıdan deneyebilirsin. "Authorize" → key gir → "Try it out".

OpenAPI 3.1 spec: openapi.yaml · Postman'a import için spec URL'i kullan: https://sozlesmecepte.com/openapi.yaml

Hazır mısın?

İlk key'ini al, 100 ücretsiz istekle başla.

API Key Oluştur