Digital Inventory API
The Digital Inventory API retrieves a JSON file of reserveIds for an entire digital collection (via a collectionToken).
Note: The examples below show our production API URL. If you're using our integration environment, use https://integration.api.overdrive.com.
Using the Digital Inventory API
Before sending a request to the Digital Inventory API endpoint, you'll need to retrieve a collectionToken from the Library Account API. You can use a consortium, consortium + Advantage, or Advantage-only collectionToken, depending on which part of the library or school's collection you need to catalog.
The Digital Inventory API can be used to:
- Create an initial catalog of a library or school's offerings (based on a collectionToken).
- Re-index a library or school's collection.
- Generate a list of titles available to an Advantage library or school, including both consortium-owned and Advantage-only titles.
- Generate a list of Advantage-only titles for specific Advantage accounts (using an Advantage collectionToken).
- Create a list of titles added and removed (e.g., weeded or expired) since the last time the API was called.
Note: The Digital Inventory doesn't provide the tooling to create the diff. You'll need to create the diff with the compiled title data.
Because library and school collections can change frequently, we advise calling this endpoint daily. Titles may run out of licenses and expire, titles may be weeded, or new titles may be purchased at any time.
Important note: The download file is updated once per day at midnight EST. Calling the Digital Inventory API more than once a day will not yield different results.
Resource URL
https://api.overdrive.com/v1/collections/{collectionToken}/digitalinventoryTo access the Digital Inventory API, send a GET request to the URL above.
Digital Inventory response
- fileUrl: The download file URL that links to a JSON file with the reserve IDs for the provided collectionToken.
- infoFileUrl: Contains a timestamp, collectionToken, and hash, which can be used to determine if you need to check the download file and create a diff.
- id: The collectionToken that corresponds to the download file.
- The id in the response will match the collectionToken in your request if you pass only the collectionToken for a single collection (either consortium or Advantage). It won't match if you pass a consortium + Advantage collectionToken. See examples below for more details.
- expires: When access to the download file expires.
Sample (heavily trimmed) download file
{
"collectionToken":"v1L1BBQ0AAA2_",
"timeStamp":"2024-03-06T10:06:51.2594496Z",
"reserveIds": [
"0D85564B-A4B3-43D5-875D-1DF3CA06AE65",
"D0D8269C-589D-48D1-9152-10FE2F502F71",
"74D1567F-DDE7-4928-9006-23D39CE02248",
"535E832C-A1DC-4261-84FE-D5A28F733640",
"08F7D7E6-423F-45A6-9A1E-5AE9122C82E7",
"4AA00D73-8F4B-4652-BCB4-88C175E247D3",
"427ADE52-3F65-40AB-AE91-787E49BC716F",
"7ECA3C7A-7514-46C6-AC7E-F7F2C15E505D",
"61963FAD-1F22-442B-9B80-4FEB16F602F8",
"6EA9558F-AD2A-4B0F-8089-D45796BAE92E",
"6920FA03-B475-4037-8C45-F5183E8B55E8",
"B919EA0A-5189-45D0-8B64-6CBE80586875",
"DB5BF445-1702-40FB-811E-B90237C44134",
"A873CB28-F4B2-4A13-935C-D36488BC7E0E",
"2CDEDADA-1879-4D8E-A1E0-5803E10089B8"
]
}GET the inventory for a consortium collection or an individual Advantage collection
If needed, retrieve the collectionToken for a consortium collection from the Library Account API.
Note: You can also use an Advantage collectionToken to retrieve only titles belonging to an Advantage collection. The call and response will look very similar to the examples below.
Example request
GET https://api.overdrive.com/v1/collections/v1L1BBQ0AAA2_/digitalinventory
HTTP/1.1
Authorization: Bearer {token}
Accept: application/json, text/xml, text/html
User-Agent: {Your application}Example response
200 OK
Date: Tue, 30 Jan 2024 14:31:02 GMT
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Length: 845
Content-Type: application/json; charset=utf-8
{
"totalItems": 1,
"files": [
{
"id": "v1L1BBQ0AAA2_",
"expires": "2024-01-31T14:31:03.0452835Z",
"fileUrl": "https://api.cdn.overdrive.com/DigitalInventoryAPI/expiretime=1706711463;badurl=aHR0cHM6Ly9hcGkub3ZlcmRyaXZlLmNvbS92MS9iYWR1cmw=/43ff99e29032f12190dd61704fa6f011a0180ee698476aff564384d6b4856f7b/3333-v1L1BBQ0AAA2_.json",
"infoFileUrl": "https://api.cdn.overdrive.com/DigitalInventoryAPI/expiretime=1706711463;badurl=aHR0cHM6Ly9hcGkub3ZlcmRyaXZlLmNvbS92MS9iYWR1cmw=/2c016b8ff5f7e8022698ae20293757785d6690b5e8cb2389bf73ee134fb97ecb/3333-info-v1L1BBQ0AAA2_.json",
"links": {
"self": {
"href": "https://api.overdrive.com/v1/collections/v1L1BBQ0AAA2_/digitalinventory",
"type": "application/vnd.overdrive.api+json"
}
}
}
],
"links": {
"self": {
"href": "https://api.overdrive.com/v1/collections/v1L1BBQ0AAA2_/digitalinventory",
"type": "application/vnd.overdrive.api+json"
}
}
}GET the inventory for an Advantage collection and its base (consortium) collection
When you use a consortium + Advantage collectionToken, the JSON response will contain an array of download files. You'll get a download file for the Advantage account and for the consortium.
When parsing the response, the id field will not match the collectionToken you passed in (like it does for the consortium-only collection). Instead, the id will be split into individual collectionTokens for the Advantage and consortium collections. You'll need to use the Library Account API to determine which collection is which based on the returned ids.
Example request
GET /v1/collections/v1L2BBQ0AAN8VAAA1t/digitalInventory HTTP/1.1
Host: api.overdrive.com
Authorization: Bearer {token}
User-Agent: {Your application}Example response
200 OK
Date: Tue, 30 Jan 2024 14:46:25 GMT
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Length: 1525
Content-Type: application/json; charset=utf-8
{
"totalItems": 2,
"files": [
{
"id": "v1L1BBQ0AAA2_",
"expires": "2024-01-31T14:46:25.4490104Z",
"fileUrl": "https://api.cdn.overdrive.com/DigitalInventoryAPI/expiretime=1706712385;badurl=aHR0cHM6Ly9hcGkub3ZlcmRyaXZlLmNvbS92MS9iYWR1cmw=/806c502290aac730a42bdb757159f539071bc3acba5630468dfc8dc34d52d05f/3333-v1L1BBQ0AAA2_.json",
"infoFileUrl": "https://api.cdn.overdrive.com/DigitalInventoryAPI/expiretime=1706712385;badurl=aHR0cHM6Ly9hcGkub3ZlcmRyaXZlLmNvbS92MS9iYWR1cmw=/a215a131373f9ce78c34019d8f3c918debf27f423179b05a962e218dc23b8175/3333-info-v1L1BBQ0AAA2_.json",
"links": {
"self": {
"href": "https://api.overdrive.com/v1/collections/v1L1BBQ0AAA2_/digitalinventory",
"type": "application/vnd.overdrive.api+json"
}
}
},
{
"id": "v1L1B3xUAAA25",
"expires": "2024-01-31T14:46:25.4490544Z",
"fileUrl": "https://api.cdn.overdrive.com/DigitalInventoryAPI/expiretime=1706712385;badurl=aHR0cHM6Ly9hcGkub3ZlcmRyaXZlLmNvbS92MS9iYWR1cmw=/8aa3553849afe4dfaac4a3791f098f3d617d62a5120e266b536a30f6c7cc8cc6/5599-v1L1B3xUAAA25.json",
"infoFileUrl": "https://api.cdn.overdrive.com/DigitalInventoryAPI/expiretime=1706712385;badurl=aHR0cHM6Ly9hcGkub3ZlcmRyaXZlLmNvbS92MS9iYWR1cmw=/eec0760ba9bf047973e0197a853d41f7dd1dca285f721d9070371230d641d16d/5599-info-v1L1B3xUAAA25.json",
"links": {
"self": {
"href": "https://api.overdrive.com/v1/collections/v1L1B3xUAAA25/digitalinventory",
"type": "application/vnd.overdrive.api+json"
}
}
}
],
"links": {
"self": {
"href": "https://api.overdrive.com/v1/collections/v1L2BBQ0AAN8VAAA1t/digitalinventory",
"type": "application/vnd.overdrive.api+json"
}
}
}There may be duplicate reserveIds in the consortium and Advantage download files. This is expected behavior because Advantage accounts can buy additional copies of titles the consortium owns (in addition to titles the consortium doesn't own).