Proje: Okul B2B App · Hub: Okul B2B App — Domain

Bildirim API Yapısı

ApiNotification (API response)

{
  id: string;             // UUID (string, NOT number!)
  type?: string;
  title: string;
  body?: string;          // API 'body' kullanır (message değil)
  message?: string;       // Legacy field
  data?: Record<string, any>,
  params?: {
    customer_id, lead_id, comment_id, school_id, user_id
  };
  read_at: string | null; // Okundu mu
  created_at: string;
}

Önemli: id string UUID, integer değil.

Notification Permissions

Okul.com.tr’nin özel permission ID’leri:

sms:  permission_id 2484
mail: permission_id 2485
call: permission_id 2486

API Endpointler

GET  /customer/notifications              → bildirim listesi
POST /customer/notifications/mark-as-read → okundu işaretle
GET  /customer/notification-permissions   → izin durumu
PUT  /customer/notification-permissions   → izin güncelle

Okundu İşaretleme

{ notification_ids: string[] }  // UUID array