Skip to main content

RecordReadingSessionsResponse

The outcome of recording a batch.

Never fails wholesale for a bad entry: an unknown book is an ordinary consequence of syncing after a deletion, and it must not block the rest of a client's queued reading from being accepted.

acceptedstring<uuid>[]required

Ids that are now in the log. Includes ids that were already present, so a client can clear its outbox on either outcome.

progress object[]required

Current progress for every book touched by an accepted session, so the client can reconcile immediately without a second round trip.

  • Array [
  • bookIdstring<uuid>required

    Book ID

    Example: 550e8400-e29b-41d4-a716-446655440002
    completedbooleanrequired

    Whether the book is completed

    Example: false
    completedAtstring,null<date-time>nullable

    When the book was completed (if completed)

    Example: 2024-01-20T20:00:00Z
    currentPageinteger<int32>required

    Current page (1-indexed)

    Example: 42
    idstring<uuid>required

    Progress record ID

    Example: 550e8400-e29b-41d4-a716-446655440000
    progressPercentagenumber,null<double>nullable

    Progress as a percentage (0.0-1.0) For EPUBs, this is the stored percentage from reflowable content For other formats, this is calculated from current_page / total_pages

    Example: 0.45
    startedAtstring<date-time>required

    When reading started

    Example: 2024-01-10T14:30:00Z
    updatedAtstring<date-time>required

    When progress was last updated

    Example: 2024-01-15T18:45:00Z
    userIdstring<uuid>required

    User ID

    Example: 550e8400-e29b-41d4-a716-446655440001
  • ]
  • rejected object[]required

    Entries that were not recorded.

  • Array [
  • idstring<uuid>required

    The submitted session's id.

    Example: 550e8400-e29b-41d4-a716-446655440000
    reasonReadingSessionRejectionReason (string)required

    Why it was rejected.

    Possible values: [book_not_found, invalid_time_range, invalid_percentage, invalid_measurement, duplicate_in_batch]

  • ]
  • RecordReadingSessionsResponse
    {
    "accepted": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "progress": [
    {
    "bookId": "550e8400-e29b-41d4-a716-446655440002",
    "completed": false,
    "completedAt": "2024-01-20T20:00:00Z",
    "currentPage": 42,
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "progressPercentage": 0.45,
    "startedAt": "2024-01-10T14:30:00Z",
    "updatedAt": "2024-01-15T18:45:00Z",
    "userId": "550e8400-e29b-41d4-a716-446655440001"
    }
    ],
    "rejected": [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "reason": "book_not_found"
    }
    ]
    }