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.
This endpoint has two valid use-cases.
- Get a listing of all content in a users' Bookshelf account
- 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
https://api.vitalsource.com/v3/licenses.xmlData 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
https://api.vitalsource.com/v3/licenses.xmlRequest Header - sku example
This request would return only the specified sku in payload
&license_type=allhttps://api.vitalsource.com/v3/licenses.xml?sku={SKU}
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
<?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 |
Error Codes
HTTP & Error messages
|
Message
|
Notes
|
---|---|---|
200 |
Activation request already redeemed |
Success. Errors provided simultaneously |
Comments
Please sign in to leave a comment.