Proje: Okul.com.tr CRM · Hub: Okul.com.tr CRM — Architecture

Backend Endpoint Referansı

/admin/schools

Filterlar

filter[school-id]           → integer
filter[campus-id]           → integer
filter[customer-id]         → integer
filter[college-id]          → integer
filter[location-1]          → integer (il)
filter[location-2]          → integer (ilçe)
filter[location-3]          → integer (mahalle)
filter[type-id]             → integer
filter[sector-id]           → integer
filter[school-name]         → string (LIKE)
filter[status]              → integer (1=Aktif, 2=Pasif, 3=Silindi, 4=Yönlendirildi)
filter[trashed]             → 'with' | 'only'
filter[search]              → string (global)
filter[school-closed-id]    → string array
filter[mernis-address-code] → string

Sort Alanları

school-id, school-name, status

Include’lar

type, sector, college, redirect, customer, campus, location, location.province, location.neighbourhood, location.county, contacts, contacts.type, kindergarten, high-school, high-school.type, facilities, services, learning-languages, activities, activities.activity-type, shifts, fees, answers, answers.question, tags, features, features.values, features.school-types

Özel Endpoint

GET /admin/schools/churn-risky — Churn risk okullar


/admin/school-content/announcements

Filterlar

filter[id]              → integer
filter[search]          → string (title, school adı, creator adı)
filter[is_active]       → boolean
filter[show_homepage]   → boolean
filter[school_ids][]    → integer array
filter[starts_on]       → date (Y-m-d)

Sort Alanları

id, title, sort, created_by, created_at, updated_at

Include’lar

creator, schools, publishedHomePageSchool, contentSchools, announcementMedia

Özel Endpoint

PATCH /admin/school-content/announcements/{id}/show-home-page Body: { school_id: int, show_home_page: bool }


/admin/school-content/events

Filterlar (Announcement ile aynı)

filter[id], filter[search], filter[show_homepage]
filter[is_active], filter[school_ids][], filter[starts_on]

Include’lar

creator, schools, contentSchools, eventMedia, eventMedias

Not: Route parametre adı {announcement} — model aynı.


/admin/school-content/achievements

Filterlar (Announcement ile aynı, starts_on YOK)

filter[id], filter[search], filter[show_homepage]
filter[is_active], filter[school_ids][]

Include’lar

creator, schools, contentSchools, achievementMedia, achievementMedias


/admin/articles

Filterlar

filter[id]          → integer
filter[title]       → string
filter[slug]        → string
filter[home-page]   → boolean
filter[on-related]  → boolean
filter[sorting]     → integer
filter[view_count]  → integer
filter[user]        → integer (user ID)
filter[category]    → integer (category ID)
filter[school-type] → integer (school type ID)
filter[location]    → integer (location ID)
filter[trashed]     → 'with' | 'only'

Sort Alanları

id, name, sorting, view_count, created_at

Include’lar

category, location, schoolType, user

Kritik Not: Frontend category_id filtre adını kullanıyor ama API filter[category] bekliyor → filterKeyMappings ile çözülmüş: { category_id: 'category', school_type_id: 'school-type' }


/admin/article-comments

Filterlar

filter[id]          → integer
filter[article_id]  → integer
filter[user_id]     → integer (nullable)
filter[user_type_id]→ integer (nullable)
filter[status]      → '0' | '1' (nullable — '0'=reddedildi, '1'=onaylandı)
filter[approved_by] → integer (nullable)
filter[trashed]     → 'with' | 'only'

Sort Alanları

id, article_id, user_id, status, created_at

Include’lar

article, user, user-type, approved-by

Özel Endpoint’ler

PATCH /admin/article-comments/{id}/approve  (body: {})
PATCH /admin/article-comments/{id}/reject   (body: {})

/admin/school-comments

Filterlar

filter[id]                  → integer
filter[user_id]             → integer (nullable)
filter[school_id]           → integer (nullable)
filter[sector_id]           → integer (nullable)
filter[school_type_id]      → integer (nullable)
filter[user_type_id]        → integer (nullable)
filter[city_id]             → integer (nullable)
filter[district_id]         → integer (nullable)
filter[status]              → boolean (nullable)
filter[is_customer]         → boolean (nullable)
filter[is_replied_comments] → boolean (nullable)
filter[comment_rate]        → '1'|'2'|'3'|'4'|'5'
filter[school_ids][]        → integer array
filter[date_range][min]     → date (Y-m-d)
filter[date_range][end]     → date (Y-m-d)  ← NOT: [end] not [max]!
filter[search]              → string (nullable)
nulls[]                     → array (ör: 'school_comments.status')
not_nulls[]                 → array (ör: 'school_comments.replied_id')

Sort Alanları

id, school_id, status, created_at, comment_rate

Include’lar

reply, parent, school, approvingUser

Özel Endpoint’ler

PATCH /admin/school-comments/{id}/approve  (body gerekli)
PATCH /admin/school-comments/{id}/reject   (body gerekli)

Not: store action’ı YOKTUR — school-comments oluşturulamaz (API’den).


/admin/sales-campaigns

Filterlar

filter[id]                  → integer
filter[code]                → string
filter[name]                → string
filter[status]              → 'active' | 'inactive'
filter[start_date]          → date
filter[end_date]            → date
filter[date_between][min]   → date
filter[date_between][max]   → date
filter[search]              → string (code ve name'de arama)
filter[trashed]             → 'with' | 'only'

Sort Alanları

id, code, name, status, start_date, end_date, created_at


/admin/users

Filterlar

filter[name]            → string
filter[first_name]      → string
filter[last_name]       → string
filter[email]           → string
filter[username]        → string
filter[customer_id]     → integer (exact)
filter[user_type_id]    → integer (exact)
filter[is_active]       → boolean
filter[is_member]       → boolean
filter[phone]           → string (LIKE, user_details'dan)
filter[phone2]          → string (LIKE, user_details'dan)
filter[trashed]         → 'with' | 'only'

Sort Alanları

id, customer_id, user_type_id, created_at, created_with, updated_at

Include’lar

customers, contacts, userDetail