Main API알림 API
GET /ai/notification
알림 목록 조회
알림 목록 조회
사용자의 알림 목록을 조회합니다.
| 항목 | 값 |
|---|---|
| 메서드 | GET |
| 경로 | /ai/notification |
| 인증 | 필요 |
요청
GET /ai/notification HTTP/1.1
Host: api.glowb.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...curl "https://api.glowb.com/ai/notification" \
-H "Authorization: Bearer {access_token}"const response = await fetch('/ai/notification', {
headers: {
'Authorization': `Bearer ${accessToken}`
}
});
const notifications = await response.json();응답
성공 응답 (200 OK)
[
{
"id": 1,
"title": "새로운 캠페인 신청",
"message": "새로운 크리에이터가 캠페인에 신청했습니다.",
"type": "CAMPAIGN_APPLICATION",
"isRead": false,
"createdAt": "2024-01-15T10:00:00",
"data": {
"campaignId": 123,
"applicantId": "influencer_001"
}
}
]Response 스키마 (NotificationDataDto)
Prop
Type
알림 처리 예시
function handleNotification(notification) {
switch (notification.type) {
case 'CAMPAIGN_APPLICATION':
navigateTo(`/campaigns/${notification.data.campaignId}/applications`);
break;
case 'APPLICATION_SELECTED':
navigateTo(`/my-campaigns/${notification.data.campaignId}`);
break;
case 'CONTENT_FEEDBACK':
navigateTo(`/contents/${notification.data.contentId}/feedback`);
break;
case 'PAYMENT_COMPLETE':
navigateTo(`/payments/${notification.data.paymentId}`);
break;
case 'MESSAGE':
navigateTo(`/chat/${notification.data.senderId}`);
break;
}
}