콘텐츠로 이동

read_notifications (알림 읽음 처리)

알림 ID 리스트를 받아 일괄 읽음 처리합니다.

기본 정보

항목
URL https://asia-northeast3-construction24-test.cloudfunctions.net/read_notifications
Method POST
인증 Firebase ID Token 필요

요청

Body

필드 타입 필수 설명 검증
notification_ids array O 읽음 처리할 알림 ID 리스트 -

요청 예시

{
  "notification_ids": ["notif_id_1", "notif_id_2", "notif_id_3"]
}

응답

성공 (200)

{
  "message": "알림 읽음 처리 완료",
  "fail_list": []
}

실패 항목이 있는 경우

{
  "message": "알림 읽음 처리 완료",
  "fail_list": [
    {
      "notification_id": "notif_id_3",
      "error": "존재하지 않는 알림입니다."
    }
  ]
}

실패

코드 message 원인
403 인증 오류 토큰 없음/만료
500 서버 오류 내부 오류

참고

  • 알림 데이터는 users/{UID}/notifications 컬렉션에 저장됩니다.
  • 이미 읽은 알림(read: true)은 스킵됩니다.
  • 읽음 처리 시 read: true, read_at (서버 타임스탬프)이 기록됩니다.
  • 관련 API: hide_notifications