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. The sku version of this request is useful to prevent duplicate sales.

Avoid using the returned 200 Status in your code. The 200 status indicates whether the API call was successful or not and is not an indicator of if the license exists on the user's account of not. 

Verb/URI

GET https://api.vitalsource.com/v3/licenses.xml - Returns all licenses
GET https://api.vitalsource.com/v3/licenses.xml?sku={SKU}- Returns licenses associated with a particular sku value.

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, downloadable, all string

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

No 

 

Request Headers

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

Response

Response body

<?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"/>
<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="download" expiration="never"/>
</licenses>

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

 

Error Codes

HTTP & Error messages 
Message
Notes
200

Activation request already redeemed

Success. Errors provided simultaneously

 

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

Comments

0 comments

Please sign in to leave a comment.