• Register

Penguin Random House Developer Blog

Enhanced API v1.1.19 released

On Thursday April 14, 2016, version 1.1.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.1.19 release notes

This version saw several additions to the output and one new parameter added to the author display view. In addition one bug was fixed where under certain circumstances, work listings could display duplicate records.

The Title representation received two new fields, salesRestriction and isbnBlok,  values for which come straight from our internal systems. In addition we added a new derived flag in the flags element called "EXPORT" which is set whenever isbnBlok='EXPT' and is used to indicate an export-only edition.

/domains/SALESINTERNATIONAL/titles/9781601429278

            "flags":[
               "EXPORT"
            ],
            ...
            "titleBlock":"EXPT",

The Event representation had a new field added to the output.

/domains/PRH.US/events/1705290

            "referenceUrl":"www.bn.com",

The author display view was modified to include several new fields in the output.

/domains/SALESINTERNATIONAL/authors/29660/views/author-display

            "formatCode":"HC",
            ...
            "canPrice":null,
            ...
            "ageRange":null,
            "salesRestriction":null,
            "salesRestrictionCode":"07",
            ...
            "flags":[
               "INSIGHT"
            ],

In addition, a new parameter was added to the author display view, "preferExport". This parameter allows the international sales sites to display the correct cover without having to modify the existing frontlistiest logic. This boolean parameter can be set to true to control which ISBN is chosen for each of the works listed in the works array.

For example, let's look at work #252887 in the "SALESINTERNATIONAL" domain. It has two titles, one with the "EXPORT" flag and one without. The export edition has a frontlistiest sequence of 2 and so would normally not be selected as the ISBN for the author display works array.

/domains/SALESINTERNATIONAL/works/252887/titles?sort=frontlistiest

      "titles":[
         {
            "isbn":​9781601428165,
            "isbnHyphenated":"978-1-60142-816-5",
            "title":"Be Light",
            ...
            "flags":[
               "INSIGHT"
            ],
            "workId":​252887,
            "frontlistiestSeq":​1,
            ...
         },
         {
            "isbn":​9781601429278,
            "isbnHyphenated":"978-1-60142-927-8",
            "title":"Be Light",
            ...
            "flags":[
               "EXPORT"
            ],
            "workId":​252887,
            "frontlistiestSeq":​2,

Without preferExport set, the author display view selects the frontlistiest ISBN for each work returned.

/domains/SALESINTERNATIONAL/authors/244262/views/author-display

      "works":[
         {
            "id":​252887,
            "name":"Be Light",
            "isbn":​9781601428165,

However if preferExport is set to 'true', then ISBNs with the "EXPORT" flag will be preferred. Notice how the request below returns the ISBN ending in 9278 which had a frontlistiest sequence of 2.

/domains/SALESINTERNATIONAL/authors/244262/views/author-display?preferExport=true

      "works":[
         {
            "id":​252887,
            "name":"Be Light",
            "isbn":​9781601429278,

Bug

  • [RHAPI-450] - work listing not returning distinct records

New Feature

Task

  • [RHAPI-434] - Add Sales Restriction field to API
  • [RHAPI-435] - Add title block field to API title representation
  • [RHAPI-437] - Add parameter to author display view to make works listing prefer export only edition
  • [RHAPI-439] - Add REFERENCE_URL column to AUTHOREVENTS
  • [RHAPI-445] - Add additional fields into views/author-display
{
  • "status": "ok",
  • "recordCount": ​1,
  • "startTimestamp": "2016-04-14T13:07Z",
  • "endTimestamp": "2016-04-14T13:07Z",
  • "timeTaken": ​16,
  • "data":
{
  • "authorId": ​244262,
  • "display": "Samuel Rodriguez",
  • "ontour": false,
  • "spotlight": "<b>Samuel Rodriguez</b>&#160;is president of NHCLC/Conela, an international organization of more than 500,000 evangelical churches. He is a sought after voice in White House and congressional meetings and is regularly featured on CNN, Fox News, NBC Telemundo, and other major news outlets. The author of&#160;<i>The Lamb&rsquo;s Agenda,</i>Rodriguez is senior pastor of New Seasons Christian Worship Center in Sacramento, California, where he resides with his wife Eva and their three children.",
  • "hasAuthorPhoto": true,
  • "photoCredit": null,
  • "photoDate": "2016",
  • "firstInitial": "S",
  • "lastInitial": "R",
  • "events": [ ],
  • "essays": [ ],
  • "relatedLinks":
[
  • { },
  • { },
  • ],
  • "works":
  • [
    {
    • "id": ​252887,
    • "name": "Be Light",
    • "isbn": ​9781601428165,
    • "subtitle": "Shining God's Beauty, Truth, and Hope into a Darkened World",
    • "format": "Hardcover",
    • "formatCode": "HC",
    • "onsale": "2016-05-03",
    • "price": ​22.99,
    • "canPrice": null,
    • "pages": ​224,
    • "trim": "6-1/8 x 9-1/4",
    • "isbnDisplay": "978-1-60142-816-5",
    • "series": null,
    • "imprint": "WaterBrook",
    • "flapCopy": "<b>The Blueprint for Overcoming Darkness&#160;and Living in God&rsquo;s Light.</b><br><br>Our world unravels more each day. It feels as if we&rsquo;re drowning in a sea churning with greed, violence, and lust. As darkness advances, hope dims.<br> &#160;<br> Yet within that reality, God gives us a profound mandate...<br> &#160;<br> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <i>Be Light.</i><br> &#160;<br> Light has always defined God and his followers. At creation, God spoke light into existence. Jesus is the light of the world. And we are born to absorb and then reflect God&rsquo;s light. <br> &#160;<br> In <i>Be Light</i> Samuel Rodriguez--described by Fox News and CNN as &ldquo;America&rsquo;s most influential Latino Evangelical leader&rdquo;--provides a blueprint for confronting darkness in every realm of our lives. He issues a clarion call for individual believers and the church to rise up and once again be that bright city on a hill, which doesn&rsquo;t simply expose the invading darkness, but overcomes it with God&rsquo;s blazing light.",
    • "ageRange": null,
    • "salesRestriction": null,
    • "salesRestrictionCode": "00",
    • "authors":
    [
  • {
    • "authorId": ​244262,
    • "display": "Samuel Rodriguez",
    • "firstInitial": "S",
    • "lastInitial": "R",
    • "roleCode": "A",
    • "roleName": "Written by",
    • "ontour": false,
    • "spotlight": "<b>Samuel Rodriguez</b>&#160;is president of NHCLC/Conela, an international organization of more than 500,000 evangelical churches. He is a sought after voice in White House and congressional meetings and is regularly featured on CNN, Fox News, NBC Telemundo, and other major news outlets. The author of&#160;<i>The Lamb&rsquo;s Agenda,</i>Rodriguez is senior pastor of New Seasons Christian Worship Center in Sacramento, California, where he resides with his wife Eva and their three children.",
    • "hasAuthorPhoto": null,
    • "photoCredit": null,
    • "photoDate": null,
    • "seoFriendlyUrl": "/authors/244262/samuel-rodriguez",
    • "attr": null
    },
    • {
      • "authorId": ​2142347,
      • "display": "Roma Downey",
      • "firstInitial": "R",
      • "lastInitial": "D",
      • "roleCode": "U",
      • "roleName": "Foreword by",
      • "ontour": false,
      • "spotlight": null,
      • "hasAuthorPhoto": null,
      • "photoCredit": null,
      • "photoDate": null,
      • "seoFriendlyUrl": "/authors/2142347/roma-downey",
      • "attr": null
      }
    ],
  • "formats":
  • [
  • {
    • "format": "Hardcover",
    • "count": ​2
    },
    • {
      • "format": "Paperback",
      • "count": ​2
      }
    ],
  • "flags":
  • [
    • "INSIGHT"
    ],
  • "seoFriendlyUrl": "/books/252887/be-light-by-rodriguez-samuel",
  • "_links":
  • [
  • },
  • {
    • "id": ​304341,
    • "name": "Path of Miracles",
    • "isbn": ​9780451228833,
    • "subtitle": "The Seven Life-Changing Principles that Lead to Purpose andFulfillment",
    • "format": "Paperback",
    • "formatCode": "TR",
    • "onsale": "2009-04-07",
    • "price": ​15.0,
    • "canPrice": null,
    • "pages": ​272,
    • "trim": "6 x 9",
    • "isbnDisplay": "978-0-451-22883-3",
    • "series": null,
    • "imprint": "Celebra",
    • "flapCopy": "<b> The trade paperback edition of the inspirational guide by one of the most preeminent leaders of the Latino Christian community. </b><br><br> Reverend Samuel Rodriguez uncovers the seven spiritual lessons learned from the story of Jesus' empty tomb-lessons that can enrich, empower, and transform lives. The goal: to recognize what God has placed throughout our journey in order to guide us toward fulfillment. <br><br> Taking the story of Jesus and the empty tomb as his basis and inspiration, Reverend Rodriguez explains how these life-changing principles can be learned to create a richer, transformed life. <br><br> An inspiring book, it guides readers down the path of miracles already ahead of them.",
    • "ageRange": null,
    • "salesRestriction": null,
    • "salesRestrictionCode": "00",
    • "authors":
    [
  • {
    • "authorId": ​244262,
    • "display": "Samuel Rodriguez",
    • "firstInitial": "S",
    • "lastInitial": "R",
    • "roleCode": "A",
    • "roleName": "Written by",
    • "ontour": false,
    • "spotlight": "<b>Samuel Rodriguez</b>&#160;is president of NHCLC/Conela, an international organization of more than 500,000 evangelical churches. He is a sought after voice in White House and congressional meetings and is regularly featured on CNN, Fox News, NBC Telemundo, and other major news outlets. The author of&#160;<i>The Lamb&rsquo;s Agenda,</i>Rodriguez is senior pastor of New Seasons Christian Worship Center in Sacramento, California, where he resides with his wife Eva and their three children.",
    • "hasAuthorPhoto": null,
    • "photoCredit": null,
    • "photoDate": null,
    • "seoFriendlyUrl": "/authors/244262/samuel-rodriguez",
    • "attr": null
    },
    • {
      • "authorId": ​32354,
      • "display": "Jim Wallis",
      • "firstInitial": "J",
      • "lastInitial": "W",
      • "roleCode": "U",
      • "roleName": "Foreword by",
      • "ontour": false,
      • "spotlight": "Jim Wallis is a preacher, an activist, an author, the convener of Call to Renewal, and the editor in chief of Sojourners magazine. His previous books include <i>Who Speaks for God?</i>, <i>The Soul of Politics</i>, and <i>The Call to Conversion</i>. He has just completed a year as a fellow at the new Center for the Study of Values in Public Life at Harvard Divinity School and now teaches at the university's John F. Kennedy School of Government. Wallis travels extensively, giving more than two hundred talks each year. He lives in Washington, D.C., with his wife, Joy, and son, Luke.",
      • "hasAuthorPhoto": null,
      • "photoCredit": null,
      • "photoDate": null,
      • "seoFriendlyUrl": "/authors/32354/jim-wallis",
      • "attr": null
      }
    ],
  • "formats":
  • [
    • {
      • "format": "Paperback",
      • "count": ​2
      }
    ],
  • "flags": [ ],
  • "seoFriendlyUrl": "/books/304341/path-of-miracles-by-rodriguez-samuel",
  • "_links":
  • [
  • },
  • {
    • "id": ​531313,
    • "name": "Camino de Milagros",
    • "isbn": ​9780451226457,
    • "subtitle": "Los Siete Principios Para Llevar una Vida Plena y Con Proposito",
    • "format": "Paperback",
    • "formatCode": "TR",
    • "onsale": "2009-04-07",
    • "price": ​16.0,
    • "canPrice": null,
    • "pages": ​272,
    • "trim": "6 x 9",
    • "isbnDisplay": "978-0-451-22645-7",
    • "series": null,
    • "imprint": "Celebra",
    • "flapCopy": null,
    • "ageRange": null,
    • "salesRestriction": null,
    • "salesRestrictionCode": "00",
    • "authors":
    [
  • {
    • "authorId": ​244262,
    • "display": "Samuel Rodriguez",
    • "firstInitial": "S",
    • "lastInitial": "R",
    • "roleCode": "A",
    • "roleName": "Written by",
    • "ontour": false,
    • "spotlight": "<b>Samuel Rodriguez</b>&#160;is president of NHCLC/Conela, an international organization of more than 500,000 evangelical churches. He is a sought after voice in White House and congressional meetings and is regularly featured on CNN, Fox News, NBC Telemundo, and other major news outlets. The author of&#160;<i>The Lamb&rsquo;s Agenda,</i>Rodriguez is senior pastor of New Seasons Christian Worship Center in Sacramento, California, where he resides with his wife Eva and their three children.",
    • "hasAuthorPhoto": null,
    • "photoCredit": null,
    • "photoDate": null,
    • "seoFriendlyUrl": "/authors/244262/samuel-rodriguez",
    • "attr": null
    },
    • {
      • "authorId": ​239836,
      • "display": "Santiago Ochoa",
      • "firstInitial": "S",
      • "lastInitial": "O",
      • "roleCode": "T",
      • "roleName": "Translated by",
      • "ontour": false,
      • "spotlight": null,
      • "hasAuthorPhoto": null,
      • "photoCredit": null,
      • "photoDate": null,
      • "seoFriendlyUrl": "/authors/239836/santiago-ochoa",
      • "attr": null
      }
    ],
  • "formats":
  • [
    • {
      • "format": "Paperback",
      • "count": ​2
      }
    ],
  • "flags": [ ],
  • "seoFriendlyUrl": "/books/531313/camino-de-milagros-by-rodriguez-samuel",
  • "_links":
  • [
  • ],
  • "series": [ ],
  • "company":
  • {
    • "key": "R_H",
    • "value": null
    },
  • "clientSourceId": ​0,
  • "clientAuthors": { },
  • "seoFriendlyUrl": "/authors/244262/samuel-rodriguez",
  • "_links":
  • [
  • { },
  • { },
  • },
  • "error": null,
  • "params":
    • {
      • "domain": "SALESINTERNATIONAL",
      • "authorId": ​244262
      }
    }