Penguin Random House Developer Blog
Enhanced API v1.2.22 released
On Friday May 12, 2017, version 1.2.22 of the Enhanced PRH API was released to production. If you encounter any problems with your applications as a result of these changes, please contact us at api@penguinrandomhouse.com.
Version 1.2.22 release notes
This release had three bug fixes. One was to the view /works/{workId}/views/also-in/author
where the seriesList element was not being populated. Another was where the rows parameter was not being respected when a list of isbn values was being passed to the /titles
endpoint and a sort was specified. Finally there was a bug fix that manifested when we tried to release that was related to debugging code not visible to the end user.
There were also various new features introduced with this release. Note that we're a bit inconsistent with our JIRA tickets so some are called Tasks while others are called New Features but really for the purposes of these notes, they are all new features.
First we added a new parameter called showTopselling for the sales sites. This is a boolean filter that is designed specifically for four different sales websites. It has very little general utility because A) it is based on a site-specific query that is run nightly against Netezza to pull sales in certain channels and B) it requires a siteFilter with one of the values:Retail, Christian, Catholic or HomeSchool.
Second, we added some new elements to the /titles response: binding (a code/description object) and editionId. Both are UK-only elements so for US and CA titles, they will be NULL or zero.
"binding": { "code": null, "description": null }, "editionId": 0,
Third, we added two new views to support the ISTCA app: /works/views/istca
and /titles/views/istca
.
/domains/PRH.US/works/views/istca?workId=50612
{ "status": "ok", "recordCount": 1, "startTimestamp": "2017-05-16T08:43Z", "endTimestamp": "2017-05-16T08:43Z", "timeTaken": 8, "data": [ { "workId": 50612, "title": "Dark Places", "author": "Gillian Flynn", "coverUrl": "https://images.randomhouse.com/cover/9780307341570", "earliestOnSale": "2009-05-05", "formats": [ "DN", "CD", "EL", "TR" ], "divisions": [ "Crown/Archetype", "Audio" ] } ], "error": null, "params": { "domain": "PRH.US", "workId": "50612", "clientGroup": "Public" } }
/domains/PRH.US/titles/views/istca?isbn=9780307341570
{ "status": "ok", "recordCount": 1, "startTimestamp": "2017-05-16T08:46Z", "endTimestamp": "2017-05-16T08:46Z", "timeTaken": 5, "data": [ { "isbn": 9780307341570, "isbnHyphenated": "978-0-307-34157-0", "workId": 50612, "title": "Dark Places", "author": "Gillian Flynn", "onSaleDate": "2010-05-04", "exportOnSaleDate": null, "format": "Trade Paperback", "subformat": null, "binding": null, "trim": "5-3/16 x 8", "edition": "0", "price": 15.00, "coverUrl": "https://images.randomhouse.com/cover/9780307341570", "seq": null } ], "error": null, "params": { "isbn": "9780307341570", "domain": "PRH.US", "clientGroup": "Public" } }
Finally, we added a new view for the sales sites called /works/views/sales-display that performs a number of different queries under the hood to return Title objects (the same as /titles) but with the cardinality of /works. It uses logic to select a representative ISBN that satisfies all of the supplied criteria and then either considers frontlistiest ordering or topselling order (same as showTopselling above) to select which ISBN is representative within the work.
/domains/SALESPLATFORM/works/views/sales-display?catUri=/art-techniques&catSetId=S1&siteFilter=Retail
Bug
- [RHAPI-661] - /works/#####/views/also-in/author endpoint does not return seriesList data
- [RHAPI-672] - Titles request to the API returning more than I expected
- [RHAPI-684] - Error produced by author display view
New Feature
- [RHAPI-675] - Add showTopselling filter parameter
- [RHAPI-678] - Add TITLE fields binding and edition_id
0 Comments
Please sign in to post a comment.