1) Basic Bookshelf Workflow - v4/products

Our newly updated v4/products - Read All endpoint is designed for content ingestion by our API integrators. For many e-commerce sites, this is the first step for their integration with VitalSource. 

As this is a basic workflow we are focused on getting to the end with the fewest steps. If you have the VitalSource SKU already available you can skip to the next step here but beware that VitalSource ingests content from publishers and uses an internal identifier to uniquely associate content. Though this identifier is often an ISBN, this is not always the case. 

We will cover only one use case of the product endpoint and presume you have an ISBN on hand. 

  • You will be using the v4/products endpoint to confirm/convert your ISBN to a VBID
  • If you do not have an ISBN you will need to pull your whole catalog as documented here
  • Complete doc on v4/products is available here

To succeed you will need:

  • A valid API key
    • As a parameter in the header you will pass the ISBN you wish to validate

Request Header

curl --location --request GET 'https://api.vitalsource.com/v4/products/BOOKSHELF-TUTORIAL' \
--header 'X-VitalSource-API-Key: YOUR_VST_API_KEY' \
--header 'Content-Type:application/json' \

Response Body

{
    "vbid": "BOOKSHELF-TUTORIAL",
    "kind": "book",
    "identifiers": {
        "print_isbn_canonical": null,
        "eisbn_canonical": null
    },
    "title": "Bookshelf Tutorial",
    "format": "ePub",
    "publisher": "VitalSource Technologies",
    "edition": 2,
    "contributors": [
        {
            "name": "",
            "type": null
        }
    ],
    "language": "English",
    "created": "2014-08-04T13:37:55Z",
    "off_sale_date": null,
    "print_restrictions": -1,
    "copy_restrictions": -1,
    "resource_links": {
        "metadata": "https://api.vitalsource.com/v4/products/BOOKSHELFTUTORIAL",
       "cover_image": "https://covers.vitalbook.com/vbid/BOOKSHELF-TUTORIAL/width/480",
        "table_of_contents": "https://api.vitalsource.com/v4/products/BOOKSHELFTUTORIAL/toc",
        "store_url": "https://www.vitalsource.com/textbooks?term=BOOKSHELFTUTORIAL"
    },
....
        {
            "duration": "perpetual",
            "online_duration": "365",
            "sku": "BOOKSHELF-TUTORIAL",
            "type": "Single",
            "distributable": true,
            "prices": [],
            "updated": "2020-01-09T16:46:24Z"
        }
    ],
    "contents": []
}

 

Parse the response body for "vbid" : "something" . You will be use the in the "vbid" field to make the request in the next step. vbid will become sku when making a code create POST request.

Now move to the next step - codes

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.