• Register

Penguin Random House Developer Blog

RSS Feed

Enhanced API v1.3.22 released

On Tuesday September 18, 2018, version 1.3.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.3.22 release notes

This version includes a couple of changes to how keywords are ingested for PRH.com as well as rules around how the 'keyword' doc type is returned from Solr by the /search and /search/predictive endpoints.

We added support for the preferExport parameter to the /works/views/sales-display view.

Consumers of Australian data can now get back data from the /retaillinks sub-resource of /titles.

/domains/PRH.AU/titles/9780091816667/retaillinks
  "data": {
    "retailLinks": [
      {
        "description": "iBooks",
        "displayName": "iBooks",
        "isbn": 9780091816667,
        "url": "http:\/\/itunes.apple.com\/au\/book\/isbn9780091816667?at=10l7iN&ct=Prhwebsite",

 

Bug

Task

  • [RHAPI-1010] - Implement preferExport logic in the sales-display view
  • [RHAPI-1035] - Add AU retail links
  • [RHAPI-1049] - Add description text to response data for docType keyword in predictive search
  • [RHAPI-1050] - Ingest the keyword date into Solr timestamp

Sub-Task

  • [RHAPI-1052] - Order predictive search's keyword query by descending timestamp
  • [RHAPI-1057] - Allow keyword search to order by descending timestamp

Enhanced API v1.3.21 released

On Wednesday August 1, 2018, version 1.3.21 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.3.21 release notes

As was announced previously on this blog, the major change with this release is how certain Work attributes are derived. In general, attributes such as title and onsale for any Work representation are now pulled from the "frontlistiest" ISBN rather than strictly the oldest one. In addition, we've added a new data element to the Work representation called firstOnsale which exposes the same date that previously had been used to populate onsale.

/domains/PRH.US/works/335003

    "works": [
      {
        "workId": 335003,
        "title": "The Sum of All Fears",
        "author": "Tom Clancy",
        "onsale": "2018-06-05",
        "language": "E",
        "seoFriendlyUrl": "\/books\/335003\/the-sum-of-all-fears-by-tom-clancy",
        "contribRoleCode": null,
        "contribRoleDesc": null,
        "seriesNumber": null,
        "firstOnsale": "2002-05-07",

Additionally, a change was made to the PEEPS view that exposes the contributor role as part of the authors array.

/domains/PRH.US/titles/9781594482564/views/peeps

    "authors": [
      {
        "code": "26961",
        "description": "George Saunders",
        "roleCode": "A"
      }
    ],

Change

  • [RHAPI-1017] - Author Role Code Needed in PEEPS listTitle view

Bug

  • [RHAPI-1013] - /views/author-display triggers error 500 in TST

Task

  • [RHAPI-1006] - Add FIRST_ONSALEDATE to Work epresentation
  • [RHAPI-1007] - Modify SQL to fetch WORK attribute columns from WORKxWEBDOMAIN_COMPUTED

Changes to how work attributes are derived

On or around August 1, 2018, we will be changing how work attributes are derived. Currently we pull the title, author, on-sale date and language from the oldest, saleable ISBN but will be changing to instead use the "frontlistiest" ISBN as the basis for these attributes.

The current plan is make these changes in our TST environment on July 16, 2018 and then go to PRD the week of July 30, 2018. If you would like to review the impact of these changes prior to the go-live date and do not have access to the TST environment, please contact API support.

More information on these changes can be found on the JIRA ticket RHAPI-1003.

Example data

In the discussion below, I'll be referring to work #168191, The Immortal Life of Henrietta Lacks. It has six ISBNs associated with it published on three different dates.

+---------------+-------------------------------------------------------------+------------+-------------+-----+
| ean           | titleweb                                                    | onsaledate | format_code | seq |
+---------------+-------------------------------------------------------------+------------+-------------+-----+
| 9780804190107 | The Immortal Life of Henrietta Lacks (Movie Tie-In Edition) | 2017-04-04 | TR          |   1 |
| 9781400052189 | The Immortal Life of Henrietta Lacks                        | 2011-03-08 | TR          |   2 |
| 9781400052172 | The Immortal Life of Henrietta Lacks                        | 2010-02-02 | HC          |   3 |
| 9780307589385 | The Immortal Life of Henrietta Lacks                        | 2010-02-02 | EL          |   4 |
| 9780451486318 | The Immortal Life of Henrietta Lacks                        | 2015-11-10 | CD          |   5 |
| 9780307712516 | The Immortal Life of Henrietta Lacks                        | 2010-02-02 | DN          |   6 |
+---------------+-------------------------------------------------------------+------------+-------------+-----+

How it has worked

Currently, work attributes are taken from the oldest, saleable title. In the case of work #168191, that means ISBN #9781400052172, the HC published on Feb 2, 2010 is selected. We can see these values returned from the API if we fetch the details of work #168191.

/domains/PRH.US/works/168191

  "data": {
    "works": [
      {
        "workId": 168191,
        "title": "The Immortal Life of Henrietta Lacks",
        "author": "Rebecca Skloot",
        "onsale": "2010-02-02",
        "language": "E",
        "seoFriendlyUrl": "/books/168191/the-immortal-life-of-henrietta-lacks-by-rebecca-skloot",

How it will work

Going forward, we will instead be using the "frontlistiest" ISBN as the basis for these work attributes. In the case of work #168191, that means using ISBN #9780804190107, the paperback published on April 4, 2017. Therefore the title of the work will change from "The Immortal Life of Henrietta Lacks" to "The Immortal Life of Henrietta Lacks (Movie Tie-In Edition)" and the onsale will change from "2010-02-02" to "2017-04-04".

Preserving the original on-sale date

In order to not lose the information of when a work was originally published, we are adding a new element to the Work representation called firstOnsale. This will be populated with the same rules that are used to currently populate the onsale value of a work. So in our example above, firstOnsale would be "2010-02-02".

Here is the full updated record as it will appear after we make these changes live.

/domains/PRH.US/works/168191

  "data": {
    "works": [
      {
        "workId": 168191,
        "title": "The Immortal Life of Henrietta Lacks (Movie Tie-In Edition)",
        "author": "Rebecca Skloot",
        "onsale": "2017-04-04",
        "firstOnsale": "2010-02-02",
        "language": "E",
        "seoFriendlyUrl": "/books/168191/the-immortal-life-of-henrietta-lacks-movie-tie-in-edition-by-rebecca-skloot",

Enhanced API v1.3.20 released

On Monday July 2, 2018, version 1.3.20 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.3.20 release notes

This is a minor release that fixes a bug with the recently add orClause parameter. As originally implemented, it was not possible to put the same filter parameter into two separate orClause values. With this fix, you can now issue a request such as:

orClause={"productLine":["D16"]}&orClause={"productLine":["D13"],"productType":["DCG","DBU"]}

and it will generate SQL such as:

WHERE ((t.productline IN ('D16')) OR (t.productline IN ('D13') AND t.producttype IN ('DCG','DBU')))

Note that the orClause values need to be URL encoded and are shown here without encoding to make it easier to ready. Encoded, the URL parameters would actually look like:

orClause=%7B%22productLine%22%3A%5B%22D16%22%5D%7D&orClause=%7B%22productLine%22%3A%5B%22D13%22%5D%2C%22productType%22%3A%5B%22DCG%22%2C%22DBU%22%5D%7D 

Bug

  • [RHAPI-991] - orClause does not permit the same parameter to be used in separate clauses

New Feature

Enhanced API v1.3.19 released

On Wednesday June 13, 2018, version 1.3.19 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.3.19 release notes

This release fixes a couple of issues with POST requests. We fixed a bug where a JSON body with an unrecognized attriute was silently ignored and no warning or error was reported. Making a POST request that is not understood will now generate an HTTP 400. We also were requiring a different format for the on-sale data parameters in the POST body (i.e. '2018-06-13') than we were in GET parameters (i.e. '06/13/2018'). We've improved this so that the POST can now accept either date format though the GET still requires the 'M/D/Y' construction.

We also added a new parameter minAffinity for the /works/views/also-purchased view that adds a WHERE-clause filter of the form cp.affinity >= :minAffinity.

Bug

  • [RHAPI-759] - Different date formats expected in GET vs. POST
  • [RHAPI-972] - Passing unrecognized POST body elements is silently ignored
  • [RHAPI-974] - Missing display of price
  • [RHAPI-977] - Change mapIstcaWorks to work in the absence of author record
  • [RHAPI-978] - getWork returns data when no WORKxWEBDOMAIN_ISBNS record exists
  • [RHAPI-979] - POST with onSaleFrom and onSaleTo uses wrong time zone

New Feature

  • [RHAPI-982] - Add Affinity parameter to copurchase endpoints

Task

  • [RHAPI-961] - Expose the name of the host in /healthy
  • [RHAPI-967] - Add SQL call tracking to /works sales display view

Enhanced API v1.3.18 released

On Thursday May 31, 2018, version 1.3.18 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.3.18 release notes

There were three changes with this release. We fixed a bug that came up in TDS testing where sometimes the TI sheet content fields (keynote and positioning) were displaying as empty strings rather than NULLs. We also removed support for sort=seq in the /awards endpoint because the AWARDATTR column of the ISBNxAWARD table is no longer maintained by MyHouse.

Finally, we added support for embedding Title objects in requests made to the /events endpoint.

Bug

  • [RHAPI-956] - Return null when ISBNxMAIN long text values return empty strings

New Feature

  • [RHAPI-966] - Add support to /events for embedding Title objects

Task

  • [RHAPI-958] - Remove any references to ISBNxAWARD.AWARDATTR

Enhanced API v1.3.17 released

On Thursday May 24, 2018, version 1.3.17 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.3.17 release notes

This release contains two changes. The first, modifies the sort in the /works/views/sales-display view to fix a bug with pagination.

The second adds a new filter parameter named showOmni which takes either 'true' or 'false' and activates a WHERE-clause in the generated SQL that tests the TITLE.OMNI column for either 'Y' or NULL.

Bug

  • [RHAPI-963] - Work query for sales display view must have secondary sort by work ID

Task

Enhanced API v1.3.16 released

On Friday May 11, 2018, version 1.3.16 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.3.16 release notes

This version fixes a bug in the /titles/{isbn}/views/also-purchased view where an exception was being generated if the supplied ISBN was not found.

A change was made for the PEEPS project where the representation of categories was modified in the /titles/{isbn}/views/peeps view. We also added the titleBlock element to the /titles/views/istca view and the parameter cacheVersion was whitelisted so that it would not cause an "unknown parameter" warning.

Bug

  • [RHAPI-945] - /titles/{isbn}/views/also-purchased generating NPE when the ISBN is not available

Task

  • [RHAPI-942] - Modifications to the PEEPS APi
  • [RHAPI-947] - Add cacheVersion to the list of allowed parameter names in an API request.
  • [RHAPI-950] - Add ISBN_BLOK to /titles/views/istca representation

Enhanced API v1.3.15 released

On Monday May 7, 2018, version 1.3.15 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.3.15 release notes

This release fixes a couple of bugs introduced in 1.3.14. First, we addressed a record count issue with the sales display view. Second, we fixed an issue with the /titles endpoint (and its views such as /titles/views/list-display) where multiple ISBNs supplied as parameters were not being returned in the correct order.

Bug

  • [RHAPI-938] - Record count is not updated in test API according to the items count
  • [RHAPI-941] - GetTitleViewListDisplay Sorting Issue

Enhanced API v1.3.14 released

On Wednesday May 2, 2018, version 1.3.14 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.3.14 release notes

This version includes a new feature for PRH.com where multiple sort and dir parameters may be supplied to generated additional ORDER BY clause entries.

We also added a new endpoint /works/views/also-purchased which mimics /works/{workId}/views/also-purchased except that it can take multiple workId or isbn parameters. A companion to that, /works/views/also-purchased-by-category, performs an indentical query with the only difference being that it executes the request separately for each catUri supplied and returns a map of responses, one for each category. See ticket RHAPI-922 for more details.

And finally, a reworking of the query behind the /works/views/sales-display view fixes some problems that had been reported with it previously.

Bug

  • [RHAPI-921] - /views/sales-display - Sort not properly applied when start/rows parameters are used
  • [RHAPI-931] - After adding filter parameter for Top-Selling in test API endpoint, Record count is not giving correct count
  • [RHAPI-937] - Errors reported in listImprints

New Feature

  • [RHAPI-914] - Implement second-level sorting on API results
  • [RHAPI-922] - Ability to pull copurchase data from multiple ISBNs and screen by category
  • [RHAPI-932] - Add support for the showCovers=true parameter for /series/???/views/series-display

[ Previous | Page 2 of 7 | Next ]