PratikYedek Public API
PratikYedek REST API; mali müşavir + kurumsal müşterilerin kendi sistemleriyle entegrasyon kurması için sağlanır. Müşavir Pro ve Kurumsal pakette aktif.
Özellikler
- OpenAPI 3.1 uyumlu spec
- Bearer JWT auth (access token RAM'de; refresh HttpOnly cookie)
- Rate-limit: endpoint başına farklı limitler
- KVKK uyumlu: PII alanları log + Sentry/GlitchTip scrub'da
- HTTP/2 + TLS 1.2+ (modern cipher)
Hızlı erişim
- Swagger UI (interactive): api.pratikyedek.com/docs
- OpenAPI JSON: api.pratikyedek.com/docs/json
- OpenAPI YAML: api.pratikyedek.com/docs/yaml
Scalar render (önerilen)
Tam interaktif API referansı için Scalar render sayfasını kullanın:
👉 Scalar API Reference (interaktif) — endpoint listesi, request/response örnekleri, Try-it-out paneli
Auth akışı
bash
# 1. Login → access token + refresh cookie
curl -X POST https://api.pratikyedek.com/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"...","password":"...","totp_code":"123456"}'
# Response:
# { "access_token": "eyJ...", "expires_in": 900 }
# Set-Cookie: pyrefresh=...; HttpOnly; SameSite=strict
# 2. API call → Authorization: Bearer
curl https://api.pratikyedek.com/v1/snapshots \
-H "Authorization: Bearer eyJ..."
# 3. Token yenileme → /auth/refresh (cookie ile)
curl -X POST https://api.pratikyedek.com/v1/auth/refresh \
-H "Cookie: pyrefresh=..."Rate limits
| Endpoint | Limit |
|---|---|
POST /auth/login | 5/dk |
POST /auth/sms-otp/request | 1/dk + 5/saat |
POST /applications | 5/saat (IP) |
GET /snapshots | 60/dk |
POST /snapshots | 10/dk |
GET /v1/admin/* | 60/dk (admin guard) |
SDK (Faz 4 sonrası)
- [ ] Node.js / TypeScript SDK
- [ ] Python SDK
- [ ] Go SDK
- [ ] PHP SDK (mali müşavir entegrasyonları için)
Şu an için fetch / curl / Postman ile manuel REST çağrıları kullanılabilir.
Örnek entegrasyonlar
- Mali müşavir muhasebe yazılımı: günlük otomatik snapshot
- Şirket dosya sunucusu: cron tabanlı yedekleme
- e-Arşiv araç: Foriba GİB iletim sonrası PratikYedek snapshot
Webhooks (Faz 4)
Faz 4'te webhook desteği eklenir:
- snapshot.completed
- subscription.renewed / subscription.failed
- audit.share_created / audit.share_revoked
- mukellef.transferred
Sorun bildirimi
API entegrasyonunda sorun mu yaşıyorsunuz?
- E-posta: api@pratikyedek.com
- GitHub: github.com/btecer/pratikyedek/issues