GET v3/licenses - Read

This API will allow you to check existing licenses held by a user on the VitalSource Bookshelf ecosystem. A product license grants the user the right to access a product until the license expiration date. The default request provides a listing of all products and their expirations, including any licenses that have expired. The sku version of this request is useful to prevent duplicate sales.

This endpoint has two valid use-cases.

  1. Get a listing of all content in a users' Bookshelf account
  2. Determine if a specific title currently exists in a users' Bookshelf account

Note: An HTTP 200 only indicates that you successfully completed this request. You must parse the response body to determine which content is in user accounts. 

Verb/URI

GET https://api.vitalsource.com/v3/licenses.xml

Data Definitions

Name
Usage
Description
Data Type
Example
Required
  URL param The default request N/A

v3/licenses.xml

Yes 
sku URL param The VitalBookID (VBID) for the title string

v3/licenses.xml?sku=BOOKSHELF-TUTORIAL

No
license_type  URL param  online, download, all string

v3/licenses.xml?sku=BOOKSHELF-TUTORIAL&license_type=online

No 

 

Request Headers

X-VitalSource-API-Key: ALLCAPSANDNUMBERS
X-VitalSource-Access-Token: lowercaseandnumbers

Request Header - default example

GET https://api.vitalsource.com/v3/licenses.xml

 Request Header - sku example

This request would return only the specified sku in payload

GET https://api.vitalsource.com/v3/licenses.xml?sku={SKU}&license_type=all

Response

Response body - default example

<?xml version="1.0" encoding="UTF-8"?>
<licenses>
<license imprint="VitalSource Technologies" publisher="VitalSource Technologies" name="Bookshelf Tutorial" sku="BOOKSHELF-TUTORIAL" isbn="BOOKSHELF-TUTORIAL" part_of="" term="" code-use="demo" kind="book" type="online" expiration="never"/>
</licenses>

Response body - sku example (No license)

<?xml version="1.0" encoding="UTF-8"?>
<licenses>
</licenses>

In the above response the sku passed to VitalSource  is not currently licensed in this Bookshelf account.

  • Note: VitalSource supports duplicate licenses, ad-finitum. If you grant more than one license to a title we simply store the expiration date and remember that. Only one copy of the title ever will appear in the users account. Selling/billing more than one copy of a title is the responsibility of the integrator.

Response Descriptions

Name
Description
distributable_products Number of licensed products returned in the initial request to which the user has access
total_products Total number of licenses to products for a user, including deactivated titles
publisher Publisher for product
imprint Imprint for product
type License type, either online or downloadable. If there is both a downloadable and an online license type for the same product, two <license/> elements will be returned (one for each type).
sku Unique product identifier, also known as the VBID
expiration Date the license expires; if one is not set, this will return "never"
code-use How the code was created and meant to be redeemed. code-api, add-drop, promotional, and p+e are valid returns.
name  
term  
kind Describes the "kind" of asset
part_of Part of a package. If NULL/Blank, then it's a single title NOT part of a package.

 

Error Codes

Error Code
Message
Notes
474 User could not be found  

 

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

Comments

0 comments

Please sign in to leave a comment.