The HoldingsIQ service retrieves vendor, package and title related information in JSON format. The service automates the managing of holdings data from different sources.

 

 

 

 

Create a Custom Title Code Samples

Use the code samples below as examples to create an application in your desired language.  The following code samples use the /{custid}/vendors/{vendorid}/packages/{packageid}/titles endpoint which allows you to create custom titles.  Get started and begin to understand the endpoint by following the examples below in the language of your choice. 

 

Code Samples

cURL

curl -X GET --header "Content-Type: application/json" --header \
"x-api-key: APIKEY" "https://sandbox.ebsco.io/rm/rmaccounts/CUSTID/vendors/VENDORID/packages/PACKAGEID/titles"


Java

// Construct the client
OkHttpClient client = new OkHttpClient();

// Create the URL
HttpUrl url = new HttpUrl.Builder()
     .scheme("https")
     .host("sandbox.ebsco.io")
     .addPathSegment("rm")
     .addPathSegment("rmaccounts")
     .addPathSegment(CUSTID)
     .addPathSegment("vendors")
     .addPathSegment(VENDORID)
     .addPathSegment("packages")
     .addPathSegment(PACKAGEID)
     .addPathSegment("titles")
     .build();

// Build the body       
MediaType mediaType = MediaType.parse("application/octet-stream");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"titleName\": \"custom-title-74\",\r\n  \"pubType\": \"Book\",\r\n  \"publisherName\": \"EBSCO Publishing\",\r\n  \"isPeerReviewed\": false,\r\n  \"edition\": 1,\r\n  \"description\": \"description-test\",\r\n  \"identifiersList\": [\r\n    {\r\n      \"id\": \"1234\",\r\n      \"subtype\": 2,\r\n      \"type\": 1\r\n    }\r\n  ],\r\n  \"contributorIdList\": [\r\n    {\r\n      \"type\": \"editor\",\r\n      \"contributor\": \"Jon Doe\"\r\n    }\r\n  ],\r\n  \"url\": \"http://www.ebsco.com\",\r\n  \"customCoverageList\": [\r\n    {\r\n      \"beginCoverage\": \"1989-03-01\",\r\n      \"endCoverage\": \"2001-06-30\"\r\n    }\r\n  ],\r\n  \"coverageStatement\": \"Issues on or after 6/1/1992\",\r\n  \"customEmbargoPeriod\": {\r\n    \"embargoUnit\": \"Days\",\r\n    \"embargoValue\": \"1\"\r\n  },\r\n  \"userDefinedField1\": \"String1\",\r\n  \"userDefinedField2\": \"String2\",\r\n  \"userDefinedField3\": \"String3\",\r\n  \"userDefinedField4\": \"String4\",\r\n  \"userDefinedField5\": \"String5\"\r\n}");

// Build the request
Request request = new Request.Builder()
      .url(url)
      .post(body)
      .addHeader("cache-control", "no-cache")
      .addHeader("x-api-key", APIKEY)
      .addHeader("content-type", "application/json")
      .build();

// Send the request
Response response = client.newCall(request).execute();


JavaScript

var host = "https://sandbox.ebsco.io/rm/rmaccounts/";
var pathsega = "/vendors/";
var pathsegb = "/packages/";
var pathsegc = "/titles";

// Custom Titles POST Example
// Create the Request
var urlstr = host + CUSTID + pathsega + VENDORID + pathsegb + PACKAGEID + pathsegc;

var settings = {
  "async": true,
  "crossDomain": true,
  "url": urlstr,
  "method": "POST",
  "headers": {
    "x-api-key": APIKEY,
    "content-type": "application/json"
  },
  "data": "{\r\n  \"titleName\": \"custom-title-74\",\r\n  \"pubType\": \"Book\",\r\n  \"publisherName\": \"EBSCO Publishing\",\r\n  \"isPeerReviewed\": false,\r\n  \"edition\": 1,\r\n  \"description\": \"description-test\",\r\n  \"identifiersList\": [\r\n    {\r\n      \"id\": \"1234\",\r\n      \"subtype\": 2,\r\n      \"type\": 1\r\n    }\r\n  ],\r\n  \"contributorIdList\": [\r\n    {\r\n      \"type\": \"editor\",\r\n      \"contributor\": \"Jon Doe\"\r\n    }\r\n  ],\r\n  \"url\": \"http://www.ebsco.com\",\r\n  \"customCoverageList\": [\r\n    {\r\n      \"beginCoverage\": \"1989-03-01\",\r\n      \"endCoverage\": \"2001-06-30\"\r\n    }\r\n  ],\r\n  \"coverageStatement\": \"Issues on or after 6/1/1992\",\r\n  \"customEmbargoPeriod\": {\r\n    \"embargoUnit\": \"Days\",\r\n    \"embargoValue\": \"1\"\r\n  },\r\n  \"userDefinedField1\": \"String1\",\r\n  \"userDefinedField2\": \"String2\",\r\n  \"userDefinedField3\": \"String3\",\r\n  \"userDefinedField4\": \"String4\",\r\n  \"userDefinedField5\": \"String5\"\r\n}"  
}

// Send the Request
$.ajax(settings).done(function (response) 
{
console.log(response);
});


Ruby

# Form the URL 
urlstr = File.join('https://', 'sandbox.ebsco.io', 'rm/rmaccounts', CUSTID, 'vendors', VENDORID, 'packages', PACKAGEID, 'titles')
url = URI(urlstr)

# Create the HTTP object
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

# Create the request
request = Net::HTTP::Post.new(url)
request["x-api-key"] = APIKEY
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\r\n  \"titleName\": \"custom-title-74\",\r\n  \"pubType\": \"Book\",\r\n  \"publisherName\": \"EBSCO Publishing\",\r\n  \"isPeerReviewed\": false,\r\n  \"edition\": 1,\r\n  \"description\": \"description-test\",\r\n  \"identifiersList\": [\r\n    {\r\n      \"id\": \"1234\",\r\n      \"subtype\": 2,\r\n      \"type\": 1\r\n    }\r\n  ],\r\n  \"contributorIdList\": [\r\n    {\r\n      \"type\": \"editor\",\r\n      \"contributor\": \"Jon Doe\"\r\n    }\r\n  ],\r\n  \"url\": \"http://www.ebsco.com\",\r\n  \"customCoverageList\": [\r\n    {\r\n      \"beginCoverage\": \"1989-03-01\",\r\n      \"endCoverage\": \"2001-06-30\"\r\n    }\r\n  ],\r\n  \"coverageStatement\": \"Issues on or after 6/1/1992\",\r\n  \"customEmbargoPeriod\": {\r\n    \"embargoUnit\": \"Days\",\r\n    \"embargoValue\": \"1\"\r\n  },\r\n  \"userDefinedField1\": \"String1\",\r\n  \"userDefinedField2\": \"String2\",\r\n  \"userDefinedField3\": \"String3\",\r\n  \"userDefinedField4\": \"String4\",\r\n  \"userDefinedField5\": \"String5\"\r\n}"

# Send the request
response = http.request(request)


Python

# Form the URL
url = ''.join(['/rm','/rmaccounts/', CUSTID, '/vendors/', VENDORID, '/packages/', PACKAGEID, '/titles'])

# Create Connection Instance
conn = http.client.HTTPSConnection("sandbox.ebsco.io")

# Payload
payload = "{\r\n  \"titleName\": \"custom-title-74\",\r\n  \"pubType\": \"Book\",\r\n  \"publisherName\": \"EBSCO Publishing\",\r\n  \"isPeerReviewed\": false,\r\n  \"edition\": 1,\r\n  \"description\": \"description-test\",\r\n  \"identifiersList\": [\r\n    {\r\n      \"id\": \"1234\",\r\n      \"subtype\": 2,\r\n      \"type\": 1\r\n    }\r\n  ],\r\n  \"contributorIdList\": [\r\n    {\r\n      \"type\": \"editor\",\r\n      \"contributor\": \"Jon Doe\"\r\n    }\r\n  ],\r\n  \"url\": \"http://www.ebsco.com\",\r\n  \"customCoverageList\": [\r\n    {\r\n      \"beginCoverage\": \"1989-03-01\",\r\n      \"endCoverage\": \"2001-06-30\"\r\n    }\r\n  ],\r\n  \"coverageStatement\": \"Issues on or after 6/1/1992\",\r\n  \"customEmbargoPeriod\": {\r\n    \"embargoUnit\": \"Days\",\r\n    \"embargoValue\": \"1\"\r\n  },\r\n  \"userDefinedField1\": \"String1\",\r\n  \"userDefinedField2\": \"String2\",\r\n  \"userDefinedField3\": \"String3\",\r\n  \"userDefinedField4\": \"String4\",\r\n  \"userDefinedField5\": \"String5\"\r\n}"

# Create the Request Headers
headers = {
    'x-api-key': APIKEY,
    'content-type': "application/json"
    }

# Send Request  
conn.request("POST", url, payload, headers)

# Get Response
res = conn.getresponse()