Proje: Okul B2B App · Hub: Okul B2B App — Architecture
API Endpoint Listesi
Base URL: https://api.okul.com.tr (production) / https://api.okul.work (Expo Go dev)
Auth
| Method | Endpoint | Açıklama |
|---|
| POST | /auth/login | Email+şifre veya OTP doğrulama |
| POST | /auth/otp | SMS kodu gönder |
| POST | /auth/logout | Çıkış |
| POST | /auth/refresh | Token yenile |
| POST | /change-password | Şifre değiştir |
Firma & Okul
| Method | Endpoint | Açıklama |
|---|
| GET | /customer/me/firms | Kullanıcının firmaları |
| GET | /customer/{id}/schools | Firmanın okulları |
Leads
| Method | Endpoint | Açıklama |
|---|
| GET | /customer/leads | Lead listesi (sayfalı) |
| GET | /customer/leads/{id} | Lead detayı |
| PATCH | /customer/leads/{id} | Lead güncelleme |
Notlar
| Method | Endpoint | Açıklama |
|---|
| GET | /customer/notes?cid={}&lead_id={} | Lead notları |
| POST | /customer/notes | Not ekle |
| PUT | /customer/notes/{id} | Not güncelle |
| DELETE | /customer/notes/{id} | Not sil |
Medya (Galeri)
| Method | Endpoint | Açıklama |
|---|
| GET | /schools/{id}/media | Galeri fotoğrafları (sayfalı) |
| GET | /schools/{id}/media/cover | Kapak fotoğrafı |
| POST | /customer/media | Fotoğraf yükle (FormData) |
| DELETE | /customer/media/{id} | Fotoğraf sil |
| PUT | /customer/media/sort | Sıra güncelle |
| POST | /customer/media/temp | Geçici yükleme |
| POST | /customer/media/move | Geçiciden kalıcıya taşı |
İçerikler
| Method | Endpoint | Pattern |
|---|
| GET | /customer/school-content/{type} | Liste (sayfalı) |
| GET | /customer/school-content/{type}/{id} | Detay |
| POST | /customer/school-content/{type} | Oluştur |
| PUT | /customer/school-content/{type}/{id} | Güncelle |
| DELETE | /customer/school-content/{type}/{id} | Sil |
{type}: announcements | events | achievements
İstatistikler
| Method | Endpoint | Açıklama |
|---|
| GET | /customer/statistics | Dashboard istatistikleri |
Genel Querystring Pattern
?page={n}
&per-page={size} (leads)
&per_page={size} (contents)
&include=rel1,rel2 (veya includes[]= format)
&filter[field]=value
&sort=-created_at (azalan)
&_t={timestamp} (cache bypass)