• Register

Penguin Random House Developer Blog

Enhanced API v1.2.7 released

On Thursday July 7, 2016, version 1.2.7 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.7 release notes

This is a minor release that exposes two new resources /properties and /subseries to support development of the kids sites.

Properties and Subseries endpoints

For many kids books, in addition to specifying a series, it is possible for the publisher to identify a subseries or specific propertyName for an ISBN. Therefore when taking a comprehensive approach to grouping kids books, one needs to consider all three of these fields. In order to make it possible to correctly list and group titles by these groupings, we added support for these new endpoints and subresources.

/domains/PRH.US/properties?suppressLinks=true

    "properties": [
      {
        "propertyName": "Arthur (TM)",
        "_links": [
          
        ],
        "_embeds": null
      },
      {
        "propertyName": "Barbie",
        "_links": [
          
        ],
        "_embeds": null
      },
      {
        "propertyName": "Beauty and the Beast",
        "_links": [
          
        ],
        "_embeds": null
      },
      {
        "propertyName": "Big Time Rush",
        "_links": [
          
        ],
        "_embeds": null
      },

/domains/PRH.US/subseries?suppressLinks=true

    "subseries": [
      {
        "subseries": "14 Days in Shonan",
        "_links": [
          
        ],
        "_embeds": null
      },
      {
        "subseries": "A Bedtime Board Book",
        "_links": [
          
        ],
        "_embeds": null
      },
      {
        "subseries": "A Berenstain Bears Help Bk(TM)",
        "_links": [
          
        ],
        "_embeds": null
      },
      {
        "subseries": "A Chunky Flap Book(TM)",
        "_links": [
          
        ],
        "_embeds": null
      },

These endpoints can also be specified as subresources to answer questions such as, "What are the properties of author #3496?" or "What are the subseries of work #219531?"

/domains/PRH.US/authors/3496/properties

{
  "status": "ok",
  "recordCount": 1,
  "startTimestamp": "2016-07-07T14:54Z",
  "endTimestamp": "2016-07-07T14:54Z",
  "timeTaken": 4,
  "data": {
    "properties": [
      {
        "propertyName": "Arthur (TM)",
        "_links": [
          {
            "rel": "self",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/properties\/Arthur%20(TM)",
            "method": "GET",
            "parameters": null
          },
          {
            "rel": "https:\/\/api.penguinrandomhouse.com\/title\/authors\/definition",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/properties\/Arthur%20(TM)\/authors",
            "method": "GET",
            "parameters": null
          },
          {
            "rel": "https:\/\/api.penguinrandomhouse.com\/title\/titles\/definition",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/properties\/Arthur%20(TM)\/titles",
            "method": "GET",
            "parameters": null
          },
          {
            "rel": "https:\/\/api.penguinrandomhouse.com\/title\/works\/definition",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/properties\/Arthur%20(TM)\/works",
            "method": "GET",
            "parameters": null
          }
        ],
        "_embeds": null
      }
    ],
    "_links": [
      {
        "rel": "https:\/\/api.penguinrandomhouse.com\/title\/domains\/definition",
        "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US",
        "method": "GET",
        "parameters": null
      },
      {
        "rel": "self",
        "href": "https:\/\/api.penguinrandomhouse.com\/title\/domains\/PRH.US\/properties?authorId=3496",
        "method": "GET",
        "parameters": null
      }
    ],
    "_embeds": null
  },
  "error": null,
  "params": {
    "domain": "PRH.US",
    "clientGroup": "Public",
    "authorId": "3496"
  }
}

/domains/PRH.US/works/219531/subseries

{
  "status": "ok",
  "recordCount": 1,
  "startTimestamp": "2016-07-07T14:59Z",
  "endTimestamp": "2016-07-07T14:59Z",
  "timeTaken": 5,
  "data": {
    "subseries": [
      {
        "subseries": "14 Days in Shonan",
        "_links": [
          {
            "rel": "self",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/subseries\/14%20Days%20in%20Shonan",
            "method": "GET",
            "parameters": null
          },
          {
            "rel": "https:\/\/api.penguinrandomhouse.com\/title\/authors\/definition",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/subseries\/14%20Days%20in%20Shonan\/authors",
            "method": "GET",
            "parameters": null
          },
          {
            "rel": "https:\/\/api.penguinrandomhouse.com\/title\/titles\/definition",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/subseries\/14%20Days%20in%20Shonan\/titles",
            "method": "GET",
            "parameters": null
          },
          {
            "rel": "https:\/\/api.penguinrandomhouse.com\/title\/works\/definition",
            "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US\/subseries\/14%20Days%20in%20Shonan\/works",
            "method": "GET",
            "parameters": null
          }
        ],
        "_embeds": null
      }
    ],
    "_links": [
      {
        "rel": "https:\/\/api.penguinrandomhouse.com\/title\/domains\/definition",
        "href": "https:\/\/api.penguinrandomhouse.com\/title\/client\/Public\/domains\/PRH.US",
        "method": "GET",
        "parameters": null
      },
      {
        "rel": "self",
        "href": "https:\/\/api.penguinrandomhouse.com\/title\/domains\/PRH.US\/subseries?workId=219531",
        "method": "GET",
        "parameters": null
      }
    ],
    "_embeds": null
  },
  "error": null,
  "params": {
    "domain": "PRH.US",
    "workId": "219531",
    "clientGroup": "Public"
  }
}

Populating seoFriendlyUrl in search-display view

There was also a bug fixed where the seoFriendlyUrl element of the search-display view was not being populated.

/domains/PRH.US/search/views/search-display?q=green&docType=author

        "id": "author-10955-PRH.US",
        "key": "10955",
        "name": "John Green",
        "docType": "author",
        "score": 5.8462825,
        "seoFriendlyUrl": "\/authors\/10955\/john-green",
        "authorId": "10955",
        "authorOf": {
          "workId": 536453,
          "isbn": 9781101984543,
          "title": "Textbook Amy Krouse Rosenthal",
          "hasCover": true,
          "seoFriendlyUrl": "\/books\/536453\/textbook-amy-krouse-rosenthal-by-textbook-amy-krouse-rosenthal"
        },

Bug

  • [RHAPI-551] - AuthorOf URL not being set in search-display

New Feature

  • [RHAPI-546] - Create /subseries and /property subresources