// Store multiple article view events.
const host = "https://apis.ebsco.com";
const path = "/medsapi-dynamed/v1/user/article-views";
// Create the Request
const url = host + path;
const requestBody = {"items":[{"article":{"id":"
T116388","section ":{"title":"
Overview"},"title":"
Acute Lymphoblastic Leukemia/Lymphoma (ALL)"},"eventType":"OPEN_ITEM","prevSearchTerm":"
search:covid\"","timestamp":"
2020-10-19T19:04:03Z"}]}
const settings = {
"async": true,
"crossDomain": true,
"url": url,
"method": "POST",
"headers": {
"authorization": "Bearer TOKEN",
"Content-Type": "application/json",
"Accept": "application/json"
},
"processData": false,
"data": JSON.stringify(requestBody)
};
// Send the Request
$.ajax(settings).done(function (response) {
console.log(response);
});