- Previous: Categories
- Up: Concepts
- Next: Web link attrs
Works and ISBNs
ISBNs
The ISBN is the International Standard Book Number which is used to uniquely identify books. A different ISBN is assigned to each edition and variation of a book so that the hardcover, paperback and e-book editions of a title would all be assigned different ISBNs. For the purpose of this documentation, the term Title -- with an upper-case 'T' not to be confused with the lower-case "title" which is an attribute -- refers to the object identified by an ISBN and all of its associated attributes.
You can fetch data about ISBNs using the Title resource.
An ISBN example
For example The Da Vinci Code has the following ISBNs:
- 9780385504201, Doubleday Hardcover published 3/18/2003
- 9780385504218, Anchor eBook published 3/18/2003
- 9780307277671, Anchor Trade Paperback published 3/28/2006
- 9780739326749, Random House Large Print Trade Paperback published 3/28/2006
- 9780739340653, Random House Audio Abridged Audiobook Download published 3/28/2006
- 9781415934777, Random House Audio Unabridged Audiobook Download published 4/4/2006
- 9780307474278, Anchor Mass Market published 3/31/2009
- 9780307879257, Random House Audio Abridged CD published 10/19/2010
Works
The Work ID is a Penguin Random House internally managed number that serves to group different formats of a title together. The object identified by the work ID is called the Work and it represents the collection of all the different ISBNs together as a single object.
You can fetch data about works using the Work resource.
A work example
For example The Da Vinci Code has a work ID of 19309 which can be used to generate the list above:
/domains/PRH.US/works/19309/titles
Work attributes
Even though a Work is just a collection of ISBNs and does not have data of its own, certain attributes are computed at load time based on rules derived from the available ISBNs. The onsaledate attribute is taken from the ISBN in the work with the oldest on-sale date. This is important to consider whenever you are sorting Works by on-sale date.
The title, subtitle and author (the display field) are derived a little differently. For each field, the ISBN values are sorted alphabetically and the first value is used as the work attribute.
All other data is derived for a Work based on the ISBNs it has. So for example the request for /works/19309/authors which asks to list the authors of work ID #19309, in fact first explodes the Work into its ISBN components and then lists all the unique ISBN-AUTHOR relationships.
Should I return Titles or Works?
Within PRH.com we use Works whenever we are displaying lists of different books and Titles when we are displaying details about a single Work. In general this should work for most applications as well since it is generally easier to browse books at the Work level.
Using ISBN to specify works
Just because you have a list of ISBNs doesn't mean you have to fetch a list of Title records. Those ISBNs can be passed as parameters to the Work resource to fetch a list of Work records. This technique is used within PRH.com to drive various curated lists where the administrators enter ISBNs but the output displays Works.
Format filtering
In cases where you want to apply certain kinds of format filters, for example displaying only eBooks or downloadable audio, then it may make more sense to display Title data. While formats are not guaranteed to be unique within a title (i.e. it is possible to have two or more eBooks sharing the same work ID) it may be acceptable to show such duplicates in certain contexts.
- Previous: Categories
- Up: Concepts
- Next: Web link attrs
0 Comments
Please sign in to post a comment.