• Register

Penguin Random House Developer Blog

Enhanced API v1.3.24 released

On Thursday December 6, 2018, version 1.3.24 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.24 release notes

The most significant change in this release is around the behavior of the parameters workOnSaleFrom and workOnSaleTo. When we changed how work attributes are derived, we changed how we define the on-sale date that is associated with a work using the date of its frontlisiest (or representative) ISBN rather than the earliest on-sale of any of its ISBNs. At that time of that change, we left the behavior of the parameters workOnSaleFrom and workOnSaleTo as they were, testing against the earliest on-sale date of a work rather than the frontlistiest. But that policy did not make sense given the names of those parameters and so with this release, we are aligning the parameters to test against the on-sale date of the representative ISBN of the work rather than the earliest on-sale date. To enable people to continue to use the functionality of being able to test against the earliest on-sale date (such as in cases where it is being used to identify works that have been newly released), we have added two new parameters workFirstOnSaleFrom and workFirstOnSaleTo which can be used instead.

Also in this release, we've added a new endpoint for internal clients only that exposes sales assets. The endpoint can be accessed as /titles/{isbn}/sales-assets and returns data from the MYH_SA table in MyHouse.

/domains/PRH.US/titles/9781601425621/sales-assets

    "salesAssets": [
      {
        "fileId": 13,
        "ean": 9781601425621,
        "assetCode": "COVERIMAGE",
        "assetSeq": 0,
        "fileName": null,
        "fileNameOrig": "9781601425621.jpg",
        "fileNote": null,
        "family": false,
        "dropin": false,
        "mti": false,
        "saleskit": true,
        "ecatalog": true,
        "watermark": true,
        "boxFile": {
          "fileId": "10469712563",
          "folderId": null,
          "etag": "2",
          "size": "1129891",
          "sha1": "d359af6f1691425f638c3635af708468da8e7ae9",
          "downloadUrl": "https:\/\/randomhouse.box.com\/shared\/static\/lc71yabh08s5klne4uye.jpg",
          "_embeds": null,
          "_links": [
            
          ]
        },
        "_embeds": null,
        "_links": [
          
        ]
      }
    ],

We also resolved a couple of bugs, one where we were displaying too few events in the /events endpoint and another where the representative element in the /works/views/list-display endpoint was not always correct if the preferLanguage parameter was specified.

Bug

  • [RHAPI-1111] - Rename EAN element to ISBN in PEEPS view
  • [RHAPI-1116] - Author events missing from /events
  • [RHAPI-1117] - onSaleTo parameter returns works with on sale dates farther in future.
  • [RHAPI-1122] - Representative ISBN not correct when preferLanguage supplied

Task

  • [RHAPI-1088] - Create internal endpoint for sales assets