Genel Bilgiler
| Kriter | Değer |
| Base URL | http://<sunucu>:8000/api |
| Veri Formatı | JSON — snake_case alan isimleri |
| Kimlik Doğrulama | Bearer JWT — Authorization: Bearer <token> |
| ID Türü | Büyük tam sayı (bigint) |
| Tarih Formatı | ISO 8601 — YYYY-MM-DDTHH:MM:SSZ |
| Sayfalama | ?page=1&page_size=20 |
Kimlik Doğrulama
POST /api/auth/login/
Body: { "email": "kullanici@sirket.com", "password": "sifre" }
Yanıt:
{
"access": "eyJ...",
"refresh": "eyJ..."
}
# Token yenileme
POST /api/auth/token/refresh/
Body: { "refresh": "eyJ..." }
# Çıkış
POST /api/auth/logout/
Body: { "refresh": "eyJ..." }
Endpoint Grupları
| Grup | Endpoint Öneki |
| Kimlik ve Kullanıcı | /api/auth/, /api/users/ |
| Roller ve Yetkiler | /api/roles/, /api/permissions/ |
| Paketler | /api/packages/ |
| Menü Öğeleri | /api/menu-items/ |
| Organizasyon | /api/organization/units/ |
| Görevler | /api/tasks/ |
| Dinamik Formlar | /api/dynamic/<form_code>/ |
| Form Builder | /api/layout-templates/ |
| E-Fatura | /api/invoices/ |
| Mesajlaşma | /api/messaging/ |
| Dosyalar | /api/files/ |
| Raporlar | /api/reports/ |
| Dokümantasyon | /api/documentation/pages/ |
Dinamik Form Endpoint'leri
# Kayıtları listele (filtreli, sayfalı)
GET /api/dynamic/{form_code}/
?page=1&search=arama&ordering=-created_at
# Yeni kayıt oluştur
POST /api/dynamic/{form_code}/
{ "alan_adi": "değer", ... }
# Kaydı getir
GET /api/dynamic/{form_code}/{id}/
# Kaydı güncelle
PATCH /api/dynamic/{form_code}/{id}/
{ "alan_adi": "yeni_değer" }
# Kaydı sil
DELETE /api/dynamic/{form_code}/{id}/
# Onay akışı durumu
GET /api/dynamic/{form_code}/{id}/workflow/
# Onayla
POST /api/dynamic/{form_code}/{id}/workflow/approve/
{ "comment": "Uygun görüldü" }
# Reddet
POST /api/dynamic/{form_code}/{id}/workflow/reject/
{ "comment": "Revizyon gerekli: ..." }
# Denetim geçmişi
GET /api/dynamic/{form_code}/{id}/audit/
# Aktivite akışı
GET /api/dynamic/{form_code}/{id}/activity/
# Excel içe aktar
POST /api/dynamic/{form_code}/import/
(multipart/form-data: file)
Görev Endpoint'leri
GET /api/tasks/ # Liste
POST /api/tasks/ # Yeni görev
GET /api/tasks/{id}/ # Detay
PATCH /api/tasks/{id}/ # Güncelle
DELETE /api/tasks/{id}/ # Sil
POST /api/tasks/{id}/submit-approval/ # Onaya gönder
POST /api/tasks/{id}/approve/ # Onayla
POST /api/tasks/{id}/reject/ # Reddet
GET /api/tasks/{id}/comments/ # Yorumlar
POST /api/tasks/{id}/comments/ # Yorum ekle
POST /api/tasks/transfer-tasks/ # Görev devri
WebSocket Bağlantısı
# Görev sohbeti
ws://<sunucu>:8000/ws/tasks/{task_id}/{thread_key}/
# Bildirim akışı
ws://<sunucu>:8000/ws/notifications/
# Bağlantı sırasında token gönderme
{
"type": "authenticate",
"token": "eyJ..."
}
Hata Yanıtları
| HTTP Kodu | Anlamı |
| 400 | Geçersiz istek verisi — yanıtta alan bazlı hata mesajları |
| 401 | Kimlik doğrulama gerekli — token eksik veya süresi dolmuş |
| 403 | Yetkisiz erişim — gerekli izin yok |
| 404 | Kayıt bulunamadı |
| 429 | İstek limiti aşıldı |
| 500 | Sunucu hatası |
Swagger UI
Tüm endpoint'lerin interaktif dokümantasyonuna /api/schema/swagger-ui/ adresinden erişebilirsiniz. Her endpoint için örnek istek oluşturabilir ve doğrudan test edebilirsiniz.