• Register

Penguin Random House Developer Blog

Enhanced API v1.2.5 released

On Wednesday June 8, 2016, version 1.2.5 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.5 release notes

Several fields were added to the /works/{workId}/product-display view to support the sales websites. The "format" element got "subname" added; the "contributors" element got "photoCredit" and "photoDate"; and a new element "dimensions" was added with properties "length", "width", "depth", and "grossWeight".

/domains/PRH.US/works/391486/views/product-display

          "format": {
            "code": "MM",
            "name": "Mass Market Paperback",
            "subcode": "PR",
            "subname": "Premium Mass Market",
            "family": "Paperback"
          },
          "contributors": {
            "010-1001": {
              "id": 9834,
              "display": "Pauline Gedge",
              "roleCode": "A",
              "roleName": "Written by",
              "ontour": false,
              "spotlight": "PAULINE GEDGE is the award-winning and bestselling author of thirteen previous novels, ten of which are inspired by Egyptian history. Her first,&#160;<i>Child of the Morning<\/i>, won the Alberta Search-for-a-New-Novelist Competition. In France, her second novel,&#160;<i>The Eagle and the Raven<\/i>, received the Jean Boujassy award from the Soci&eacute;t&eacute; des Gens des Lettres, and&#160;<i>The Twelfth Transforming<\/i>, the second of her Egyptian novels, won the Writers Guild of Alberta Best Novel of the Year Award. Her books have sold more than 250,000 copies in Canada alone; worldwide, they have sold more than six million copies and have been translated into eighteen languages. Pauline Gedge lives in Alberta.",
              "seoFriendlyUrl": "\/authors\/9834\/pauline-gedge",
              "attr": 1001,
              "firstInitial": "P",
              "lastInitial": "G",
              "hasAuthorPhoto": true,
              "photoCredit": null,
              "photoDate": null,
              "authorPhotoUrl": "https:\/\/images.randomhouse.com\/author\/9834"
            }
          },
          "dimensions": {
            "length": "7.470",
            "width": "4.240",
            "depth": "1.230",
            "grossWeight": "13.440"
          },

We also fixed a bug in the same view where the "awardYear" element was being returned with a zero instead of a NULL.

/domains/SALESINTERNATIONAL/titles/9780385751063/views/product-display

        {
          "ean": "9780385751063",
          "description": "IRA Young Adult Choices",
          "level": "WINNER",
          "date": null,
          "awardYear": null
        },

Bug

  • [RHAPI-501] - &rows=0 not working in author display
  • [RHAPI-523] - &rows=0 not working in search-display
  • [RHAPI-526] - NPE in listSearchWorks line 63

New Feature

  • [RHAPI-493] - Add book full dimensions and weight to product-display
  • [RHAPI-517] - Add preferExport logic to search-display view

Task

  • [RHAPI-514] - Add author image photo credit into product-display
  • [RHAPI-516] - Add sub-format name to product-display
  • [RHAPI-522] - Is it possible to return 'null' instead of '0' when the awardYear field is not populated