페이로드 구조
Webhook과 연동으로 전송되는 JSON 페이로드 구조를 이해하세요.
기본 페이로드
모든 Webhook 페이로드에는 이 기본 필드가 포함됩니다. 도서, 세션, 서재 객체는 이벤트 유형에 따라 포함됩니다.
{
"eventType": "session.completed",
"timestamp": "2024-12-04T10:30:00Z",
"book": { ... },
"session": { ... },
"shelf": null,
"metadata": null
}eventType이 알림을 트리거한 이벤트 유형 (예: session.completed)timestamp이벤트가 발생한 시점의 ISO 8601 형식 타임스탬프metadata선택적 추가 데이터 (현재는 null, 향후 사용을 위해 예약)도서 객체
도서 관련 이벤트와 세션 이벤트에 포함됩니다. 도서 정보가 포함됩니다.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "The Great Gatsby",
"authors": ["F. Scott Fitzgerald"],
"pages": 180,
"currentPage": 180,
"status": "finished",
"isbn": "9780743273565",
"progressPercentage": 100
}| 필드 | 유형 | 설명 |
|---|---|---|
id | string | 도서의 고유 식별자 (UUID) |
title | string | 도서 제목 |
authors | string[] | 저자명 배열 |
pages | number | 도서의 총 페이지 수 |
currentPage | number | 현재 읽은 위치 (페이지 번호) |
status | string | 독서 상태 (to_read, reading, finished, abandoned) |
isbn | string? | 가능한 경우 ISBN 번호 (선택 사항) |
progressPercentage | number | 독서 진행률 (0-100) |
세션 객체
세션 이벤트에 포함됩니다. 독서 세션 정보가 포함됩니다.
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"startedAt": "2024-12-04T10:05:00Z",
"endedAt": "2024-12-04T10:30:00Z",
"status": "completed",
"durationMinutes": 25,
"pagesRead": 42
}| 필드 | 유형 | 설명 |
|---|---|---|
id | string | 세션의 고유 식별자 (UUID) |
startedAt | string | 세션 시작 시 ISO 8601 타임스탬프 |
endedAt | string? | 세션 종료 시 ISO 8601 타임스탬프 (활성 시 null) |
status | string | 세션 상태 (active, paused, completed) |
durationMinutes | number | 세션 지속 시간 (분) |
pagesRead | number | 이 세션 중 읽은 페이지 수 |
서재 객체
서재 관련 이벤트에 포함됩니다. 서재 정보가 포함됩니다.
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "Favorites",
"icon": "star.fill",
"bookCount": 12
}| 필드 | 유형 | 설명 |
|---|---|---|
id | string | 서재의 고유 식별자 (UUID) |
name | string | 서재 이름 |
icon | string? | 서재 아이콘의 SF Symbol 이름 (선택 사항) |
bookCount | number | 이 서재에 있는 도서 수 |
상태 값
도서 상태
to_readreadingfinishedabandoned
세션 상태
activepausedcompleted