Patron Reading History

Get Patron Reading History Count

GET /api/.../patrons/{id}/readinghistory?countOnly={countOnly}

Return the number of reading history records associated with the patron.

Required Permissions

Permission IDs found here.

Name
AccessPatronServices_Allow
PatronStatus_Access

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.
countOnly Boolean Yes Return the number of reading history records associated with the patron. Value must be set to True.

Response Information

Example
application/json, text/json
1

HTTP Response Codes

Code Description
200 OK. Success

List Patron Reading History

GET /api/.../patrons/{id}/readinghistory

Returns list of all reading history records associated with the patron.

GET /api/.../patrons/{id}/readinghistory?startIndex={startIndex}&numRecords={numRecords}

Returns a "paginated" list of reading history records associated with the patron.

Required Permissions

Permission IDs found here.

Name
AccessPatronServices_Allow
PatronStatus_Access
PatronStatus_DisplayReaderServices

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.
startIndex Integer No Position to start record retrieval. When set to -1, return ALL records.
numRecords Integer No Number of records to return. Ignored when startIndex is set to -1.

Listing Response Information

Example List
application/json, text/json
[
  {
    "ItemRecordID": 1,
    "IsDeleted": true,
    "Title": "sample string 1",
    "BrowseTitleNonFilingCount": 0,
    "Author": "sample string 2",
    "Format": "sample string 3",
    "DateCheckedOut": "2013-03-01T10:15:48.7459162-05:00",
    "LoaningLibrary": "sample string 5",
    "Rating": 1,
    "Notes": "sample string 6",
    "FormatID": 64,
    "BibliographicRecordID": 1,
    "DisplayInPAC": true,
    "TitleRatingID": 1,
    "PatronReadingHistoryID": 8
  },
  {
    "ItemRecordID": 1,
    "IsDeleted": false,
    "Title": "sample string 1",
    "BrowseTitleNonFilingCount": 0,
    "Author": "sample string 2",
    "Format": "sample string 3",
    "DateCheckedOut": "2013-03-01T10:15:48.7459162-05:00",
    "LoaningLibrary": "sample string 5",
    "Rating": 1,
    "Notes": "sample string 6",
    "FormatID": 64,
    "BibliographicRecordID": 1,
    "DisplayInPAC": true,
    "TitleRatingID": 1,
    "PatronReadingHistoryID": 8
  },
  {
    "ItemRecordID": 1,
    "IsDeleted": false,
    "Title": "sample string 1",
    "BrowseTitleNonFilingCount": 0,
    "Author": "sample string 2",
    "Format": "sample string 3",
    "DateCheckedOut": "2013-03-01T10:15:48.7459162-05:00",
    "LoaningLibrary": "sample string 5",
    "Rating": 1,
    "Notes": "sample string 6",
    "FormatID": 64,
    "BibliographicRecordID": 1,
    "DisplayInPAC": true,
    "TitleRatingID": 1,
    "PatronReadingHistoryID": 8
  }
]

HTTP Response Codes

Code Description
200 OK. Success

Delete Patron Reading History Item(s)

PUT /api/.../patrons/{id}/readinghistory?action=remove

Delete one or more patron reading history items.

Request Information

Parameters
Name Type Required Description
id int Yes Define this parameter in the request route. The unique id assigned to the patron.
action string No Define this parameter in the request query string. Possible value is 'remove'
Request Body

Provide a JSON array of integers. This is the list of reading history IDs.

Property Type Nullable Description
PatronReadingHistoryID Integer No Reading history identifier.
Example
application/json, text/json
[65116,65113,65115,65120,65117,65114]

Delete Response Information

If successful, the count of the number of reading history items deleted is returned.

Example Response
application/json, text/json
6

Required Permissions

Permission IDs found here.

Name
AccessPatronServices_Allow
PatronStatus_Access
PatronStatus_RemoveORSPatronReadingHistoryRequired when deleting reading history for an Outreach Services type of patron.
PatronStatus_RemoveNonORSPatronReadingHistoryRequired when deleting reading history for a non-Outreach Services patron.

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE. Invalid reading history ID for supplied patron ID or reading history ID not found
404 FAILURE. Invalid patron ID specified
409 CONFLICT. Patron record is secured.