NAV Navigation
cURL Java NodeJS

OdiloTK API v2.0.1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The current document is the Odilo API documentation. Its aim is to give the most accurate information about how to interact with Odilo API, in order to help our partners with its integration tasks. The API is based on the REST principles so it follows a resource centered approach which determines the document structure.

Base URLs:

Email: Luis Rodríguez. License: Apache 2.0

Authentication

Scope Scope Description

Authorization

getToken

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json'

URL obj = new URL("https://api.odilo.io/opac/api/v2/token");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "grant_type": "client_credentials"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json'

};

fetch('https://api.odilo.io/opac/api/v2/token',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /token

Obtain an authorization token

The API authorization system is based in tokens. Before any interaction with the API, the partner should get its own token. For that, an Odilo's sub-resource called Token is created. To get a Token, the partner sends a Basic Authentication request to Token. The credentials for the basic scheme are out of the API shared by Odilo and its partner. The authentication response gives the Token resource at the body of the http response.

Body parameter

grant_type: client_credentials

Parameters

Name In Type Required Description
body body TokenRequest true Param to send within the body
grant_type body string true Param to send within the body

Example responses

200 Response

{
  "token": "2YotnFZFEjr1zCsicMWpAA",
  "type": "Bearer",
  "expires_in": 640
}

Responses

Status Meaning Description Schema
200 OK Successful Result TokenResponse
404 Not Found Wrong Credentials None

Odilo Resources

Login

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/login \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/login");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "userId": "23046949",
  "password": "1",
  "library": "BI001"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/login',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /login

Login service for patrons

Service to log in patrons and retrieve their information.

Body parameter

userId: '23046949'
password: '1'
library: BI001

Parameters

Name In Type Required Description
body body LoginRequest true Params to send within the body
userId body string true User identifier
password body string true User password
library body string false Library Identidier

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

401 Response

{
  "errorCode": "ERROR_LOGIN_INVALID_LIBRARY"
}

403 Response

{
  "errorCode": "ERROR_LOGIN_UNKNOWN_ID"
}

Responses

Status Meaning Description Schema
200 OK Successful Resquest PatronResponse
401 Unauthorized Error response when there are one or more users with the correct userId and password but none of them has the correct library. This errorCode may be returned even if the login request does not specify a library, as Odilotk may internally associate the reference library instead of the user's actual library. ErrorResponse
403 Forbidden Wrong Credentials ErrorResponse

ForgottenPassword

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/login/forgot \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/login/forgot");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "identifier"
  ],
  "properties": {
    "identifier": {
      "type": "string",
      "description": "Username"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/login/forgot',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /login/forgot

Notifies the backend that the patron has forgotten the password

Notifies the backend that the patron has forgotten the password

Body parameter

type: object
required:
  - identifier
properties:
  identifier:
    type: string
    description: Username

Parameters

Name In Type Required Description
identifier body string true Username

Example responses

204 Response

{
  "code": "8D4xH8hp2NR"
}

Responses

Status Meaning Description Schema
204 No Content Succesful Request Inline

Response Schema

Status Code 204

Name Type Required Restrictions Description
» code string false none none

ResetPassword

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/login/reset-password \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/login/reset-password");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Reset Password Request",
  "type": "object",
  "required": [
    "code",
    "password"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "Reset Password Request Code"
    },
    "password": {
      "type": "string",
      "description": "Patron New Password"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/login/reset-password',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /login/reset-password

Service to change the patron password after notifying the backend that the password was forgotten

Service to change the patron password after notifying the backend that the password was forgotten

Body parameter

description: Reset Password Request
type: object
required:
  - code
  - password
properties:
  code:
    type: string
    description: Reset Password Request Code
  password:
    type: string
    description: Patron New Password

Parameters

Name In Type Required Description
body body ResetPassword true Params to send within the body
code body string true Reset Password Request Code
password body string true Patron New Password

Responses

Status Meaning Description Schema
200 OK Succeful Request None

Logout

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/logout \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/logout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/logout',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /logout

Logout service for patrons

Allows to close an active session from a patron

Example responses

404 Response

{
  "errorCode": "ERROR_LOGGED_REQUIRED"
}

Responses

Status Meaning Description Schema
204 No Content Successful Logout None
404 Not Found No active session ErrorResponse

GetZinkersRegistrationData

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/register/zinkers/data \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/register/zinkers/data");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/register/zinkers/data',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /register/zinkers/data

Retrieve Zinkers Registration Data

Fetches the label value pairs for Channels, Workspaces, Center Types, Education Stages and the list of Centers of the Zinkers registration form. The data is filtered based on the requested language (ES/PT).

Parameters

Name In Type Required Description
lang query string false Language code to filter education stages and centers.

Detailed descriptions

lang: Language code to filter education stages and centers. Known values are 'ES', 'PT' and 'PT-PT', any other value will return the same as 'ES'. If lang is absent 'ES' will be used.

Example responses

200 Response

{
  "type": "object",
  "description": "Container for all lists required to populate the registration form dropdowns.",
  "properties": {
    "centerTypes": {
      "type": "array",
      "description": "List of available center types (e.g., Public, Private).",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "channels": {
      "type": "array",
      "description": "List of available channels.",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "workspaces": {
      "type": "array",
      "description": "List of available workspaces.",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "educationStages": {
      "type": "array",
      "description": "List of education stages for the given country.",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "centers": {
      "type": "array",
      "description": "List of center names for the given country.\n",
      "items": {
        "type": "string",
        "example": "807005-EB Ribeiro de Alforra"
      }
    }
  }
}

Forbidden. Expected when client is not Zinkers or test host.

{
  "errorCode": "ERROR_FORBIDDEN_CLIENT"
}

Responses

Status Meaning Description Schema
200 OK Successful retrieval of registration data. ZinkersRegistrationDTO
403 Forbidden Forbidden. Expected when client is not Zinkers or test host. ErrorResponse

GetStatus

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/status \
  -H 'Accept: application/json'

URL obj = new URL("https://api.odilo.io/opac/api/v2/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('https://api.odilo.io/opac/api/v2/status',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /status

Service to get information about the system status

It can be used to check the system aliveness

Example responses

200 Response

{
  "status": "UP"
}

Responses

Status Meaning Description Schema
200 OK Successful Check Status Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» status string false none none

GetConfiguration

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/configuration \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/configuration");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/configuration',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /configuration

Service to retrieve the opac configuration

Service to retrieve the opac configuration

Example responses

200 Response

{
  "version": "otk_2283",
  "build": "20190531135105",
  "title": "OdiloTK",
  "languages": [
    "es",
    "en"
  ],
  "locale": "es",
  "multipleSignUp": false,
  "renewCheckouts": true,
  "customSignUp": false,
  "customLoginUrl": null,
  "customLogoutUrl": null,
  "helpUrl": null,
  "bookClubUrl": "https://www.odilobookclub.com",
  "firstLoginMessage": "Please, accept the terms and conditions of use",
  "firstLoginType": "FIRSTLOGIN_TERMS_COND",
  "showCopies": true,
  "showTotalCheckouts": true,
  "showAvailabilityFilter": true,
  "showSocialIcons": true,
  "showSubjectsPanel": false,
  "showCheckoutHistory": true,
  "showNewsBanner": true,
  "showResourceTotalViews": true,
  "showWikipediaLink": false,
  "banners": {
    "id": "8F8094E16B1DAB1C016B1DC9C3880000",
    "hostId": 1,
    "ordering": 1,
    "title": "Custom Slide Title",
    "content": "Custom Slide Message",
    "url": "https://www.odilo.us",
    "image": "https://.../bannerimage.jpg",
    "align": "R"
  },
  "infoButtons": {
    "id": 1,
    "host_id": 1,
    "orden": 1,
    "textButton": "About Odilo",
    "textContent": null,
    "link": "https://www.odilo.es"
  },
  "homeFilter": {
    "name": "materia_facet_ss",
    "label": "Explora Materias",
    "firstLevel": {
      "label": "Drama",
      "nextLevel": null,
      "criteria": [
        "Drama"
      ]
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Succesful Request ConfigurationResponse

GetPatronIdByExternalId

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/external?id=kF2Yn2p63fSbPeQW \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/external?id=kF2Yn2p63fSbPeQW");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/external?id=kF2Yn2p63fSbPeQW',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /external

Service to retrieve the patronId based on externalId

Service to retrieve the patronId based on externalId

Parameters

Name In Type Required Description
id query string true the external ID of the user that we want to know its patronId

Example responses

200 Response

{
  "patronId": "002000673"
}

Responses

Status Meaning Description Schema
200 OK Succesful Request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» patronId string false none none

Records

GetRecords

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records

Service to retrieve the catalog titles and perform searches

Service to retrieve the catalog (a collection of records). The service accepts filters so it becomes the main service to perform searches over the catalog.

Parameters

Name In Type Required Description
recordIds query string false A comma-delimited list of records to retrieve.
query query string false The collection of filters in SOLR syntax that meets the search requirements.
limit query string false The max number of records to include in the response.
offset query string false The number of the starting element to resume a previous search.
modificationDate query string false Only returns titles modified since the selected date.
enableMetadata query boolean false When set to true, the response will include fields metadata and accessibilityMetadata, if available for the record.

Detailed descriptions

enableMetadata: When set to true, the response will include fields metadata and accessibilityMetadata, if available for the record.

Example responses

200 Response

{
  "id": "00005359",
  "active": true,
  "title": "Five weeks in a balloon",
  "subtitle": "",
  "author": "Verne, Jules",
  "coverImageUrl": "https://covers.odilo.io/public/2000000000048_132x186.jpg",
  "originalImageUrl": "https://covers.odilo.io/public/2000000000048_ORIGINAL.jpg",
  "description": "The first Verne novel in which he perfected the “ingredients” of his later work, skilfully mixing a plot full of adventure and twists that hold the reader’s interest with passages of technical, geographic, and historic description. The book gives readers a glimpse of the exploration of Africa, which was still not completely known to Europeans of the time, with explorers travelling all over the continent in search of its secrets. Public interest in fanciful tales of African exploration was at its height, and the book was an instant hit; it made Verne financially independent and got him a contract with Jules Hetzel’s publishing house, which put out several dozen more works of his for over forty years afterwards.",
  "formats": [
    "ACSM",
    "OCS",
    "EBOOK_STREAMING"
  ],
  "gradeLevel": "Juvenile",
  "isbn": "9780698167773",
  "language": "eng",
  "publicationDate": "20140101",
  "publihser": "epubBooks",
  "releaseDate": "20181217",
  "modificationDate": "20181217",
  "subject": "Adventures",
  "subjects": [
    "Adventures",
    "Travels"
  ],
  "subjectsBisacCodes": [],
  "type": "",
  "fileFormat": "epub",
  "resourceTypes": [
    "TIPO_OCS_EPUB",
    "TIPO_EBOOK",
    "TIPO_STREAMING_EPUB"
  ],
  "series": "",
  "seriesPosition": "",
  "availableIssueDates": [],
  "freeDownload": false,
  "payPerCheckout": false,
  "attachedResource": {},
  "availableCopies": 3,
  "externalLink": null,
  "totalCheckouts": 24,
  "totalViews": 37,
  "ppulicenciaCompleta": false,
  "physicalMedium": "[The medium for a sculpture.]",
  "publicationPlace": "Madrid",
  "systemDetailsNote": "Mode of access: Internet.",
  "generalNote": "Includes index.",
  "metadata": [
    {
      "label": "Audiencia",
      "values": [
        {
          "text": "Adulto",
          "queryParams": "521$a_txt:\"Adulto\""
        }
      ]
    },
    {
      "label": "Editorial",
      "values": [
        {
          "text": "Feedbooks",
          "queryParams": "publisher:\"Feedbooks\""
        },
        {
          "text": "Feedbooks",
          "externalLink": {
            "imageUrl": "https://www.teleread.com/wp-content/uploads/2014/05/logo_feedbooks.png",
            "link": "http://es.feedbooks.com"
          }
        }
      ]
    },
    {
      "label": "Idioma",
      "values": [
        {
          "text": "Alemán"
        }
      ]
    }
  ],
  "accessibilityMetadata": [
    {
      "type": "CONTENT_ACCESS_MODE",
      "label": "Modo de acceso al contenido",
      "values": [
        {
          "text": "auditory"
        }
      ]
    },
    {
      "type": "ACCESSIBILITY_FEATURES",
      "label": "Características de accesibilidad",
      "values": [
        {
          "text": "transcript"
        },
        {
          "text": "openCaptions"
        }
      ]
    },
    {
      "type": "ACCESSIBILITY_NOTES",
      "label": "Notas de accesibilidad",
      "values": [
        {
          "text": "El recurso es navegable completamente usando teclado."
        },
        {
          "text": "Una segunda nota es teoricamente posible segun el estandar MARC 21 de Library of Congress."
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request RecordResponse

GetLicense

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/license \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/license");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/license',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/license

Retrieves the records licenses

Retrieves the license from the selected records or from the entire catalog by default

Parameters

Name In Type Required Description
recordIds query string false A comma-delimited list of records to retrieve.
query query string false The collection of filters in SOLR syntax that meets the search requirements.
limit query string false The max number of records to include in the response.
offset query string false The number of the starting element to resume a previous search.
modificationDate query string false Only returns titles modified since the selected date.

Example responses

200 Response

{
  "active": "true",
  "formats": [
    "OCS",
    "ACSM",
    "EBOOK_STREAMING"
  ],
  "recordId": "00005353"
}

Responses

Status Meaning Description Schema
200 OK Succesful Request LicenseResponse

GetAvailability

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/availability \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/availability");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/availability',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/availability

Retrieves the records availability

Retrieves the availability from the selected records or from the entire catalog by default

Parameters

Name In Type Required Description
recordIds query string false A comma-delimited list of records to retrieve.
query query string false The collection of filters in SOLR syntax that meets the search requirements.
limit query string false The max number of records to include in the response.
offset query string false The number of the starting element to resume a previous search.
modificationDate query string false Only returns titles modified since the selected date.
patronId query string false Optional parameter to include checkout information for the given double .

Example responses

200 Response

{
  "resourceId": "00005353",
  "checkoutId": null,
  "totalCopies": 3,
  "availableCopies": 1,
  "holdsQueueSize": 0,
  "notifiedHolds": 0,
  "totalCopiesBC": 15,
  "availableCopiesBC": 7,
  "availableToCheckout": true,
  "formats": [
    "ACSM",
    "OCS",
    "EBOOK_STREAMING"
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request AvailabilityResponse

GetCarousels

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/collections \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/collections");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/collections',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/collections

Retrieves the carousels information

Retrieves the carousels defined by the library to be shown on the homepage

Example responses

200 Response

{
  "description": "Carousel Data Model Response",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Carousel Identifier"
    },
    "topten": {
      "type": "string",
      "description": "Carousel Type"
    },
    "hostId": {
      "type": "integer",
      "description": "Host Identifier"
    },
    "orden": {
      "type": "integer",
      "description": "Carousel Position in the OPAC Homepage"
    },
    "name": {
      "type": "string",
      "description": "Customized name for manually generated carousels"
    },
    "query": {
      "type": "string",
      "description": "Search term used if the carousel is generated from a query"
    },
    "dateIni": {
      "type": "integer",
      "format": "timestamp",
      "description": "Carousel Creation Date"
    },
    "dateEnd": {
      "type": "integer",
      "format": "timestamp",
      "description": "If It has been set, carusel ending date"
    },
    "topTenTitles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Carousel Titles Translations"
    },
    "registros": {
      "type": "string",
      "description": "Carousel Resources"
    },
    "records": {
      "type": "array",
      "description": "Records included in this carousel",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Resource Identifier"
          },
          "active": {
            "type": "boolean",
            "description": "Indicates if the record is active in the catalog"
          },
          "title": {
            "type": "string",
            "description": "Resource Title (MARC 245$a field)"
          },
          "subtitle": {
            "type": "string",
            "description": "Resource secondary title (MARC 245$b field)"
          },
          "author": {
            "type": "string",
            "description": "Resource Author (MARC 100 field)"
          },
          "coverUrls": {
            "type": "array",
            "description": "Resized Covers URLs",
            "items": {
              "type": "object",
              "properties": {
                "small": {
                  "type": "string",
                  "format": "url"
                },
                "large": {
                  "type": "string",
                  "format": "url"
                },
                "medium": {
                  "type": "string",
                  "format": "url"
                }
              }
            }
          },
          "originalImageUrl": {
            "type": "string",
            "format": "url",
            "description": "Original Size Cover"
          },
          "description": {
            "type": "string",
            "description": "Resource description (MARC 650 field)"
          },
          "formats": {
            "description": "List of file formats supported by OdiloTK",
            "type": "array",
            "items": {
              "type": "string"
            },
            "enum": [
              "EBOOK_STREAMING",
              "EPUB",
              "PDF",
              "ACSM",
              "ACSM_PDF",
              "ACSM_EPUB",
              "HTML",
              "MP3",
              "TXT",
              "DE_PDF",
              "MOBI",
              "WMA",
              "WMV",
              "DAISY",
              "PLKR",
              "QIOO",
              "JPG",
              "MP4",
              "SCORM",
              "OCS",
              "UNKNOWN"
            ],
            "example": [
              "OCS",
              "ACSM",
              "EBOOK_STREAMING"
            ]
          },
          "gradeLevel": {
            "type": "string",
            "description": "Audience of the resource (MARC 521$a field)"
          },
          "isbn": {
            "type": "string",
            "description": "ISBN Number (MARC 020$a field)"
          },
          "language": {
            "type": "string",
            "description": "Resource Language (MARC 041$a field)"
          },
          "publicationDate": {
            "type": "string",
            "description": "Publication Date (MARC 260$c field)"
          },
          "publisher": {
            "type": "string",
            "description": "Resource Publisher (MARC 260$b field)"
          },
          "subject": {
            "type": "string",
            "description": "Resource main subject (MARC 650$a first field)"
          },
          "subjects": {
            "type": "array",
            "description": "All the subjects of the title (MARC 650 fields)",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "type": "string",
            "description": "Resource Type"
          },
          "fileFormat": {
            "type": "string",
            "description": "File type"
          },
          "resourceType": {
            "description": "List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB",
            "type": "string",
            "enum": [
              "TIPO_MAGAZINE_STREAMING_OCS",
              "TIPO_NEWSPAPER_STREAMING_OCS",
              "TIPO_STREAMING_OCS_EPUB",
              "TIPO_STREAMING_OCS_PDF",
              "TIPO_MAGAZINE_OCS",
              "TIPO_NEWSPAPER_OCS",
              "TIPO_OCS_EPUB",
              "TIPO_OCS_PDF",
              "TIPO_FISICO"
            ],
            "example": [
              "TIPO_OCS_EPUB",
              "TIPO_EBOOK",
              "TIPO_STREAMING_EPUB"
            ]
          },
          "series": {
            "type": "string",
            "description": "Name of the series or collection which the title belongs to (MARC 490$a field)"
          },
          "seriesPosition": {
            "type": "string",
            "description": "Position occupied by the title within a serie or collection (MARC 490$v field)"
          },
          "availableIssueDates": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "If the resource is a periodical subscription, this field indicates the available issues."
          },
          "freeDownload": {
            "type": "boolean",
            "description": "Indicates whether the resource allows non-DRM download or not"
          },
          "payPerCheckout": {
            "type": "boolean",
            "description": "Indicates whether the resource has a pay per checkout license or not"
          },
          "attachedResource": {
            "description": "Indicates if the title has an attached free download file (NO DRM download)",
            "type": "object",
            "properties": {
              "fileName": {
                "type": "string",
                "description": "Indicates if the attached file is an open download or is restricted to logged users"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "OPEN",
                  "LOGGED_USERS"
                ],
                "description": "List of possible values"
              }
            },
            "example": {
              "fileName": "9788474641288.epub",
              "mode": "LOGGED_USERS"
            }
          },
          "totalCheckouts": {
            "type": "integer",
            "description": "Amount of checkouts performed over the resource"
          },
          "totalViews": {
            "type": "integer",
            "description": "Amount of visits performed over the resource"
          },
          "hasPreview": {
            "type": "boolean",
            "description": "Indicates that the resource offers the preview option"
          },
          "ppuLicenciaCompleta": {
            "type": "boolean",
            "description": "Indicates that the resource is a Pay Full License Per Checkout type"
          }
        }
      }
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request CarouselsResponse

GetSearchSuggestions

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/suggest?query=Drama \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/suggest?query=Drama");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/suggest?query=Drama',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/suggest

Retrieves the predictive search results

Retrieves the predictive search results

Parameters

Name In Type Required Description
query query string true Term to perform a search
filter query string false Term to perform a search specifying one of the criterias

Enumerated Values

Parameter Value
filter fndPartTitle
filter fndPartAuthor
filter fndPartPublisher
filter fndPartSubject

Example responses

200 Response

{
  "label": "Alice's adventures in Wonderland",
  "filter": "fndPartTitle_ss",
  "recordId": "00005779"
}

Responses

Status Meaning Description Schema
200 OK Successful Request SearchSuggestionsResponse

GetFilters

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/filters \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/filters");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/filters',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/filters

Retrieves all the filters visibles in the opac

Retrieves all the filters visibles in the opac

Example responses

200 Response

{
  "name": "idioma_facet_ss",
  "label": "Langue",
  "page": 0,
  "size": 36,
  "total": 2,
  "values": [
    {
      "name": "spa",
      "nameToShow": "Espagnol",
      "value": 132,
      "iconId": null
    },
    {
      "name": "dut",
      "nameToShow": "Néerlandais",
      "value": 98,
      "iconId": null
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request FiltersResponse

GetFiltersExpanded

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/filters/{filterName} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/filters/{filterName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/filters/{filterName}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/filters/{filterName}

Retrieves all facet items of the given filterName

Retrieves the facet items of the given filterName. It offers the possibility of pagination for all filters except filterName format_facet_ss and thema_facet_ss.

The request will be paginated when both parameters limit and offset are included.

For header api-version > 7 or null response field values[].nameToShow is translated to the user's locale whenever a translations exists in the backend for the following fieldName values:

For api-version <= 7 those filters values are not translated. There is also a difference on how filterName biblioHO is retrieved, see response schema for more details.

Parameters

Name In Type Required Description
filterName path string true filter identifier
query query string false Query to filter records. Typically it comes from main search bar in the front end home page. This parameters is not to be confused with facetSearch.
facets query string false Restrictions to the records from which the filter values are count. In requests from the front-end they usually coincide with the filters that the user has clicked.
collectionId query integer false Restricts the filters retrieved only to resources within the given collection, typically a carousel.
challengeId query integer false Restricts the filters retrieved only to resources within the given challenge.
excludeNonLeRecords query boolean false Whether or not to exclude learning experiences in the filter results. If excludeNonLeRecords is not included learning experiences will taken into account.
locale query string false Locale of the user
facetSearch query string false Text to search in the facet item text as shown to the user, usually the text written by the user after hitting the "View More" button. For example, if a facet item is "Anglais 140" "Anglais" will be found with parameters facetSearch like "A", "Ang," "Angl" or "glais". The search is case insensitive.
limit query integer false Maximum number of elements in each page of the results. This parameter is optional. To make a paginated requirement properly both limit and offset parameters are required.
offset query integer false Offset for pagination. This parameter is optional.

Example responses

200 Response

{
  "name": "idioma_facet_ss",
  "label": "Langue",
  "page": 0,
  "size": 36,
  "total": 2,
  "values": [
    {
      "name": "spa",
      "nameToShow": "Espagnol",
      "value": 132,
      "iconId": null
    },
    {
      "name": "dut",
      "nameToShow": "Néerlandais",
      "value": 98,
      "iconId": null
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request FiltersResponse

GetRecord

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/{recordId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/{recordId}

Retrieves the info for the given record

Retrieves the info for the given record

Parameters

Name In Type Required Description
recordId path string true Record Identifier

Example responses

200 Response

{
  "id": "00005359",
  "active": true,
  "title": "Five weeks in a balloon",
  "subtitle": "",
  "author": "Verne, Jules",
  "coverImageUrl": "https://covers.odilo.io/public/2000000000048_132x186.jpg",
  "originalImageUrl": "https://covers.odilo.io/public/2000000000048_ORIGINAL.jpg",
  "description": "The first Verne novel in which he perfected the “ingredients” of his later work, skilfully mixing a plot full of adventure and twists that hold the reader’s interest with passages of technical, geographic, and historic description. The book gives readers a glimpse of the exploration of Africa, which was still not completely known to Europeans of the time, with explorers travelling all over the continent in search of its secrets. Public interest in fanciful tales of African exploration was at its height, and the book was an instant hit; it made Verne financially independent and got him a contract with Jules Hetzel’s publishing house, which put out several dozen more works of his for over forty years afterwards.",
  "formats": [
    "ACSM",
    "OCS",
    "EBOOK_STREAMING"
  ],
  "gradeLevel": "Juvenile",
  "isbn": "9780698167773",
  "language": "eng",
  "publicationDate": "20140101",
  "publihser": "epubBooks",
  "releaseDate": "20181217",
  "modificationDate": "20181217",
  "subject": "Adventures",
  "subjects": [
    "Adventures",
    "Travels"
  ],
  "subjectsBisacCodes": [],
  "type": "",
  "fileFormat": "epub",
  "resourceTypes": [
    "TIPO_OCS_EPUB",
    "TIPO_EBOOK",
    "TIPO_STREAMING_EPUB"
  ],
  "series": "",
  "seriesPosition": "",
  "availableIssueDates": [],
  "freeDownload": false,
  "payPerCheckout": false,
  "attachedResource": {},
  "availableCopies": 3,
  "externalLink": null,
  "totalCheckouts": 24,
  "totalViews": 37,
  "ppulicenciaCompleta": false,
  "physicalMedium": "[The medium for a sculpture.]",
  "publicationPlace": "Madrid",
  "systemDetailsNote": "Mode of access: Internet.",
  "generalNote": "Includes index.",
  "metadata": [
    {
      "label": "Audiencia",
      "values": [
        {
          "text": "Adulto",
          "queryParams": "521$a_txt:\"Adulto\""
        }
      ]
    },
    {
      "label": "Editorial",
      "values": [
        {
          "text": "Feedbooks",
          "queryParams": "publisher:\"Feedbooks\""
        },
        {
          "text": "Feedbooks",
          "externalLink": {
            "imageUrl": "https://www.teleread.com/wp-content/uploads/2014/05/logo_feedbooks.png",
            "link": "http://es.feedbooks.com"
          }
        }
      ]
    },
    {
      "label": "Idioma",
      "values": [
        {
          "text": "Alemán"
        }
      ]
    }
  ],
  "accessibilityMetadata": [
    {
      "type": "CONTENT_ACCESS_MODE",
      "label": "Modo de acceso al contenido",
      "values": [
        {
          "text": "auditory"
        }
      ]
    },
    {
      "type": "ACCESSIBILITY_FEATURES",
      "label": "Características de accesibilidad",
      "values": [
        {
          "text": "transcript"
        },
        {
          "text": "openCaptions"
        }
      ]
    },
    {
      "type": "ACCESSIBILITY_NOTES",
      "label": "Notas de accesibilidad",
      "values": [
        {
          "text": "El recurso es navegable completamente usando teclado."
        },
        {
          "text": "Una segunda nota es teoricamente posible segun el estandar MARC 21 de Library of Congress."
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request RecordResponse

GetPreview

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/{recordId}/preview \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/preview");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/preview',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/{recordId}/preview

Get the preview for the given record

Get the preview for the given record

Parameters

Name In Type Required Description
recordId path string true Record Identifier
from query string false Indicates the origin of the visit
issueDate query string(date (YYYYMMDD)) false Issue date if the wanted preview belongs to a periodical subscription resource

Enumerated Values

Parameter Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

Example responses

200 Response

{
  "recordId": "00005359",
  "url": "https://.../previews/123908120938"
}

Responses

Status Meaning Description Schema
200 OK Successful Request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» recourceId string false none Record Identifier
» url string(url) false none Preview URL

GetRecordAvailability

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/{recordId}/availability \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/availability");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/availability',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/{recordId}/availability

Retrieves the availability of the given record

Retrieves the availability of the given record

Parameters

Name In Type Required Description
recordId path string true Record Identifier
patronId query string false Patron's internal identifier. Optional parameter to include checkout information for the given double

Example responses

200 Response

{
  "resourceId": "00005353",
  "checkoutId": null,
  "totalCopies": 3,
  "availableCopies": 1,
  "holdsQueueSize": 0,
  "notifiedHolds": 0,
  "totalCopiesBC": 15,
  "availableCopiesBC": 7,
  "availableToCheckout": true,
  "formats": [
    "ACSM",
    "OCS",
    "EBOOK_STREAMING"
  ]
}

Responses

Status Meaning Description Schema
200 OK Succesful Request AvailabilityResponse

PostCheckout

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/checkout \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/checkout");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Performs a checkout",
  "type": "object",
  "required": [
    "patronId"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "User Identifier"
    },
    "format": {
      "type": "array",
      "description": "Available formats for this record",
      "items": {
        "description": "List of file formats supported by OdiloTK",
        "type": "array",
        "items": {
          "type": "string"
        },
        "enum": [
          "EBOOK_STREAMING",
          "EPUB",
          "PDF",
          "ACSM",
          "ACSM_PDF",
          "ACSM_EPUB",
          "HTML",
          "MP3",
          "TXT",
          "DE_PDF",
          "MOBI",
          "WMA",
          "WMV",
          "DAISY",
          "PLKR",
          "QIOO",
          "JPG",
          "MP4",
          "SCORM",
          "OCS",
          "UNKNOWN"
        ],
        "example": [
          "OCS",
          "ACSM",
          "EBOOK_STREAMING"
        ]
      }
    },
    "issueDate": {
      "type": "string",
      "format": "date (YYYYMMDD)",
      "description": "To perform a checkout over a specific periodical subscription issue number (magazines or newspapers)"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/checkout',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/checkout

Performs a checkout

Performs the checkout of the resource to the given patron

Body parameter

description: Performs a checkout
type: object
required:
  - patronId
properties:
  patronId:
    type: string
    description: User Identifier
  format:
    type: array
    description: Available formats for this record
    items:
      description: List of file formats supported by OdiloTK
      type: array
      items:
        type: string
      enum:
        - EBOOK_STREAMING
        - EPUB
        - PDF
        - ACSM
        - ACSM_PDF
        - ACSM_EPUB
        - HTML
        - MP3
        - TXT
        - DE_PDF
        - MOBI
        - WMA
        - WMV
        - DAISY
        - PLKR
        - QIOO
        - JPG
        - MP4
        - SCORM
        - OCS
        - UNKNOWN
      example:
        - OCS
        - ACSM
        - EBOOK_STREAMING
  issueDate:
    type: string
    format: date (YYYYMMDD)
    description: >-
      To perform a checkout over a specific periodical subscription issue number
      (magazines or newspapers)

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body CheckoutRequest true Params to send within the body
patronId body string true User Identifier
format body [Format] false Available formats for this record
issueDate body string(date (YYYYMMDD)) false To perform a checkout over a specific periodical subscription issue number (magazines or newspapers)

Enumerated Values

Parameter Value
format EBOOK_STREAMING
format EPUB
format PDF
format ACSM
format ACSM_PDF
format ACSM_EPUB
format HTML
format MP3
format TXT
format DE_PDF
format MOBI
format WMA
format WMV
format DAISY
format PLKR
format QIOO
format JPG
format MP4
format SCORM
format OCS
format UNKNOWN

Example responses

200 Response

{
  "id": "3695",
  "recordId": "00005337",
  "downloadUrl": "https://...",
  "startTime": "1557416200083",
  "endTime": "1560008200083",
  "renewable": true,
  "returnable": true,
  "formats": [
    "EBOOK_STREAMING",
    "ACSM",
    "OCS"
  ],
  "recordhunkId": "14724",
  "issueDate": null,
  "displayedOnHistory": false
}

400 Response

{
  "ERROR": "The issue date requested is not found."
}

404 Response

409 Response

{
  "ERROR": "ERROR_ALREADY_CHECKED_OUT"
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutResponse
400 Bad Request Issue date not found. Inline
404 Not Found Patron or record not found or invalid checkout format Inline
409 Conflict Conflict (See ERROR description below) Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» ERROR string false none none

Status Code 409

Name Type Required Restrictions Description
» ERROR string false none ERROR_ALREADY_CHECKED_OUT - Resource already on loan
NOT_ALLOWED_BY_USER_POLICY - Patron policy does not allow to loan the resource
FORBIDDEN_ACCESS - The requested resource is not available
LOAN_RESERVED - Patron has the resource already on hold queue
ERROR_USER_HAS_TOO_MANY_HOLDS - Patron has too many holds
LOAN_DOWNLOADED - The required resource not available. It has been already checked out by other patron
TOO_MANY_CHECKOUTS - Patron has reached the limit of loans allowed
TOO_MANY_CHECKOUTS_THIS_MONTH - Patron has reached the limit of loans allowed in the month
TOO_MANY_CHECKOUTS_BY_PERIOD_AND_FORMAT - Patron has reached the limit of loans allowed in the specified period time with the same format
ERROR_RESOURCE_HAS_TOO_MANY_HOLDS - The resource has too many holds
TOO_MANY_CHECKOUTS_BY_USER_POLICY - Patron has reached the limit of loans allowed by its user policy
ERROR_OD_CANNOT_PLACE_CHECKOUT - Something happen trying to loan a external resource
ERROR_LIMIT_BY_FORMAT_SURPASSED - Patron has reached the maximum number of loans for this format
ERROR_USER_SUSPENDED - Patron is suspended
» ERRORINFO string false none none

Enumerated Values

Property Value
ERROR ERROR_ALREADY_CHECKED_OUT
ERROR NOT_ALLOWED_BY_USER_POLICY
ERROR FORBIDDEN_ACCESS
ERROR LOAN_RESERVED
ERROR ERROR_USER_HAS_TOO_MANY_HOLDS
ERROR LOAN_DOWNLOADED
ERROR TOO_MANY_CHECKOUTS
ERROR TOO_MANY_CHECKOUTS_THIS_MONTH
ERROR TOO_MANY_CHECKOUTS_BY_PERIOD_AND_FORMAT
ERROR ERROR_RESOURCE_HAS_TOO_MANY_HOLDS
ERROR TOO_MANY_CHECKOUTS_BY_USER_POLICY
ERROR ERROR_OD_CANNOT_PLACE_CHECKOUT
ERROR ERROR_LIMIT_BY_FORMAT_SURPASSED
ERROR ERROR_USER_SUSPENDED

PostDownload

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/download \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: text/plain' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/download");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Download a free access resource",
  "type": "object",
  "required": [
    "patronId",
    "format"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "User Identifier"
    },
    "format": {
      "type": "array",
      "description": "Available formats for this record",
      "items": {
        "description": "List of file formats supported by OdiloTK",
        "type": "array",
        "items": {
          "type": "string"
        },
        "enum": [
          "EBOOK_STREAMING",
          "EPUB",
          "PDF",
          "ACSM",
          "ACSM_PDF",
          "ACSM_EPUB",
          "HTML",
          "MP3",
          "TXT",
          "DE_PDF",
          "MOBI",
          "WMA",
          "WMV",
          "DAISY",
          "PLKR",
          "QIOO",
          "JPG",
          "MP4",
          "SCORM",
          "OCS",
          "UNKNOWN"
        ],
        "example": [
          "OCS",
          "ACSM",
          "EBOOK_STREAMING"
        ]
      }
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'text/plain',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/download',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/download

Download a free access resource

Allows to download a non DRM file with free access

Body parameter

description: Download a free access resource
type: object
required:
  - patronId
  - format
properties:
  patronId:
    type: string
    description: User Identifier
  format:
    type: array
    description: Available formats for this record
    items:
      description: List of file formats supported by OdiloTK
      type: array
      items:
        type: string
      enum:
        - EBOOK_STREAMING
        - EPUB
        - PDF
        - ACSM
        - ACSM_PDF
        - ACSM_EPUB
        - HTML
        - MP3
        - TXT
        - DE_PDF
        - MOBI
        - WMA
        - WMV
        - DAISY
        - PLKR
        - QIOO
        - JPG
        - MP4
        - SCORM
        - OCS
        - UNKNOWN
      example:
        - OCS
        - ACSM
        - EBOOK_STREAMING

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body DownloadRequest true Params to send within the body
patronId body string true User Identifier
format body [Format] true Available formats for this record

Enumerated Values

Parameter Value
format EBOOK_STREAMING
format EPUB
format PDF
format ACSM
format ACSM_PDF
format ACSM_EPUB
format HTML
format MP3
format TXT
format DE_PDF
format MOBI
format WMA
format WMV
format DAISY
format PLKR
format QIOO
format JPG
format MP4
format SCORM
format OCS
format UNKNOWN

Example responses

400 Response

Responses

Status Meaning Description Schema
200 OK Successful Request. Serves the book. None
400 Bad Request The given record is not free access type Inline

Response Schema

PostHold

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/hold \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/hold");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Performs a hold over a given record",
  "type": "object",
  "required": [
    "patronId"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "Patron identifier"
    },
    "issueDate": {
      "type": "string",
      "format": "date (YYYYMMDD)",
      "description": "Necessary if you want to create a hold over a periodical subscription issue"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/hold',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/hold

Creates a hold over record

Creates a new hold over the record for the given patron

Body parameter

description: Performs a hold over a given record
type: object
required:
  - patronId
properties:
  patronId:
    type: string
    description: Patron identifier
  issueDate:
    type: string
    format: date (YYYYMMDD)
    description: >-
      Necessary if you want to create a hold over a periodical subscription
      issue

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body HoldRequest true Params to send within the body
patronId body string true Patron identifier
issueDate body string(date (YYYYMMDD)) false Necessary if you want to create a hold over a periodical subscription issue

Example responses

200 Response

{
  "id": "000000741",
  "recordId": "00005336",
  "patronId": "002000203",
  "available": false,
  "holdQueuePosition": "1",
  "startTime": "1557478135151",
  "notifiedTime": "",
  "status": "waiting",
  "recordhunkId": "",
  "issueDate": "",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "coverURL": "https://...",
  "format": "EBOOK",
  "availableUntilTime": ""
}

Responses

Status Meaning Description Schema
200 OK Successful Request HoldResponse
409 Conflict The given record has free volumes to loan None

GetRecordRecommendations

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/{recordId}/recommendations?type=OTHER_USERS_ALSO_VIEWED \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/recommendations?type=OTHER_USERS_ALSO_VIEWED");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/recommendations?type=OTHER_USERS_ALSO_VIEWED',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/{recordId}/recommendations

Retrieves recommendations related with the given resource

Retrieves recommendations related with the given resource

Parameters

Name In Type Required Description
recordId path string true Record Identifier
type query string true Recommendation Type

Enumerated Values

Parameter Value
type OTHER_USERS_ALSO_VIEWED
type OTHER_USERS_ALSO_BOUGHT
type ITEMS_RATED_GOOD
type RECOMMENDATIONS_FOR_USER
type RELATED_ITEMS
type ACTION_HISTORY

Example responses

200 Response

{
  "recordId": "00006322",
  "title": "Gotas de Sangre: Crímenes y criminales",
  "author": "Bonafoux Quintero, Luis",
  "description": "Gotas de sangre: Crímenes y criminales, es un compendio de historias que, en un momento dado, han sido el reflejo de un grupo social en particular que atrae al lector. Los relatos descriptivos y entretenidos, hacen volver a la época y denotan objetivamente el nivel sociológico del acontecimiento.",
  "coverImageUrl": "https://.../cover.jpg",
  "resourceTypes": [
    "TIPO_EBOOK",
    "TIPO_STREAMING_EPUB",
    "TIPO_OCS_EPUB"
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request RecommendationsResponse

GetRecordRatings

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/{recordId}/ratings \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/ratings");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/ratings',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/{recordId}/ratings

Retrieves the average rating for the given resource

Retrieves the average rating for the given resource. In case the record doesn't exists or it doesn't have ratings, this edpoint returns that the record have rating 0.

Parameters

Name In Type Required Description
recordId path string true Record Identifier

Example responses

200 Response

{
  "mean": 4,
  "count": 234
}

Responses

Status Meaning Description Schema
200 OK Successful Request RatingsResponse

PostRecordRatings

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/ratings \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/ratings");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "userId": "002000202",
  "rate": 4
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/ratings',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/ratings

Send a rating for the given resource

Send a rating for the given resource

Body parameter

userId: '002000202'
rate: 4

Parameters

Name In Type Required Description
recordId path string true Record Identifier
isbn query string false Resource ISBN
userId body string true none
rate body integer true none

Example responses

200 Response

{
  "mean": 4,
  "count": 234
}

Responses

Status Meaning Description Schema
200 OK Successful Request RatingsResponse

GetComments

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/records/{recordId}/comments \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/comments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /records/{recordId}/comments

Retrieves all the comments about the given resource

Retrieves all the comments about the given resource

Parameters

Name In Type Required Description
recordId path string true Record Identifier

Example responses

200 Response

{
  "id": "45dc9a3a-f5ee-4b44-b7c2-e55b7c47bf08",
  "comment": "What an incredible story! I love it!",
  "resourceId": "00028531",
  "clientId": "E9119",
  "userid": "002000415",
  "userName": "John Smith",
  "resourceISBN": "0000000000083",
  "creationDate": 1544186195000,
  "userAgent": "Mozilla/5.0 (Windows NT 10.0)",
  "rating": 3,
  "status": "APPROVED",
  "parentId": "a6e4b78d-3fd2-4b46-80a9-f6325d41e871",
  "nestedComments": [],
  "likes": 4,
  "dislikes": 1,
  "sortNum": 3,
  "userVoted": [
    "002000572",
    "002001573",
    "002001276",
    "002097528"
  ],
  "errorCode": null
}

Responses

Status Meaning Description Schema
200 OK Successful Request Comments

PostComments

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/comments \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "id": "45dc9a3a-f5ee-4b44-b7c2-e55b7c47bf08",
  "comment": "What an incredible story! I love it!",
  "resourceId": "00028531",
  "clientId": "E9119",
  "userid": "002000415",
  "userName": "John Smith",
  "resourceISBN": "0000000000083",
  "creationDate": 1544186195000,
  "userAgent": "Mozilla/5.0 (Windows NT 10.0)",
  "rating": 3,
  "status": "APPROVED",
  "parentId": "a6e4b78d-3fd2-4b46-80a9-f6325d41e871",
  "nestedComments": [],
  "likes": 4,
  "dislikes": 1,
  "sortNum": 3,
  "userVoted": [
    "002000572",
    "002001573",
    "002001276",
    "002097528"
  ],
  "errorCode": null
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/comments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/comments

Send a comment about a resource

Send a comment about a resource

Body parameter

id: 45dc9a3a-f5ee-4b44-b7c2-e55b7c47bf08
comment: What an incredible story! I love it!
resourceId: 00028531
clientId: E9119
userid: '002000415'
userName: John Smith
resourceISBN: 0000000000083
creationDate: 1544186195000
userAgent: Mozilla/5.0 (Windows NT 10.0)
rating: 3
status: APPROVED
parentId: a6e4b78d-3fd2-4b46-80a9-f6325d41e871
nestedComments: []
likes: 4
dislikes: 1
sortNum: 3
userVoted:
  - '002000572'
  - '002001573'
  - '002001276'
  - 002097528
errorCode: null

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body Comments true Params to send within the body
id body string false Comment Identifier
comment body string true Full text of the comment
resourceId body string false Resource Identifier
clientId body string false Customer Identifier
userid body string false patron Identifier
userName body string false Patron's name
resourceISBN body string false ISBN code
creationDate body integer(timestamp) false Creation Date of the comment
userAgent body string false Device or browser used to submit the comment
rating body integer false Mean of likes and dislikes performed over the comment
status body string false Indicates the status of the comment
parentId body string false If the given comment is an answer to another comment, this field indicates its ID
nestedComments body [object] false Answers to this comment
» schema body Comments false Comments Data Model Response
likes body integer false Amount of favourable ratings recived by the comment
dislikes body integer false Amount of unfavorable ratings recived by the comment
sortNum body integer false Comment position
userVoted body [string] false Patrons who liked or disliked the comment
errorCode body string false Code error is there is a problem posting the comment or the vote

Enumerated Values

Parameter Value
status APPROVED
status DELETED
status WAITING_APPROVAL
errorCode USER_NULL
errorCode COMMENT_NULL
errorCode ERROR_CODE
errorCode COMMENT_ERROR
errorCode ALREADY_VOTED
errorCode VOTE_YOUR_OWN_COMMENT

Example responses

200 Response

{
  "id": "45dc9a3a-f5ee-4b44-b7c2-e55b7c47bf08",
  "comment": "What an incredible story! I love it!",
  "resourceId": "00028531",
  "clientId": "E9119",
  "userid": "002000415",
  "userName": "John Smith",
  "resourceISBN": "0000000000083",
  "creationDate": 1544186195000,
  "userAgent": "Mozilla/5.0 (Windows NT 10.0)",
  "rating": 3,
  "status": "APPROVED",
  "parentId": "a6e4b78d-3fd2-4b46-80a9-f6325d41e871",
  "nestedComments": [],
  "likes": 4,
  "dislikes": 1,
  "sortNum": 3,
  "userVoted": [
    "002000572",
    "002001573",
    "002001276",
    "002097528"
  ],
  "errorCode": null
}

Responses

Status Meaning Description Schema
200 OK Successful Request Comments
409 Conflict The given record has free volumes to loan None

PostCommentVote

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/comments/{commentId}/vote \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/comments/{commentId}/vote");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "userId",
    "like"
  ],
  "properties": {
    "userId": {
      "type": "string",
      "description": "Patron Identifier"
    },
    "like": {
      "type": "boolean",
      "description": "Indicates positive or negative vote"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/comments/{commentId}/vote',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/comments/{commentId}/vote

Send a rating about a comment

Send a rating about a comment

Body parameter

type: object
required:
  - userId
  - like
properties:
  userId:
    type: string
    description: Patron Identifier
  like:
    type: boolean
    description: Indicates positive or negative vote

Parameters

Name In Type Required Description
recordId path string true Record Identifier
commentId path string true Comment Identifier
userId body string true Patron Identifier
like body boolean true Indicates positive or negative vote

Example responses

200 Response

{
  "id": "45dc9a3a-f5ee-4b44-b7c2-e55b7c47bf08",
  "comment": "What an incredible story! I love it!",
  "resourceId": "00028531",
  "clientId": "E9119",
  "userid": "002000415",
  "userName": "John Smith",
  "resourceISBN": "0000000000083",
  "creationDate": 1544186195000,
  "userAgent": "Mozilla/5.0 (Windows NT 10.0)",
  "rating": 3,
  "status": "APPROVED",
  "parentId": "a6e4b78d-3fd2-4b46-80a9-f6325d41e871",
  "nestedComments": [],
  "likes": 4,
  "dislikes": 1,
  "sortNum": 3,
  "userVoted": [
    "002000572",
    "002001573",
    "002001276",
    "002097528"
  ],
  "errorCode": null
}

Responses

Status Meaning Description Schema
200 OK Successful Request Comments

PostHit

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/hit \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/hit");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Register a visit",
  "type": "object",
  "required": [
    "title",
    "from"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Resource Title"
    },
    "from": {
      "type": "string",
      "enum": [
        "INIT_SCREEN",
        "RESULT_SCREEN",
        "RESULT_NAV",
        "RECORD_SCREEN",
        "EXTERNAL_REQUEST",
        "API_REQUEST",
        "USER_SCREENS",
        "BOOKCLUB_APP",
        "USER_HOLD_SCREEN",
        "SEARCH_SUGGEST",
        "USER_FAV_SCREEN",
        "USER_HST_SCREEN",
        "USER_HSTV_SCREEN",
        "NR_WEB",
        "NR_PREVIEW_WEB",
        "NR_PREVIEW_APP",
        "PDFV_WEB",
        "PDFV_PREVIEW_WEB",
        "PDFV_PREVIEW_APP"
      ],
      "description": "Indicates the origin of the visit"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/hit',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/hit

Service to register a new visit to a title detail screen

Service to register a new visit to a title detail screen

Body parameter

description: Register a visit
type: object
required:
  - title
  - from
properties:
  title:
    type: string
    description: Resource Title
  from:
    type: string
    enum:
      - INIT_SCREEN
      - RESULT_SCREEN
      - RESULT_NAV
      - RECORD_SCREEN
      - EXTERNAL_REQUEST
      - API_REQUEST
      - USER_SCREENS
      - BOOKCLUB_APP
      - USER_HOLD_SCREEN
      - SEARCH_SUGGEST
      - USER_FAV_SCREEN
      - USER_HST_SCREEN
      - USER_HSTV_SCREEN
      - NR_WEB
      - NR_PREVIEW_WEB
      - NR_PREVIEW_APP
      - PDFV_WEB
      - PDFV_PREVIEW_WEB
      - PDFV_PREVIEW_APP
    description: Indicates the origin of the visit

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body NewHit true Params to send within the body
title body string true Resource Title
from body string true Indicates the origin of the visit

Enumerated Values

Parameter Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

Responses

Status Meaning Description Schema
204 No Content Successful Request None

PostImageView

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/image/view \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/image/view");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Register a visualization in a external type resource",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "enum": [
        "INIT_SCREEN",
        "RESULT_SCREEN",
        "RESULT_NAV",
        "RECORD_SCREEN",
        "EXTERNAL_REQUEST",
        "API_REQUEST",
        "USER_SCREENS",
        "BOOKCLUB_APP",
        "USER_HOLD_SCREEN",
        "SEARCH_SUGGEST",
        "USER_FAV_SCREEN",
        "USER_HST_SCREEN",
        "USER_HSTV_SCREEN",
        "NR_WEB",
        "NR_PREVIEW_WEB",
        "NR_PREVIEW_APP",
        "PDFV_WEB",
        "PDFV_PREVIEW_WEB",
        "PDFV_PREVIEW_APP"
      ],
      "description": "Indicates the origin of the visit"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/image/view',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/image/view

Service to register a visualization in a image type resource

Service to register a visualization in a image type resource

Body parameter

description: Register a visualization in a external type resource
type: object
properties:
  from:
    type: string
    enum:
      - INIT_SCREEN
      - RESULT_SCREEN
      - RESULT_NAV
      - RECORD_SCREEN
      - EXTERNAL_REQUEST
      - API_REQUEST
      - USER_SCREENS
      - BOOKCLUB_APP
      - USER_HOLD_SCREEN
      - SEARCH_SUGGEST
      - USER_FAV_SCREEN
      - USER_HST_SCREEN
      - USER_HSTV_SCREEN
      - NR_WEB
      - NR_PREVIEW_WEB
      - NR_PREVIEW_APP
      - PDFV_WEB
      - PDFV_PREVIEW_WEB
      - PDFV_PREVIEW_APP
    description: Indicates the origin of the visit

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body NewImageView false Params to send within the body
from body string false Indicates the origin of the visit

Enumerated Values

Parameter Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

Responses

Status Meaning Description Schema
204 No Content Successful Request None

PostRemoteView

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/records/{recordId}/remote/view \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/records/{recordId}/remote/view");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "description": "Register a visualization in a image type resource",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "enum": [
        "INIT_SCREEN",
        "RESULT_SCREEN",
        "RESULT_NAV",
        "RECORD_SCREEN",
        "EXTERNAL_REQUEST",
        "API_REQUEST",
        "USER_SCREENS",
        "BOOKCLUB_APP",
        "USER_HOLD_SCREEN",
        "SEARCH_SUGGEST",
        "USER_FAV_SCREEN",
        "USER_HST_SCREEN",
        "USER_HSTV_SCREEN",
        "NR_WEB",
        "NR_PREVIEW_WEB",
        "NR_PREVIEW_APP",
        "PDFV_WEB",
        "PDFV_PREVIEW_WEB",
        "PDFV_PREVIEW_APP"
      ],
      "description": "Indicates the origin of the visit"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/records/{recordId}/remote/view',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /records/{recordId}/remote/view

Service to register a visualization in a external type resource

Service to register a visualization in a external type resource

Body parameter

description: Register a visualization in a image type resource
type: object
properties:
  from:
    type: string
    enum:
      - INIT_SCREEN
      - RESULT_SCREEN
      - RESULT_NAV
      - RECORD_SCREEN
      - EXTERNAL_REQUEST
      - API_REQUEST
      - USER_SCREENS
      - BOOKCLUB_APP
      - USER_HOLD_SCREEN
      - SEARCH_SUGGEST
      - USER_FAV_SCREEN
      - USER_HST_SCREEN
      - USER_HSTV_SCREEN
      - NR_WEB
      - NR_PREVIEW_WEB
      - NR_PREVIEW_APP
      - PDFV_WEB
      - PDFV_PREVIEW_WEB
      - PDFV_PREVIEW_APP
    description: Indicates the origin of the visit

Parameters

Name In Type Required Description
recordId path string true Record Identifier
body body NewRemoteView false Params to send within the body
from body string false Indicates the origin of the visit

Enumerated Values

Parameter Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

Responses

Status Meaning Description Schema
204 No Content Successful Request None

Patrons

GetPatrons

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons

Service to retrieve the patrons

Service to retrieve the library patrons. It accepts several filters to refine the patrons

Parameters

Name In Type Required Description
patronIds query string false A comma-delimited list of patron identifiers to retrieve.
query query string false String to filter patron collection by a Patron property. Nowadays the only one implemented is externalId.
limit query string false The max number of patrons to include in the response.
offset query string false The number of the starting element to resume a previous search.

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronResponse

PostPatron

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "externalId": "123456789",
  "name": "John Smith",
  "email": "jsmith@email.com",
  "customer": "BI002",
  "observations": "teacher",
  "additionalInfo": {
    "identifierType": "CARD_NUMBER",
    "password": "Password123",
    "profile": "profile1",
    "signUpDate": 1557305679000,
    "expiringDate": 1564305271100,
    "noSendVerificationEmail": false
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons

Service to register new patrons

Service to register new patrons through API

Body parameter

{
  "externalId": "123456789",
  "name": "John Smith",
  "email": "jsmith@email.com",
  "customer": "BI002",
  "observations": "teacher",
  "additionalInfo": {
    "identifierType": "CARD_NUMBER",
    "password": "Password123",
    "profile": "profile1",
    "signUpDate": 1557305679000,
    "expiringDate": 1564305271100,
    "noSendVerificationEmail": false
  }
}

Parameters

Name In Type Required Description
body body CreatePatronRequest true Params to send within the body
externalId body string true none
name body string true none
email body string false none
customer body string false none
observations body string false none
additionalInfo body AdditionalInfo true none
» identifierType body string true none
» password body string true none
» profile body string false none
» signUpDate body number false none
» expiringDate body string false Optional expiration date for the user account. Accepted formats: - ISO 8601 date-time with offset (e.g. 2031-08-15T12:27:51+02:00) - ISO 8601 date YYYY-MM-DD: Same as YYYY-MM-DDT00:00:00+00:00 If omitted and the client has configured a default expiration date, that default will be used instead.
» noSendVerificationEmail body boolean false none

Enumerated Values

Parameter Value
» identifierType USER
» identifierType PASSWORD
» identifierType USER_ID
» identifierType LAST_NAME
» identifierType FULL_NAME
» identifierType PIN
» identifierType BARCODE
» identifierType USER_OR_BARCODE
» identifierType EMAIL
» identifierType CARD_NUMBER
» identifierType LAST_4_DIGITS_PHONE
» identifierType PARTNER_NUMBER
» identifierType AZTECA_SIGNATURE
» identifierType EXTERNAL_URL

Example responses

200 Response

{
  "userId": "002000123",
  "status": "OK"
}

Responses

Status Meaning Description Schema
200 OK Successful Request CreatePatronResponse
400 Bad Request Error while creating user None

GetPatron

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}

Service to retrieve a single patron

Service to retrieve a single patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronResponse

PutPatron

Code samples

# You can also use wget
curl -X PUT https://api.odilo.io/opac/api/v2/patrons/{patronId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "name": "Odilo Admin Account",
  "email": null,
  "expiringDate": 1564305271100
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /patrons/{patronId}

Service to update patron info

Service to update existing patrons through API

Body parameter

{
  "name": "Odilo Admin Account",
  "email": null,
  "expiringDate": 1564305271100
}

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
body body PatronUpdateRequest true Param to send within the body
name body string false Patron's name
email body string false e-mail address
expiringDate body number false Patron expiration date in miliseconds since the epoch (1-jan-1970 00:00)

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronResponse
404 Not Found Patron not found None

PostPicture

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/picture \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "file"
  ],
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "Picture File. Allowed formats BMP, GIF, JPG, JPEG, SVG and PNG. Max file size allowed 5 MB"
    }
  }
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/picture',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/picture

Service to upload a patron profile picture

Service to upload a picture for the given patron

Body parameter

type: object
required:
  - file
properties:
  file:
    type: string
    format: binary
    description: >-
      Picture File. Allowed formats BMP, GIF, JPG, JPEG, SVG and PNG. Max file
      size allowed 5 MB

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
file body string(binary) true Picture File. Allowed formats BMP, GIF, JPG, JPEG, SVG and PNG. Max file size allowed 5 MB

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronResponse
400 Bad Request Unsupported image file extension None

DeletePicture

Code samples

# You can also use wget
curl -X DELETE https://api.odilo.io/opac/api/v2/patrons/{patronId}/picture \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/picture',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /patrons/{patronId}/picture

Service to delete a patron profile picture

Service to delete a picture for the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": null,
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039"
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronResponse

GetPatronCheckouts

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/checkouts

Service to retrieve the patron's active checkouts

Service to retrieve the patron's active checkouts

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
recordId query string false Record Internal Identifier
issueDate query string(date (YYYYMMDD)) false In case the given recordId belongs to a subscription type resource, you can specify the issue date.

Example responses

200 Response

{
  "id": "3695",
  "recordId": "00005337",
  "downloadUrl": "https://...",
  "startTime": "1557416200083",
  "endTime": "1560008200083",
  "renewable": true,
  "returnable": true,
  "formats": [
    "EBOOK_STREAMING",
    "ACSM",
    "OCS"
  ],
  "recordhunkId": "14724",
  "issueDate": null,
  "displayedOnHistory": false
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutResponse

DisablePatron

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/disable \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/disable");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/disable',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/disable

Service to disable the given patron

Service to disable the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Responses

Status Meaning Description Schema
200 OK Successful Request None
404 Not Found Patron not found None

GetPatronCheckoutHistory

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts/history \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts/history");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts/history',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/checkouts/history

Service to retrieve the patron's checkouts history

Service to retrieve the patron's checkouts history

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
limit query string false The max number of records to include in the response
offset query string false The number of the starting element to resume a previous search

Example responses

200 Response

{
  "checkoutId": 3661,
  "recordId": "00005336",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "cover": "https://...cover.jpg",
  "format": "EBOOK",
  "patronId": "002000199",
  "issueDate": null,
  "startTime": 1557389751347,
  "endTime": 1557755276396
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutHistoryResponse

PutHideCheckouts

Code samples

# You can also use wget
curl -X PUT https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts/{checkoutId}/hide \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts/{checkoutId}/hide");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/checkouts/{checkoutId}/hide',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /patrons/{patronId}/checkouts/{checkoutId}/hide

Service to hide a checkout from the patron checkout history

Service to hide a checkout from the patron checkout history

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
checkoutId path integer true Checkout Internal Identifier

Example responses

200 Response

{
  "id": "3695",
  "recordId": "00005337",
  "downloadUrl": "https://...",
  "startTime": "1557416200083",
  "endTime": "1560008200083",
  "renewable": true,
  "returnable": true,
  "formats": [
    "EBOOK_STREAMING",
    "ACSM",
    "OCS"
  ],
  "recordhunkId": "14724",
  "issueDate": null,
  "displayedOnHistory": false
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutResponse

GetPatronHolds

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/holds \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/holds");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/holds',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/holds

Service to retrieve the holds for the given patron

Service to retrieve the holds for the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
recordId query string false Record Internal Identifier
issueDate query string(date (YYYYMMDD)) false In case the given recordId belongs to a subscription type resource, you can specify the issue date.

Example responses

200 Response

{
  "id": "000000741",
  "recordId": "00005336",
  "patronId": "002000203",
  "available": false,
  "holdQueuePosition": "1",
  "startTime": "1557478135151",
  "notifiedTime": "",
  "status": "waiting",
  "recordhunkId": "",
  "issueDate": "",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "coverURL": "https://...",
  "format": "EBOOK",
  "availableUntilTime": ""
}

Responses

Status Meaning Description Schema
200 OK Successful Request HoldResponse

GetPatronFavorites

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/favorites

Retrieves the collection of resources saved as favorites by the given patron

Retrieves the collection of resources saved as favorites by the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
ResourceId query string false Record Internal Identifier

Example responses

200 Response

{
  "id": 45,
  "availableForCheckout": false,
  "coverURL": "https://.../cover.jpg",
  "format": "EBOOK",
  "date": 1557740633000,
  "available": true,
  "title": "Child of storm",
  "author": "Haggard, Henry Rider",
  "patronId": "002000199",
  "resourceId": "00005353"
}

Responses

Status Meaning Description Schema
200 OK Successful Request FavoritesResponse

DeletePatronFavorites

Code samples

# You can also use wget
curl -X DELETE https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /patrons/{patronId}/favorites

Removes one or all favorites from patrons list

Removes one or all favorites from patrons list

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier whose favorites want to be deleted
ResourceId query string false Internal Identifier of the resource wich favorite you want to undo. If not present, the whole favorites list onwed by the patron is deleted.

Example responses

200 Response

{
  "id": 45,
  "availableForCheckout": false,
  "coverURL": "https://.../cover.jpg",
  "format": "EBOOK",
  "date": 1557740633000,
  "available": true,
  "title": "Child of storm",
  "author": "Haggard, Henry Rider",
  "patronId": "002000199",
  "resourceId": "00005353"
}

Responses

Status Meaning Description Schema
200 OK Successful Request FavoritesResponse
400 Bad Request Could not delete requested resources or resources has been already deleted None

PostPatronFavorites

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "resourceId"
  ],
  "properties": {
    "resourceId": {
      "type": "string",
      "description": "Internal Identifier of the resource that you want to mark as favorite"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/favorites',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/favorites

Add a given record to the favorites list

Add a given record to the favorites list

Body parameter

type: object
required:
  - resourceId
properties:
  resourceId:
    type: string
    description: Internal Identifier of the resource that you want to mark as favorite

Parameters

Name In Type Required Description
patronId path string true Internal Identifier of the patron who wants to mark a record as favorite
resourceId body string true Internal Identifier of the resource that you want to mark as favorite

Example responses

200 Response

{
  "id": 45,
  "availableForCheckout": false,
  "coverURL": "https://.../cover.jpg",
  "format": "EBOOK",
  "date": 1557740633000,
  "available": true,
  "title": "Child of storm",
  "author": "Haggard, Henry Rider",
  "patronId": "002000199",
  "resourceId": "00005353"
}

Two possible causes. The first is that the resource is already marked as favorite. The second is that parameter resourceId is not a sequence of 1 to 8 digits.

"Resource is already a favorite"
"Invalid resourceId: '9999999999999999'. The resourceId must be a sequence of 1 to 8 digits (0-9) with no other characters."

Responses

Status Meaning Description Schema
200 OK Successful Request FavoritesResponse
400 Bad Request Two possible causes. The first is that the resource is already marked as favorite. The second is that parameter resourceId is not a sequence of 1 to 8 digits. string

PostConfig

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/config \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/config");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "profilePictureUrl": "https://.../picture.jpg",
  "autoAcceptHolds": false
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/config',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/config

Service to modify the user configuration

Service to modify the user configuration

Body parameter

{
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "profilePictureUrl": "https://.../picture.jpg",
  "autoAcceptHolds": false
}

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
body body PatronConfigRequest true Params to send within the body
externalId body string false Patron's external identifier
name body string false Patron's name
email body string false e-mail address
profilePictureUrl body string(url) false Profile Picture URL
autoAcceptHolds body boolean false Indicates if the patron autoaccept holds when they are available
showRecommendations body boolean false Indicates if user want to receive personal recommendations ("Recommended for you" carousel on the homepage and item detail screen) or not.

Example responses

200 Response

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

400 Response

{
  "ERRORINFO": "Attempted to replace existing non-blank email with a blank one.",
  "ERROR": "ERROR_ATTEMPTED_EMAIL_REMOVAL"
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronResponse
400 Bad Request Invalid request — sent when the request email is blank and it would replace non blank user email. NOTE. This validation logic is only applied to requests that are not sent from apps or do not contain a non blank value for field newPassword. This logic does not apply to client KB either. Inline

Response Schema

Status Code 400

Name Type Required Restrictions Description
» ERRORINFO string false none none
» ERROR string false none none

Enumerated Values

Property Value
ERROR ERROR_ATTEMPTED_EMAIL_REMOVAL

PostResetPassword

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/reset-password \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/reset-password");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "identifier"
  ],
  "properties": {
    "identifier": {
      "type": "string",
      "description": "Patron's external identifier",
      "example": {
        "identifier": "OdiloUser"
      }
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/reset-password',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/reset-password

Service to reset the patron's password

Sends an e-mail to the patron with instructions to reset the password

Body parameter

type: object
required:
  - identifier
properties:
  identifier:
    type: string
    description: Patron's external identifier
    example:
      identifier: OdiloUser

Parameters

Name In Type Required Description
identifier body string true Patron's external identifier

Responses

Status Meaning Description Schema
202 Accepted Successful Request. An e-mail is sent to the patron. None

GetPatronRecommendations

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/recommendations \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/recommendations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/recommendations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/recommendations

Service to retrieve recommended resources for the given patron

Service to retrieve recommended resources chosen taking to account the activity of the patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "recordId": "00006322",
  "title": "Gotas de Sangre: Crímenes y criminales",
  "author": "Bonafoux Quintero, Luis",
  "description": "Gotas de sangre: Crímenes y criminales, es un compendio de historias que, en un momento dado, han sido el reflejo de un grupo social en particular que atrae al lector. Los relatos descriptivos y entretenidos, hacen volver a la época y denotan objetivamente el nivel sociológico del acontecimiento.",
  "coverImageUrl": "https://.../cover.jpg",
  "resourceTypes": [
    "TIPO_EBOOK",
    "TIPO_STREAMING_EPUB",
    "TIPO_OCS_EPUB"
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request RecommendationsResponse

GetPatronStats

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/stats \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/stats");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/stats',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/stats

Service to retrieve reading statistics

Service to retrieve reading statistics for the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "ebookFirstDate": 1559201940806,
  "ebookLastDate": 1559201953277,
  "ebookTimeReading": 5272,
  "ebookPagesRead": 4,
  "ebookReadingPercentage": 1,
  "ebookSource": [
    "NubeReader",
    "100.0"
  ],
  "ebookTitle": "First Love",
  "totalEbooks": 3,
  "totalTime": 81568,
  "totalPages": 34,
  "minutesReadByHourInLast30days": [
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
    0,
    1,
    0,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful Request PatronStatsResponse

GetVisualizations

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/visualizations/history \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/visualizations/history");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/visualizations/history',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/visualizations/history

Service to retrieve the external resources visualization history

Service to retrieve the external resources visualization history

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
limit query string false Amount of results to retrieve
offset query string false Result position to resume a search

Example responses

200 Response

{
  "totalElements": 4,
  "elements": {
    "id": 855,
    "fecha": 1560512781297,
    "numeroInformatico": "00029667",
    "lectorIp": "002000572",
    "title": "Dracula",
    "valoration": 5,
    "visualizationType": "REMOTE"
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request VisualizationResponse

PutHideVisualizations

Code samples

# You can also use wget
curl -X PUT https://api.odilo.io/opac/api/v2/patrons/{patronId}/visualizations/{visualizationHistoryId}/hide?type=type,string,enum,REMOTE%2CIMAGE \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/visualizations/{visualizationHistoryId}/hide?type=type,string,enum,REMOTE%2CIMAGE");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/visualizations/{visualizationHistoryId}/hide?type=type,string,enum,REMOTE%2CIMAGE',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /patrons/{patronId}/visualizations/{visualizationHistoryId}/hide

Service to hide an external resource from the visualization history

Service to hide an external resource from the visualization history

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
visualizationHistoryId path integer true Visualization Internal Identifier
type query string true Type of external resource

Enumerated Values

Parameter Value
type REMOTE
type IMAGE

Example responses

200 Response

{
  "id": 855,
  "fecha": 1560512781297,
  "numeroInformatico": "00029667",
  "lectorIp": "002000572",
  "title": "Dracula",
  "valoration": 5,
  "visualizationType": "REMOTE"
}

Responses

Status Meaning Description Schema
200 OK Successful Request VisualizationElements

GetList

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/lists

Service to retrieve the lists of a given patron

Service to retrieve the lists of a given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": 161,
  "userId": 2000199,
  "privateList": false,
  "visits": 134,
  "creationDate": 1558523555138,
  "items": {
    "id": 226,
    "listId": 161,
    "recordId": "00005638",
    "creationDate": 1558523560250
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request ListsResponse

PostList

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "listName",
    "privateList"
  ],
  "properties": {
    "listName": {
      "type": "string",
      "description": "List name",
      "example": {
        "identifier": "Books I want to read"
      }
    },
    "privateList": {
      "type": "boolean",
      "description": "Indicates whether the list is public or not"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/lists

Service to create a new list

Service to create a new list

Body parameter

type: object
required:
  - listName
  - privateList
properties:
  listName:
    type: string
    description: List name
    example:
      identifier: Books I want to read
  privateList:
    type: boolean
    description: Indicates whether the list is public or not

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
listName body string true List name
privateList body boolean true Indicates whether the list is public or not

Example responses

200 Response

{
  "id": 161,
  "userId": 2000199,
  "privateList": false,
  "visits": 134,
  "creationDate": 1558523555138,
  "items": {
    "id": 226,
    "listId": 161,
    "recordId": "00005638",
    "creationDate": 1558523560250
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request ListsResponse

DeleteList

Code samples

# You can also use wget
curl -X DELETE https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /patrons/{patronId}/lists/{listId}

Service to delete a list

Service to delete a list

Parameters

Name In Type Required Description
patronId path string true Patron Identifier
listId path integer true List Identifier

Example responses

200 Response

{
  "id": 161,
  "userId": 2000199,
  "privateList": false,
  "visits": 134,
  "creationDate": 1558523555138,
  "items": {
    "id": 226,
    "listId": 161,
    "recordId": "00005638",
    "creationDate": 1558523560250
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request ListsResponse

PostElementList

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId} \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "resourceId"
  ],
  "properties": {
    "resourceId": {
      "type": "string",
      "description": "Record Indentifier",
      "example": {
        "identifier": "00005637"
      }
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/lists/{listId}

Service to add an element to a list

Service to add an element to a list

Body parameter

type: object
required:
  - resourceId
properties:
  resourceId:
    type: string
    description: Record Indentifier
    example:
      identifier: '00005637'

Parameters

Name In Type Required Description
patronId path string true Patron Identifier
listId path integer true List Identifier
resourceId body string true Record Indentifier

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "List Item Identifier"
    },
    "listId": {
      "type": "integer",
      "description": "List Identifier"
    },
    "recordId": {
      "type": "string",
      "description": "Resource Identifier"
    },
    "creationDate": {
      "type": "integer",
      "format": "timestamp",
      "description": "Date when the resource was added to the list"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request ListItem

DeleteItemList

Code samples

# You can also use wget
curl -X DELETE https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}/{itemId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}/{itemId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/lists/{listId}/{itemId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /patrons/{patronId}/lists/{listId}/{itemId}

Service to delete a resource included in a list

Service to delete a resource included in a list

Parameters

Name In Type Required Description
patronId path string true Patron Identifier
listId path integer true List Identifier
itemId path integer true List Item Identifier

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "List Item Identifier"
    },
    "listId": {
      "type": "integer",
      "description": "List Identifier"
    },
    "recordId": {
      "type": "string",
      "description": "Resource Identifier"
    },
    "creationDate": {
      "type": "integer",
      "format": "timestamp",
      "description": "Date when the resource was added to the list"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request ListItem

GetDevices

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/devices \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/devices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/devices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/devices

Retrieves the associated devices

Retrieves the devices associated to the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "135277f7-e6cb-4451-9db2-5ae3f95f724c",
  "clientCode": "P0001",
  "userId": "002000199",
  "deviceId": "9badcbf69ffe703",
  "deviceName": "LG-M160",
  "deviceModel": "LGE LG-M160",
  "active": true,
  "createdDate": 1558438023233,
  "modificationDate": 1558526456897
}

Responses

Status Meaning Description Schema
200 OK Successful Request Devices

PutDevices

Code samples

# You can also use wget
curl -X PUT https://api.odilo.io/opac/api/v2/patrons/{patronId}/devices/{deviceId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/devices/{deviceId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "id": "135277f7-e6cb-4451-9db2-5ae3f95f724c",
  "clientCode": "P0001",
  "userId": "002000199",
  "deviceId": "9badcbf69ffe703",
  "deviceName": "LG-M160",
  "deviceModel": "LGE LG-M160",
  "active": true,
  "createdDate": 1558438023233,
  "modificationDate": 1558526456897
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/devices/{deviceId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /patrons/{patronId}/devices/{deviceId}

Deactivates user account in the associated device

Deactivates user account in the associated device

Body parameter

{
  "id": "135277f7-e6cb-4451-9db2-5ae3f95f724c",
  "clientCode": "P0001",
  "userId": "002000199",
  "deviceId": "9badcbf69ffe703",
  "deviceName": "LG-M160",
  "deviceModel": "LGE LG-M160",
  "active": true,
  "createdDate": 1558438023233,
  "modificationDate": 1558526456897
}

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
deviceId path string true Device Internal Identifier
body body Devices true Param to send within the body
id body string false Device Identifier
clientCode body string true Customer Identifier
userId body string true Patron Identifier
deviceId body string true Device Model Identifier
deviceName body string false Device Name
deviceModel body string false Device Model
active body boolean true Indicates if the patron's account is activated in this device
createdDate body integer(timestamp) false Device Activation Date
modificationDate body integer(timestamp) false Date of the last device activation status change

Example responses

200 Response

{
  "id": "135277f7-e6cb-4451-9db2-5ae3f95f724c",
  "clientCode": "P0001",
  "userId": "002000199",
  "deviceId": "9badcbf69ffe703",
  "deviceName": "LG-M160",
  "deviceModel": "LGE LG-M160",
  "active": true,
  "createdDate": 1558438023233,
  "modificationDate": 1558526456897
}

Responses

Status Meaning Description Schema
200 OK Successful Request Devices

GetNotifications

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/notifications

Retrieves all the notifications sent to the user

Retrieves all the notifications sent to the user

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "ca633aa5-8c29-4a6d-a106-d3a8441844a9",
  "subject": "Reserva disponible",
  "content": "Ya está disponible la reserva de La bodega",
  "userList": [
    "002000199"
  ],
  "byEmail": false,
  "notifyApps": true,
  "dateCreated": 1559112699000,
  "unread": false
}

Responses

Status Meaning Description Schema
200 OK Successful Request NotificationsResponse

DeleteNotifications

Code samples

# You can also use wget
curl -X PUT https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "privateList"
  ],
  "properties": {
    "listIds": {
      "type": "string",
      "description": "List ids"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /patrons/{patronId}/notifications

Notifies the removal of all notifications from a user in a logical way

Notifies the removal of all notifications from a user in a logical way

Body parameter

type: object
required:
  - privateList
properties:
  listIds:
    type: string
    description: List ids

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
listIds body string false List ids

Responses

Status Meaning Description Schema
200 OK Successful Request None

ReadNotifications

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/read \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/read");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "privateList"
  ],
  "properties": {
    "listIds": {
      "type": "string",
      "description": "List ids"
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/read',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/notifications/read

Notifies that all notifications from a customer have been read

Notifies that all notifications from a customer have been read

Body parameter

type: object
required:
  - privateList
properties:
  listIds:
    type: string
    description: List ids

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
listIds body string false List ids

Responses

Status Meaning Description Schema
200 OK Successful Request None

GetUnreadNotifications

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/unread \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/unread");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/unread',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/notifications/unread

Retrieves only the unread notifications sent to the user

Retrieves only the unread notifications sent to the user

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "ca633aa5-8c29-4a6d-a106-d3a8441844a9",
  "subject": "Reserva disponible",
  "content": "Ya está disponible la reserva de La bodega",
  "userList": [
    "002000199"
  ],
  "byEmail": false,
  "notifyApps": true,
  "dateCreated": 1559112699000,
  "unread": false
}

Responses

Status Meaning Description Schema
200 OK Successful Request NotificationsResponse

GetUnreadCount

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/unread/count \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/unread/count");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/notifications/unread/count',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/notifications/unread/count

Retrieves the account of unread notifications sent to the user

Retrieves the account of unread notifications sent to the user

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "account": 0
}

Responses

Status Meaning Description Schema
200 OK Successful Request Inline

Response Schema

Status Code 200

Account of unread notifications

Name Type Required Restrictions Description
» account integer false none none

GetSavedSearches

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /patrons/{patronId}/searches

Retrieves the saved searches for the given patron

Retrieves the saved searches for the given patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier

Example responses

200 Response

{
  "id": 201,
  "userdId": "002000199",
  "total": 2,
  "query": "allfields_txt:\"cervantes\"",
  "searchDate": 1559576745626,
  "facets": "genero_facet_ss:\"Novela\";materia_facet_ss:\"Romance\""
}

Responses

Status Meaning Description Schema
200 OK Successful Request SearchesModel

PostSaveSearches

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "id": 201,
  "userdId": "002000199",
  "total": 2,
  "query": "allfields_txt:\"cervantes\"",
  "searchDate": 1559576745626,
  "facets": "genero_facet_ss:\"Novela\";materia_facet_ss:\"Romance\""
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/searches

Save a search query

Retrieves the search history for the given patron

Body parameter

{
  "id": 201,
  "userdId": "002000199",
  "total": 2,
  "query": "allfields_txt:\"cervantes\"",
  "searchDate": 1559576745626,
  "facets": "genero_facet_ss:\"Novela\";materia_facet_ss:\"Romance\""
}

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
body body SearchesModel true Params to send within the body
id body integer false Search ID
userdId body string false Patron Identifier
total body integer false Amount of results obtained
query body string false Search terms used
searchDate body integer(timestamp) true Search Date
facets body string false Filters applied to the search

Example responses

200 Response

{
  "id": 201,
  "userdId": "002000199",
  "total": 2,
  "query": "allfields_txt:\"cervantes\"",
  "searchDate": 1559576745626,
  "facets": "genero_facet_ss:\"Novela\";materia_facet_ss:\"Romance\""
}

Responses

Status Meaning Description Schema
200 OK Successful Request SearchesModel

DeleteSavedSearches

Code samples

# You can also use wget
curl -X DELETE https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches/{searchId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches/{searchId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/searches/{searchId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /patrons/{patronId}/searches/{searchId}

Delete a saved search query

Delete a saved search query

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
searchId path integer true Search Internal Identifier

Example responses

200 Response

{
  "id": 201,
  "userdId": "002000199",
  "total": 2,
  "query": "allfields_txt:\"cervantes\"",
  "searchDate": 1559576745626,
  "facets": "genero_facet_ss:\"Novela\";materia_facet_ss:\"Romance\""
}

Responses

Status Meaning Description Schema
200 OK Successful Request SearchesModel

PutConfig

Code samples

# You can also use wget
curl -X PUT https://api.odilo.io/opac/api/v2/patrons/{patronId}/profile \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/profile");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "policyName"
  ],
  "properties": {
    "policyName": {
      "type": "string",
      "description": "User name policy",
      "example": {
        "patronId": "Default"
      }
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/profile',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /patrons/{patronId}/profile

Service to modify the user policy

Service to modify the user policy

Body parameter

type: object
required:
  - policyName
properties:
  policyName:
    type: string
    description: User name policy
    example:
      patronId: Default

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
policyName body string true User name policy

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "renewable": {
      "type": "boolean"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» renewable boolean false none none

ConfigureEmailAllowance

Code samples

# You can also use wget
curl -X PATCH https://api.odilo.io/opac/api/v2/patrons/{patronId}/allow-emails?allow=allow,true \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/allow-emails?allow=allow,true");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/allow-emails?allow=allow,true',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /patrons/{patronId}/allow-emails

Service to configure email allowance for a patron

Service to allow or disallow the platform from sending emails to the patron

Parameters

Name In Type Required Description
patronId path string true Patron Internal Identifier
allow query boolean true Whether to allow emails to be sent to the patron

Example responses

404 Response

{
  "message": "Patron with id 002000245 not found"
}

Responses

Status Meaning Description Schema
200 OK Successful Request None
404 Not Found Patron not found Inline

Response Schema

Status Code 404

Name Type Required Restrictions Description
» message string false none none

JoinLearningExperience

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/patrons/{patronId}/experiences/joined \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/patrons/{patronId}/experiences/joined");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "shareId"
  ],
  "properties": {
    "shareId": {
      "type": "string",
      "description": "The unique string identifier for the shared learning experience.",
      "example": "5W1622WL"
    }
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/patrons/{patronId}/experiences/joined',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /patrons/{patronId}/experiences/joined

Join a Learning Experience

Allows a patron to join a specific learning experience from OLE using a shareId. Validation is performed to ensure the patron exists and is authorized to join.

Error Handling

Errors are returned following the JoinExperienceError schema as consistently as possible. This is the same format used by OLE for known errors. See OLE Documentation

Known cases where we are not returning errors with schema JoinExperienceError:

Body parameter

{
  "type": "object",
  "required": [
    "shareId"
  ],
  "properties": {
    "shareId": {
      "type": "string",
      "description": "The unique string identifier for the shared learning experience.",
      "example": "5W1622WL"
    }
  }
}

Parameters

Name In Type Required Description
patronId path string true The unique identifier of the patron (user).
body body JoinExperienceRequest true Request containing the identifier of the experience to join.
shareId body string true The unique string identifier for the shared learning experience.

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "experienceId": {
      "type": "string",
      "example": "690b30a4f15dbbef903ec2c1"
    }
  }
}

Bad Request (Validation Failure).

{
  "i18n": {
    "key": "INVALID_SHARE_ID"
  },
  "message": "Request must include body"
}

Not Found - Patron ID or Experience corresponding to shareId do not exist.

{
  "i18n": {
    "key": "PATRON_NOT_FOUND"
  },
  "message": "Could not find patron for patron Id {patronId}"
}

Conflict - User is already a follower.

{
  "i18n": {
    "key": "USER_ALREADY_FOLLOWER"
  },
  "message": "User 6909e976fdfa15322785060f is already follower of experience 690b30a4f15dbbef903ec2c1"
}

Internal Server Error

{
  "i18n": {
    "key": "UNEXPECTED_ERROR"
  },
  "message": "Unexpected error"
}
{
  "i18n": {
    "key": "ERROR_CALLING_OLE"
  },
  "message": "Error calling OLE"
}

Responses

Status Meaning Description Schema
200 OK Successfully joined the experience. JoinExperienceResponse
400 Bad Request Bad Request (Validation Failure). JoinExperienceError
404 Not Found Not Found - Patron ID or Experience corresponding to shareId do not exist. JoinExperienceError
409 Conflict Conflict - User is already a follower. JoinExperienceError
500 Internal Server Error Internal Server Error JoinExperienceError

Lists

GetMultipleLists

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/lists?listIds=161%2C445%2C129 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/lists?listIds=161%2C445%2C129");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/lists?listIds=161%2C445%2C129',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /lists

Service to retrive multiple lists

Service to retrive multiple lists

Parameters

Name In Type Required Description
listIds query string true List Internal Identifiers

Example responses

200 Response

[
  {
    "id": 161,
    "userId": 2000199,
    "privateList": false,
    "visits": 134,
    "creationDate": 1558523555138,
    "items": {
      "id": 226,
      "listId": 161,
      "recordId": "00005638",
      "creationDate": 1558523560250
    }
  }
]

Responses

Status Meaning Description Schema
200 OK Successful Request MultipleListsResponse

GetLists

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/lists/{listId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/lists/{listId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/lists/{listId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /lists/{listId}

Service to retrive an specific list

Service to retrive an specific list

Parameters

Name In Type Required Description
listId path integer true List Internal Identifier

Example responses

200 Response

{
  "id": 161,
  "userId": 2000199,
  "privateList": false,
  "visits": 134,
  "creationDate": 1558523555138,
  "items": {
    "id": 226,
    "listId": 161,
    "recordId": "00005638",
    "creationDate": 1558523560250
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request ListsResponse

Holds

GetHold

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/holds/{holdId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/holds/{holdId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/holds/{holdId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /holds/{holdId}

Retrieves the information about an specific hold

Retrieves the information about an specific hold

Parameters

Name In Type Required Description
holdId path string true Hold Internal Identifier

Example responses

200 Response

{
  "id": "000000741",
  "recordId": "00005336",
  "patronId": "002000203",
  "available": false,
  "holdQueuePosition": "1",
  "startTime": "1557478135151",
  "notifiedTime": "",
  "status": "waiting",
  "recordhunkId": "",
  "issueDate": "",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "coverURL": "https://...",
  "format": "EBOOK",
  "availableUntilTime": ""
}

Responses

Status Meaning Description Schema
200 OK Successful Request HoldResponse

PostCancelHold

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/holds/{holdId}/cancel \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/holds/{holdId}/cancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/holds/{holdId}/cancel',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /holds/{holdId}/cancel

Service to cancel an specific hold

Service to cancel an specific hold

Parameters

Name In Type Required Description
holdId path string true Hold Internal Identifier

Example responses

200 Response

{
  "id": "000000741",
  "recordId": "00005336",
  "patronId": "002000203",
  "available": false,
  "holdQueuePosition": "1",
  "startTime": "1557478135151",
  "notifiedTime": "",
  "status": "cancelled",
  "recordhunkId": "",
  "issueDate": "",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "coverURL": "https://...",
  "format": "EBOOK",
  "availableUntilTime": ""
}

Responses

Status Meaning Description Schema
200 OK Successful Request HoldResponse

Checkouts

GetCheckout

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}?patronId=002000245 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}?patronId=002000245");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}?patronId=002000245',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /checkouts/{checkoutId}

Retrieves the information about an specific checkout

Retrieves the information about an specific checkout

Parameters

Name In Type Required Description
checkoutId path string true Checkout Internal Identifier
patronId query string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "3695",
  "recordId": "00005337",
  "downloadUrl": "https://...",
  "startTime": "1557416200083",
  "endTime": "1560008200083",
  "renewable": true,
  "returnable": true,
  "formats": [
    "EBOOK_STREAMING",
    "ACSM",
    "OCS"
  ],
  "recordhunkId": "14724",
  "issueDate": null,
  "displayedOnHistory": false
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutResponse

GetDownloadCheckout

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/download?patronId=002000245&token=b39e5626236c088e \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/download?patronId=002000245&token=b39e5626236c088e");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/download?patronId=002000245&token=b39e5626236c088e',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /checkouts/{checkoutId}/download

Downloads the file from an specific checkout

Downloads the file from an specific checkout

Parameters

Name In Type Required Description
checkoutId path string true Checkout Internal Identifier
patronId query string true Patron Internal Identifier
token query string true Checkout authorization token
format query Format false Format to download
streamId query string false Stream id for progressive download (only applicable to format=OCS)

Enumerated Values

Parameter Value
format EBOOK_STREAMING
format EPUB
format PDF
format ACSM
format ACSM_PDF
format ACSM_EPUB
format HTML
format MP3
format TXT
format DE_PDF
format MOBI
format WMA
format WMV
format DAISY
format PLKR
format QIOO
format JPG
format MP4
format SCORM
format OCS
format UNKNOWN

Responses

Status Meaning Description Schema
200 OK Successful Request. Serves the file. None

PostCheckoutRenew

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/renew \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/renew");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "required": [
    "patronId"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "Patron Internal Identifier",
      "example": {
        "patronId": "002000245"
      }
    }
  }
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/renew',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /checkouts/{checkoutId}/renew

Allows the patron to renew a loan which has not expired

Allows the patron to renew a loan which has not expired

Body parameter

type: object
required:
  - patronId
properties:
  patronId:
    type: string
    description: Patron Internal Identifier
    example:
      patronId: '002000245'

Parameters

Name In Type Required Description
checkoutId path string true Checkout Internal Identifier
patronId body string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "3695",
  "recordId": "00005337",
  "downloadUrl": "https://...",
  "startTime": "1557416200083",
  "endTime": "1560008200083",
  "renewable": true,
  "returnable": true,
  "formats": [
    "EBOOK_STREAMING",
    "ACSM",
    "OCS"
  ],
  "recordhunkId": "14724",
  "issueDate": null,
  "displayedOnHistory": false
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutResponse
409 Conflict Checkout not renewable None

PostCheckoutReturn

Code samples

# You can also use wget
curl -X POST https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/return \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/return");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');
const inputBody = '{
  "type": "object",
  "properties": {
    "patronId": {
      "type": "string",
      "description": "Patron Internal Identifier",
      "example": "002000245"
    }
  },
  "required": [
    "patronId"
  ]
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/return',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /checkouts/{checkoutId}/return

Service to return a loaned resource

Service to return a loaned resource

Body parameter

type: object
properties:
  patronId:
    type: string
    description: Patron Internal Identifier
    example: '002000245'
required:
  - patronId

Parameters

Name In Type Required Description
checkoutId path string true Checkout Internal Identifier
patronId body string true Patron Internal Identifier

Example responses

200 Response

{
  "id": "3746",
  "recordId": "00005613",
  "downloadUrl": null,
  "startTime": "1557827654605",
  "endTime": "1557828225544",
  "renewable": false,
  "returnable": true,
  "formats": null,
  "recordhunkId": 15324,
  "issueDate": null,
  "displayedOnHistory": true
}

Responses

Status Meaning Description Schema
200 OK Successful Request CheckoutResponse
500 Internal Server Error Checkout not found or the loan is not returnable None

GetCheckoutRenewable

Code samples

# You can also use wget
curl -X GET https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/renewable?patronId=002000245 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

URL obj = new URL("https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/renewable?patronId=002000245");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.odilo.io/opac/api/v2/checkouts/{checkoutId}/renewable?patronId=002000245',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /checkouts/{checkoutId}/renewable

Service to check if the checkout is renewable

Service to check if the checkout is renewable

Parameters

Name In Type Required Description
checkoutId path string true Checkout Internal Identifier
patronId query string true Patron Internal Identifier

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "renewable": {
      "type": "boolean",
      "description": "Token"
    }
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» renewable boolean false none Token

Schemas

TokenRequest

{
  "grant_type": "client_credentials"
}

Requesting a token

Properties

Name Type Required Restrictions Description
grant_type string true none Param to send within the body

TokenResponse

{
  "token": "2YotnFZFEjr1zCsicMWpAA",
  "type": "Bearer",
  "expires_in": 640
}

Token Request Succesful Response

Properties

Name Type Required Restrictions Description
token string false none Token
type string false none Type of token
expires_in number(int32) false none Period of token validity

LoginRequest

{
  "userId": "23046949",
  "password": "1",
  "library": "BI001"
}

Login Request

Properties

Name Type Required Restrictions Description
userId string true none User identifier
password string true none User password
library string false none Library Identidier

ResetPassword

{
  "description": "Reset Password Request",
  "type": "object",
  "required": [
    "code",
    "password"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "Reset Password Request Code"
    },
    "password": {
      "type": "string",
      "description": "Patron New Password"
    }
  }
}

Reset Password Request

Properties

Name Type Required Restrictions Description
code string true none Reset Password Request Code
password string true none Patron New Password

CheckoutRequest

{
  "description": "Performs a checkout",
  "type": "object",
  "required": [
    "patronId"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "User Identifier"
    },
    "format": {
      "type": "array",
      "description": "Available formats for this record",
      "items": {
        "description": "List of file formats supported by OdiloTK",
        "type": "array",
        "items": {
          "type": "string"
        },
        "enum": [
          "EBOOK_STREAMING",
          "EPUB",
          "PDF",
          "ACSM",
          "ACSM_PDF",
          "ACSM_EPUB",
          "HTML",
          "MP3",
          "TXT",
          "DE_PDF",
          "MOBI",
          "WMA",
          "WMV",
          "DAISY",
          "PLKR",
          "QIOO",
          "JPG",
          "MP4",
          "SCORM",
          "OCS",
          "UNKNOWN"
        ],
        "example": [
          "OCS",
          "ACSM",
          "EBOOK_STREAMING"
        ]
      }
    },
    "issueDate": {
      "type": "string",
      "format": "date (YYYYMMDD)",
      "description": "To perform a checkout over a specific periodical subscription issue number (magazines or newspapers)"
    }
  }
}

Performs a checkout

Properties

Name Type Required Restrictions Description
patronId string true none User Identifier
format [Format] false none Available formats for this record
issueDate string(date (YYYYMMDD)) false none To perform a checkout over a specific periodical subscription issue number (magazines or newspapers)

CheckoutResponse

{
  "id": "3695",
  "recordId": "00005337",
  "downloadUrl": "https://...",
  "startTime": "1557416200083",
  "endTime": "1560008200083",
  "renewable": true,
  "returnable": true,
  "formats": [
    "EBOOK_STREAMING",
    "ACSM",
    "OCS"
  ],
  "recordhunkId": "14724",
  "issueDate": null,
  "displayedOnHistory": false
}

Checkout Data Model Response

Properties

Name Type Required Restrictions Description
id string false none Checkout Identifier
recordId string false none Record Identifier
title string false none Resource Title
author string false none Resource author
cover string(url) false none Resource Cover URL
downloadUrl string(url) false none URL to download or open the title
startTime string(timestamp) false none Starting date for the checkout in miliseconds since the epoch (1-jan-1970 00:00)
endTime string(timestamp) false none Ending date for the checkout in miliseconds since the epoch (1-jan-1970 00:00)
renewable boolean false none Indicates if it is possible to renew this checkout
returnable boolean false none Indicates if this checkout can be returned before the ending date
formats [Format] false none Available formats that can be opened or downloaded for this record
physicalFormat PhysicalFormat|null false none Format of the physical resource, always null for non-physical resources. For physical resources it will be null for one of two reasons: either it is not available or it is available but we did not include it in the response.
recordhunkId string false none Internal identifier for the given copy of the title checked out
issueDate string(timestamp) false none If the title is a periodical subscription (magazine or newspaper), this field indicates the issue checked out
displayedOnHistory boolean false none Indicates if this checkout is displayed on the user's checkout history

CheckoutHistoryResponse

{
  "checkoutId": 3661,
  "recordId": "00005336",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "cover": "https://...cover.jpg",
  "format": "EBOOK",
  "patronId": "002000199",
  "issueDate": null,
  "startTime": 1557389751347,
  "endTime": 1557755276396
}

Checkout History Data Model Response

Properties

Name Type Required Restrictions Description
checkoutId integer false none Checkout Internal Identifier
recordId string false none Record Internal Identifier
title string false none Resource Title
author string false none Resource author
cover string(url) false none Resource Cover URL
format FormatFacet false none Record formats available in OdiloTK
patronId string false none Patron internal identifier
issueDate string(timestamp) false none If the title is a periodical subscription (magazine or newspaper), this field indicates the issue checked out
startTime integer(timestamp) false none Starting date for the checkout in miliseconds since the epoch (1-jan-1970 00:00)
endTime integer(timestamp) false none Ending date for the checkout in miliseconds since the epoch (1-jan-1970 00:00)

JoinExperienceRequest

{
  "type": "object",
  "required": [
    "shareId"
  ],
  "properties": {
    "shareId": {
      "type": "string",
      "description": "The unique string identifier for the shared learning experience.",
      "example": "5W1622WL"
    }
  }
}

Properties

Name Type Required Restrictions Description
shareId string true none The unique string identifier for the shared learning experience.

JoinExperienceResponse

{
  "type": "object",
  "properties": {
    "experienceId": {
      "type": "string",
      "example": "690b30a4f15dbbef903ec2c1"
    }
  }
}

Properties

Name Type Required Restrictions Description
experienceId string false none none

JoinExperienceError

{
  "type": "object",
  "properties": {
    "i18n": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "specific error code."
        }
      }
    },
    "message": {
      "type": "string",
      "description": "Message description in human readable format."
    }
  }
}

Properties

Name Type Required Restrictions Description
i18n object false none none
» key string false none specific error code.
message string false none Message description in human readable format.

HoldRequest

{
  "description": "Performs a hold over a given record",
  "type": "object",
  "required": [
    "patronId"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "Patron identifier"
    },
    "issueDate": {
      "type": "string",
      "format": "date (YYYYMMDD)",
      "description": "Necessary if you want to create a hold over a periodical subscription issue"
    }
  }
}

Performs a hold over a given record

Properties

Name Type Required Restrictions Description
patronId string true none Patron identifier
issueDate string(date (YYYYMMDD)) false none Necessary if you want to create a hold over a periodical subscription issue

HoldResponse

{
  "id": "000000741",
  "recordId": "00005336",
  "patronId": "002000203",
  "available": false,
  "holdQueuePosition": "1",
  "startTime": "1557478135151",
  "notifiedTime": "",
  "status": "waiting",
  "recordhunkId": "",
  "issueDate": "",
  "title": "The day's work",
  "author": "Kipling, Rudyard",
  "coverURL": "https://...",
  "format": "EBOOK",
  "availableUntilTime": ""
}

Hold Data Model Response

Properties

Name Type Required Restrictions Description
id string false none Hold Identifier
recordId string false none Record Identifier
patronId string false none Patron Identifier
available boolean false none Indicates if the hold is available to become a checkout
holdQueuePosition string false none Indicates the patron's position within the holds queue
startTime string(timestamp) false none Hold starting date
notifiedTime string(timestamp) false none If the hold is available to become a checkout, indicates the date when the patron was notified.
status string false none List of possible hold statuses
recordhunkId string false none Internal identifier for the given copy of the title reserved
issueDate string(timestamp) false none Issue Date if the holded resource is a periodical subscription
title string false none Record title
author string false none Record author
coverURL string(url) false none Link to the record cover
format [FormatFacet] false none Available formats for this record
availableUntilTime string(timestamp) false none Limit date to perform the checkout when status value is INFORMED

Enumerated Values

Property Value
status WAITING
status CANCELLED
status INFORMED
status DOWNLOADED
status EXPIRED

DownloadRequest

{
  "description": "Download a free access resource",
  "type": "object",
  "required": [
    "patronId",
    "format"
  ],
  "properties": {
    "patronId": {
      "type": "string",
      "description": "User Identifier"
    },
    "format": {
      "type": "array",
      "description": "Available formats for this record",
      "items": {
        "description": "List of file formats supported by OdiloTK",
        "type": "array",
        "items": {
          "type": "string"
        },
        "enum": [
          "EBOOK_STREAMING",
          "EPUB",
          "PDF",
          "ACSM",
          "ACSM_PDF",
          "ACSM_EPUB",
          "HTML",
          "MP3",
          "TXT",
          "DE_PDF",
          "MOBI",
          "WMA",
          "WMV",
          "DAISY",
          "PLKR",
          "QIOO",
          "JPG",
          "MP4",
          "SCORM",
          "OCS",
          "UNKNOWN"
        ],
        "example": [
          "OCS",
          "ACSM",
          "EBOOK_STREAMING"
        ]
      }
    }
  }
}

Download a free access resource

Properties

Name Type Required Restrictions Description
patronId string true none User Identifier
format [Format] true none Available formats for this record

PatronResponse

{
  "id": "39000011",
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "session": "CBA36C481521EE13706D1DA2ACFA8889",
  "profilePictureUrl": "https://.../picture.jpg",
  "observations": "Observations over user",
  "autoAcceptHolds": false,
  "termsAccepted": true,
  "lastLogin": 1557305679000,
  "customer": "BI039",
  "allowEmails": true
}

Patron Data Model Response

Properties

Name Type Required Restrictions Description
id string false none Patron's internal identifier
externalId string false none Patron's identifier
name string false none Patron's name
email string false none e-mail address
session string false none session ID
profilePictureUrl string(url) false none Profile Picture URL
observations string false none Observations about the patron
autoAcceptHolds boolean false none Indicates if the patron autoaccept holds when they are available
termsAccepted boolean false none Indicates if the patron has accepted the Terms of Use
lastLogin integer(timestamp) false none Patron's last login date and time
customer string false none Library code
allowEmails boolean false none Indicates if the patron allows the platform to send emails

PatronUpdateRequest

{
  "name": "Odilo Admin Account",
  "email": null,
  "expiringDate": 1564305271100
}

Put Patron Data Model Request

Properties

Name Type Required Restrictions Description
name string false none Patron's name
email string false none e-mail address
expiringDate number false none Patron expiration date in miliseconds since the epoch (1-jan-1970 00:00)

PatronConfigRequest

{
  "externalId": "Odilo",
  "name": "Odilo Admin Account",
  "email": null,
  "profilePictureUrl": "https://.../picture.jpg",
  "autoAcceptHolds": false
}

Config Patron Data Model Response

Properties

Name Type Required Restrictions Description
externalId string false none Patron's external identifier
name string false none Patron's name
email string false none e-mail address
profilePictureUrl string(url) false none Profile Picture URL
autoAcceptHolds boolean false none Indicates if the patron autoaccept holds when they are available
showRecommendations boolean false none Indicates if user want to receive personal recommendations ("Recommended for you" carousel on the homepage and item detail screen) or not.

PatronStatsResponse

{
  "ebookFirstDate": 1559201940806,
  "ebookLastDate": 1559201953277,
  "ebookTimeReading": 5272,
  "ebookPagesRead": 4,
  "ebookReadingPercentage": 1,
  "ebookSource": [
    "NubeReader",
    "100.0"
  ],
  "ebookTitle": "First Love",
  "totalEbooks": 3,
  "totalTime": 81568,
  "totalPages": 34,
  "minutesReadByHourInLast30days": [
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
    0,
    1,
    0,
    1,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0
  ]
}

Patron Stats Data Model

Properties

Name Type Required Restrictions Description
ebookFirstDate integer(timestamp) false none Date of the first reading
ebookLastDate integer(timestamp) false none Date of the first reading
ebookTimeReading integer false none Duration of the last reading session (miliseconds)
ebookPagesRead integer false none Pages read during the last reading session
ebookReadingPercentage integer false none Reading Progress Porcentage
ebookSource [string] false none Device used for the last reading session and reading percentage with that device
ebookTitle string false none Resource Title
totalEbooks integer false none Total amount of read books
totalTime integer false none Total amount of time spent reading in OdiloTK (miliseconds)
totalPages integer false none Total amount of pages read in OdiloTK
minutesReadByHourInLast30days [integer] false none Metrics of reading habits in the last month

SearchesModel

{
  "id": 201,
  "userdId": "002000199",
  "total": 2,
  "query": "allfields_txt:\"cervantes\"",
  "searchDate": 1559576745626,
  "facets": "genero_facet_ss:\"Novela\";materia_facet_ss:\"Romance\""
}

Search History Data Model Response

Properties

Name Type Required Restrictions Description
id integer false none Search ID
userdId string false none Patron Identifier
total integer false none Amount of results obtained
query string false none Search terms used
searchDate integer(timestamp) true none Search Date
facets string false none Filters applied to the search

ListsResponse

{
  "id": 161,
  "userId": 2000199,
  "privateList": false,
  "visits": 134,
  "creationDate": 1558523555138,
  "items": {
    "id": 226,
    "listId": 161,
    "recordId": "00005638",
    "creationDate": 1558523560250
  }
}

Lists Data Model Response

Properties

Name Type Required Restrictions Description
id integer false none List Identifier
userId integer false none Patron Identifier
name string false none List Name
privateList boolean false none Indicates if the list is public or private
visits integer false none Amount of visits received in case the list is public.
creationDate integer(timestamp) false none List Creation Date
items [ListItem] false none Resources within the list

MultipleListsResponse

[
  {
    "id": 161,
    "userId": 2000199,
    "privateList": false,
    "visits": 134,
    "creationDate": 1558523555138,
    "items": {
      "id": 226,
      "listId": 161,
      "recordId": "00005638",
      "creationDate": 1558523560250
    }
  }
]

Multiple Lists Data Model Response

Properties

Name Type Required Restrictions Description
anonymous [ListsResponse] false none Multiple Lists Data Model Response

ListItem

{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "List Item Identifier"
    },
    "listId": {
      "type": "integer",
      "description": "List Identifier"
    },
    "recordId": {
      "type": "string",
      "description": "Resource Identifier"
    },
    "creationDate": {
      "type": "integer",
      "format": "timestamp",
      "description": "Date when the resource was added to the list"
    }
  }
}

Properties

Name Type Required Restrictions Description
id integer false none List Item Identifier
listId integer false none List Identifier
recordId string false none Resource Identifier
creationDate integer(timestamp) false none Date when the resource was added to the list

Devices

{
  "id": "135277f7-e6cb-4451-9db2-5ae3f95f724c",
  "clientCode": "P0001",
  "userId": "002000199",
  "deviceId": "9badcbf69ffe703",
  "deviceName": "LG-M160",
  "deviceModel": "LGE LG-M160",
  "active": true,
  "createdDate": 1558438023233,
  "modificationDate": 1558526456897
}

Devices Data Model

Properties

Name Type Required Restrictions Description
id string false none Device Identifier
clientCode string true none Customer Identifier
userId string true none Patron Identifier
deviceId string true none Device Model Identifier
deviceName string false none Device Name
deviceModel string false none Device Model
active boolean true none Indicates if the patron's account is activated in this device
createdDate integer(timestamp) false none Device Activation Date
modificationDate integer(timestamp) false none Date of the last device activation status change

NotificationsResponse

{
  "id": "ca633aa5-8c29-4a6d-a106-d3a8441844a9",
  "subject": "Reserva disponible",
  "content": "Ya está disponible la reserva de La bodega",
  "userList": [
    "002000199"
  ],
  "byEmail": false,
  "notifyApps": true,
  "dateCreated": 1559112699000,
  "unread": false
}

Notification Data Model

Properties

Name Type Required Restrictions Description
id string false none Notification Identifier
subject string false none Notificación Title
content string false none Full text of the notification
userList [string] false none List of patrons who have recieved this notification
byEmail boolean false none Indicates if the notification has been sent by e-mail
notifyApps boolean false none Indicates if the notification has been sent to mobile apps
dateCreated integer(timestamp) false none Notification creation date
unread boolean false none Inditicates if the user has read the notification

RecordResponse

{
  "id": "00005359",
  "active": true,
  "title": "Five weeks in a balloon",
  "subtitle": "",
  "author": "Verne, Jules",
  "coverImageUrl": "https://covers.odilo.io/public/2000000000048_132x186.jpg",
  "originalImageUrl": "https://covers.odilo.io/public/2000000000048_ORIGINAL.jpg",
  "description": "The first Verne novel in which he perfected the “ingredients” of his later work, skilfully mixing a plot full of adventure and twists that hold the reader’s interest with passages of technical, geographic, and historic description. The book gives readers a glimpse of the exploration of Africa, which was still not completely known to Europeans of the time, with explorers travelling all over the continent in search of its secrets. Public interest in fanciful tales of African exploration was at its height, and the book was an instant hit; it made Verne financially independent and got him a contract with Jules Hetzel’s publishing house, which put out several dozen more works of his for over forty years afterwards.",
  "formats": [
    "ACSM",
    "OCS",
    "EBOOK_STREAMING"
  ],
  "gradeLevel": "Juvenile",
  "isbn": "9780698167773",
  "language": "eng",
  "publicationDate": "20140101",
  "publihser": "epubBooks",
  "releaseDate": "20181217",
  "modificationDate": "20181217",
  "subject": "Adventures",
  "subjects": [
    "Adventures",
    "Travels"
  ],
  "subjectsBisacCodes": [],
  "type": "",
  "fileFormat": "epub",
  "resourceTypes": [
    "TIPO_OCS_EPUB",
    "TIPO_EBOOK",
    "TIPO_STREAMING_EPUB"
  ],
  "series": "",
  "seriesPosition": "",
  "availableIssueDates": [],
  "freeDownload": false,
  "payPerCheckout": false,
  "attachedResource": {},
  "availableCopies": 3,
  "externalLink": null,
  "totalCheckouts": 24,
  "totalViews": 37,
  "ppulicenciaCompleta": false,
  "physicalMedium": "[The medium for a sculpture.]",
  "publicationPlace": "Madrid",
  "systemDetailsNote": "Mode of access: Internet.",
  "generalNote": "Includes index.",
  "metadata": [
    {
      "label": "Audiencia",
      "values": [
        {
          "text": "Adulto",
          "queryParams": "521$a_txt:\"Adulto\""
        }
      ]
    },
    {
      "label": "Editorial",
      "values": [
        {
          "text": "Feedbooks",
          "queryParams": "publisher:\"Feedbooks\""
        },
        {
          "text": "Feedbooks",
          "externalLink": {
            "imageUrl": "https://www.teleread.com/wp-content/uploads/2014/05/logo_feedbooks.png",
            "link": "http://es.feedbooks.com"
          }
        }
      ]
    },
    {
      "label": "Idioma",
      "values": [
        {
          "text": "Alemán"
        }
      ]
    }
  ],
  "accessibilityMetadata": [
    {
      "type": "CONTENT_ACCESS_MODE",
      "label": "Modo de acceso al contenido",
      "values": [
        {
          "text": "auditory"
        }
      ]
    },
    {
      "type": "ACCESSIBILITY_FEATURES",
      "label": "Características de accesibilidad",
      "values": [
        {
          "text": "transcript"
        },
        {
          "text": "openCaptions"
        }
      ]
    },
    {
      "type": "ACCESSIBILITY_NOTES",
      "label": "Notas de accesibilidad",
      "values": [
        {
          "text": "El recurso es navegable completamente usando teclado."
        },
        {
          "text": "Una segunda nota es teoricamente posible segun el estandar MARC 21 de Library of Congress."
        }
      ]
    }
  ]
}

Record Data Model Response

Properties

Name Type Required Restrictions Description
id string false none Record Identifier
active boolean false none Indicates whether the record is active
title string false none The title of the record
subtitle string false none The secondary title of the record
author string false none Author
coverImageUrl string(url) false none Front Cover (Miniature)
originalImageUrl string(url) false none Front Cover (Original Size)
description string false none Book Synopsis
formats [Format] false none Available formats for this record
gradeLevel string false none Record’s grade level
isbn string false none The ISBN of the record
language string false none The record's language (ISO code)
publicationDate string(date) false none Record’s publication date (ISO format)
publisher string false none The name of the record's publisher
releaseDate string(date) false none Record’s release date (ISO format)
modificationDate string(date) false none Record’s last modification date (ISO format)
subject string false none The topic of the record
subjects [string] false none The subjects of the record
subjectsBisacCodes [string] false none BISAC codes of the record
type string false none Record’s type
fileFormat string false none Record file format
series string false none Series that the record belongs to
seriesPosition string false none Position of the record in the series
availableIssueDates [string] false none The available dates for subscription type records (magazines or newspapers)
freeDownload boolean false none Indicates if the record is a free download
payPerCheckout boolean false none Indicates if the record has a pay per checkout license
attachedResource AttachedResource false none Indicates if the title has an attached free download file (NO DRM download)
availableCopies integer false none Amount of copies available to take on loan
externalLink string(url) false none Direct link to the resource page
totalCheckouts integer false none Total amount of checkouts
totalViews integer false none Total amount of visits
ppulicenciaCompleta boolean false none Indicates if the resource is Full-License Pay per checkout type
physicalMedium string false none PhysicalMedium
publicationPlace string false none Place of publication, distribution, etc.
systemDetailsNote string false none Technical information about an item, such as the presence or absence of certain kinds of codes
generalNote string false none Note that provides general information for which a specialized note field (i.e., a specific 5XX field) has not been defined
resourceTypes ResourceTypes false none List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB
metadata [Metadatum] false none Contains the metadata fields configured by the client via the Descriptive Fields feature, or a default set of fields fields if none are configured. Currently this field is the source of the metadata shown in record info section, both in ng-opac and in apps. This section is included only when the query parameter enableMetadata is passed to true and relevant metadata exists.
accessibilityMetadata [Metadatum] false none Contains accessibility information derived from MARC 21 tags 341 and 532. The field is included only when the query parameter enableMetadata is passed to true and accessibility data is available.

SearchSuggestionsResponse

{
  "label": "Alice's adventures in Wonderland",
  "filter": "fndPartTitle_ss",
  "recordId": "00005779"
}

Predictive Search Results Data Model Response

Properties

Name Type Required Restrictions Description
label string false none Metadata wich is a possible match for the query
filter string false none Filter where the label belongs to
recordId string false none In case the result is a resource title, this is its resource ID.

FiltersResponse

{
  "name": "idioma_facet_ss",
  "label": "Langue",
  "page": 0,
  "size": 36,
  "total": 2,
  "values": [
    {
      "name": "spa",
      "nameToShow": "Espagnol",
      "value": 132,
      "iconId": null
    },
    {
      "name": "dut",
      "nameToShow": "Néerlandais",
      "value": 98,
      "iconId": null
    }
  ]
}

Filters Data Model Response

Properties

Name Type Required Restrictions Description
name string false none Internal Identifier of the Filter Type
label string false none Visible name for the filter type
values [object] false none Filtering terms offered under this category
» name string false none Key of the filter value as it appears in Solr.
» nameToShow string false none Name to show to the user, for example "Anglais" to represent the English language for a locale fr. For api-version <= 7 it typically coincides con with name, api-version > 7 it shows the value as it must be shown to the user in its locale, the only exception being the filter format_facet_ss.
» value integer false none Amount of results given by this filter.
» iconId string false none Only for filter format_facet_ss and resources from OLE like Learning Path, Learning Club, Reading Plan, Bookclub... . Id of the icon for the format.
» codeBiblio string false none Outdated field in use only for filter biblioHO where it has the same role as field "name". For api-version > 7 this field is no longer retrieved and the corresponding value is returned in field name, like in all other filters. Biblio HO are typically physical libraries located somewhere in the real world.
» nameBiblio string false none Outdated field in use only for filter biblioHO where it has the same role as field "nameToShow". For api-version > 7 this field is no longer retrieved and the corresponding value is returned in field nameToShow, like in all other filters. It often contains the name of the town where library is located.
page integer false none Number of page when request is paginated, namely, when limit and offset parameters are non null. Starts at 0.
size integer false none Page size. Non null only when limit and offset parameters are non null.
total integer false none Total number of different facet values. Non null only when limit and offset parameters are non null.

RecommendationsResponse

{
  "recordId": "00006322",
  "title": "Gotas de Sangre: Crímenes y criminales",
  "author": "Bonafoux Quintero, Luis",
  "description": "Gotas de sangre: Crímenes y criminales, es un compendio de historias que, en un momento dado, han sido el reflejo de un grupo social en particular que atrae al lector. Los relatos descriptivos y entretenidos, hacen volver a la época y denotan objetivamente el nivel sociológico del acontecimiento.",
  "coverImageUrl": "https://.../cover.jpg",
  "resourceTypes": [
    "TIPO_EBOOK",
    "TIPO_STREAMING_EPUB",
    "TIPO_OCS_EPUB"
  ]
}

Recommendation Data Model Response

Properties

Name Type Required Restrictions Description
recordId string false none Record Identifier
title string false none Resource Title
author string false none Resource Author
description string false none Resource Description
coverImageUrl string(url) false none Resource Cover URL
resourceTypes ResourceTypes false none List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB

LicenseResponse

{
  "active": "true",
  "formats": [
    "OCS",
    "ACSM",
    "EBOOK_STREAMING"
  ],
  "recordId": "00005353"
}

License Data Model Response

Properties

Name Type Required Restrictions Description
active boolean false none Indicates whether the record is active
formats [Format] false none Available formats for this record
recordId string false none Resource Identifier

AvailabilityResponse

{
  "resourceId": "00005353",
  "checkoutId": null,
  "totalCopies": 3,
  "availableCopies": 1,
  "holdsQueueSize": 0,
  "notifiedHolds": 0,
  "totalCopiesBC": 15,
  "availableCopiesBC": 7,
  "availableToCheckout": true,
  "formats": [
    "ACSM",
    "OCS",
    "EBOOK_STREAMING"
  ]
}

Availability Data Model Response

Properties

Name Type Required Restrictions Description
recordId string false none Record Identifier
checkoutId string false none Checkout identifier
totalCopies integer false none Total amount of copies of a given resource
availableCopies integer false none Amount of copies available to take on loan
holdsQueueSize integer false none Amount of users who has a hold over a given resource
notifiedHolds integer false none Amount of users with a hold available to take on loan
totalCopiasBC integer false none Total amount of copies available for the Bookclub
availableCopiesBC integer false none Amount of copies available to take on loan from the Bookclub
availableToCheckout boolean false none Indicates if the resource can be loan
formats [Format] false none Available formats for this record

InfoResponse

{
  "numeroInformatico": "A-15155",
  "id": "21657",
  "ocsId": "817f0fd9-3cbc-4d3b-942b-01868dc76d5f",
  "path": "ocs/817f0fd9-3cbc-4d3b-942b-01868dc76d5f.ocs",
  "originalPath": "Odilo/2000000000041.epub",
  "signature": "eee979e7-8f4e-4a9d-a0f7-6501726ee112",
  "format": "EPUB",
  "creationDate": 1556118454480,
  "pending": false,
  "fromOpl": true,
  "size": 625178,
  "streams": [
    {
      "streamId": "Copertina.xhtml",
      "dependsOn": [
        "cover.png",
        "Dante.css",
        "Cardinal.otf"
      ],
      "href": "Text/Copertina.xhtml",
      "inputEncoding": "UTF-8",
      "mediaType": "application/xhtml+xml",
      "pctOverTotal\"": 0.000369477815437078
    }
  ],
  "resourceId": null,
  "externalType": "LOCAL",
  "physical": false,
  "fileFormat": null
}

OCS Info Data Model Response

Properties

Name Type Required Restrictions Description
numeroInformatico string false none Internal Identifier
id integer false none Internal Identifier
ocsId string false none OCS Resource Id
path string(url) false none OCS Resource path
originalPath string(url) false none Resource file original path
signature string false none Internal identifier
format [Format] false none Available formats for this record
creationDate integer(timestamp) false none OCS Creation Date
pending boolean false none Indicates if the given record OCS has been created or It is pending
fromOpl boolean false none Indicates if the given record has an OCS recived from OdiloPlace
size integer(long) false none OCS File size
streams [string] false none Streams list
resourceId string false none Record identifier
externalType string false none none
physical boolean false none Indicates if the given record is a physical one
fileFormat string false none none

FavoritesResponse

{
  "id": 45,
  "availableForCheckout": false,
  "coverURL": "https://.../cover.jpg",
  "format": "EBOOK",
  "date": 1557740633000,
  "available": true,
  "title": "Child of storm",
  "author": "Haggard, Henry Rider",
  "patronId": "002000199",
  "resourceId": "00005353"
}

Favorites Data Model Response

Properties

Name Type Required Restrictions Description
id integer false none Favorite's Internal Identifier
availableForCheckout boolean false none Indicates if the resource is available to take on loan
coverURL string(url) false none Resource Cover
format FormatFacet false none Record formats available in OdiloTK
date integer(timestamp) false none Creation date of the action
available boolean false none Indicates if the resource is available in the catalog
title string false none Resource Title
author string false none Resource author
patronId string false none Patron internal identifier
resourceId string false none ID from the resource that wants to be checked. Whether already a favorite or not.

CustomerResponse

{
  "name": "Biblioteca de Pruebas",
  "id": "BI720"
}

Customer Data Model Response

Properties

Name Type Required Restrictions Description
name string false none Customer's Name
id string false none Customer's Internal Identifier

CarouselsResponse

{
  "description": "Carousel Data Model Response",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Carousel Identifier"
    },
    "topten": {
      "type": "string",
      "description": "Carousel Type"
    },
    "hostId": {
      "type": "integer",
      "description": "Host Identifier"
    },
    "orden": {
      "type": "integer",
      "description": "Carousel Position in the OPAC Homepage"
    },
    "name": {
      "type": "string",
      "description": "Customized name for manually generated carousels"
    },
    "query": {
      "type": "string",
      "description": "Search term used if the carousel is generated from a query"
    },
    "dateIni": {
      "type": "integer",
      "format": "timestamp",
      "description": "Carousel Creation Date"
    },
    "dateEnd": {
      "type": "integer",
      "format": "timestamp",
      "description": "If It has been set, carusel ending date"
    },
    "topTenTitles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Carousel Titles Translations"
    },
    "registros": {
      "type": "string",
      "description": "Carousel Resources"
    },
    "records": {
      "type": "array",
      "description": "Records included in this carousel",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Resource Identifier"
          },
          "active": {
            "type": "boolean",
            "description": "Indicates if the record is active in the catalog"
          },
          "title": {
            "type": "string",
            "description": "Resource Title (MARC 245$a field)"
          },
          "subtitle": {
            "type": "string",
            "description": "Resource secondary title (MARC 245$b field)"
          },
          "author": {
            "type": "string",
            "description": "Resource Author (MARC 100 field)"
          },
          "coverUrls": {
            "type": "array",
            "description": "Resized Covers URLs",
            "items": {
              "type": "object",
              "properties": {
                "small": {
                  "type": "string",
                  "format": "url"
                },
                "large": {
                  "type": "string",
                  "format": "url"
                },
                "medium": {
                  "type": "string",
                  "format": "url"
                }
              }
            }
          },
          "originalImageUrl": {
            "type": "string",
            "format": "url",
            "description": "Original Size Cover"
          },
          "description": {
            "type": "string",
            "description": "Resource description (MARC 650 field)"
          },
          "formats": {
            "description": "List of file formats supported by OdiloTK",
            "type": "array",
            "items": {
              "type": "string"
            },
            "enum": [
              "EBOOK_STREAMING",
              "EPUB",
              "PDF",
              "ACSM",
              "ACSM_PDF",
              "ACSM_EPUB",
              "HTML",
              "MP3",
              "TXT",
              "DE_PDF",
              "MOBI",
              "WMA",
              "WMV",
              "DAISY",
              "PLKR",
              "QIOO",
              "JPG",
              "MP4",
              "SCORM",
              "OCS",
              "UNKNOWN"
            ],
            "example": [
              "OCS",
              "ACSM",
              "EBOOK_STREAMING"
            ]
          },
          "gradeLevel": {
            "type": "string",
            "description": "Audience of the resource (MARC 521$a field)"
          },
          "isbn": {
            "type": "string",
            "description": "ISBN Number (MARC 020$a field)"
          },
          "language": {
            "type": "string",
            "description": "Resource Language (MARC 041$a field)"
          },
          "publicationDate": {
            "type": "string",
            "description": "Publication Date (MARC 260$c field)"
          },
          "publisher": {
            "type": "string",
            "description": "Resource Publisher (MARC 260$b field)"
          },
          "subject": {
            "type": "string",
            "description": "Resource main subject (MARC 650$a first field)"
          },
          "subjects": {
            "type": "array",
            "description": "All the subjects of the title (MARC 650 fields)",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "type": "string",
            "description": "Resource Type"
          },
          "fileFormat": {
            "type": "string",
            "description": "File type"
          },
          "resourceType": {
            "description": "List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB",
            "type": "string",
            "enum": [
              "TIPO_MAGAZINE_STREAMING_OCS",
              "TIPO_NEWSPAPER_STREAMING_OCS",
              "TIPO_STREAMING_OCS_EPUB",
              "TIPO_STREAMING_OCS_PDF",
              "TIPO_MAGAZINE_OCS",
              "TIPO_NEWSPAPER_OCS",
              "TIPO_OCS_EPUB",
              "TIPO_OCS_PDF",
              "TIPO_FISICO"
            ],
            "example": [
              "TIPO_OCS_EPUB",
              "TIPO_EBOOK",
              "TIPO_STREAMING_EPUB"
            ]
          },
          "series": {
            "type": "string",
            "description": "Name of the series or collection which the title belongs to (MARC 490$a field)"
          },
          "seriesPosition": {
            "type": "string",
            "description": "Position occupied by the title within a serie or collection (MARC 490$v field)"
          },
          "availableIssueDates": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "If the resource is a periodical subscription, this field indicates the available issues."
          },
          "freeDownload": {
            "type": "boolean",
            "description": "Indicates whether the resource allows non-DRM download or not"
          },
          "payPerCheckout": {
            "type": "boolean",
            "description": "Indicates whether the resource has a pay per checkout license or not"
          },
          "attachedResource": {
            "description": "Indicates if the title has an attached free download file (NO DRM download)",
            "type": "object",
            "properties": {
              "fileName": {
                "type": "string",
                "description": "Indicates if the attached file is an open download or is restricted to logged users"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "OPEN",
                  "LOGGED_USERS"
                ],
                "description": "List of possible values"
              }
            },
            "example": {
              "fileName": "9788474641288.epub",
              "mode": "LOGGED_USERS"
            }
          },
          "totalCheckouts": {
            "type": "integer",
            "description": "Amount of checkouts performed over the resource"
          },
          "totalViews": {
            "type": "integer",
            "description": "Amount of visits performed over the resource"
          },
          "hasPreview": {
            "type": "boolean",
            "description": "Indicates that the resource offers the preview option"
          },
          "ppuLicenciaCompleta": {
            "type": "boolean",
            "description": "Indicates that the resource is a Pay Full License Per Checkout type"
          }
        }
      }
    }
  }
}

Carousel Data Model Response

Properties

Name Type Required Restrictions Description
id integer false none Carousel Identifier
topten string false none Carousel Type
hostId integer false none Host Identifier
orden integer false none Carousel Position in the OPAC Homepage
name string false none Customized name for manually generated carousels
query string false none Search term used if the carousel is generated from a query
dateIni integer(timestamp) false none Carousel Creation Date
dateEnd integer(timestamp) false none If It has been set, carusel ending date
topTenTitles [string] false none Carousel Titles Translations
registros string false none Carousel Resources
records [object] false none Records included in this carousel
» id string false none Resource Identifier
» active boolean false none Indicates if the record is active in the catalog
» title string false none Resource Title (MARC 245$a field)
» subtitle string false none Resource secondary title (MARC 245$b field)
» author string false none Resource Author (MARC 100 field)
» coverUrls [object] false none Resized Covers URLs
»» small string(url) false none none
»» large string(url) false none none
»» medium string(url) false none none
» originalImageUrl string(url) false none Original Size Cover
» description string false none Resource description (MARC 650 field)
» formats Format false none List of file formats supported by OdiloTK
» gradeLevel string false none Audience of the resource (MARC 521$a field)
» isbn string false none ISBN Number (MARC 020$a field)
» language string false none Resource Language (MARC 041$a field)
» publicationDate string false none Publication Date (MARC 260$c field)
» publisher string false none Resource Publisher (MARC 260$b field)
» subject string false none Resource main subject (MARC 650$a first field)
» subjects [string] false none All the subjects of the title (MARC 650 fields)
» type string false none Resource Type
» fileFormat string false none File type
» resourceType ResourceTypes false none List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB
» series string false none Name of the series or collection which the title belongs to (MARC 490$a field)
» seriesPosition string false none Position occupied by the title within a serie or collection (MARC 490$v field)
» availableIssueDates [object] false none If the resource is a periodical subscription, this field indicates the available issues.
» freeDownload boolean false none Indicates whether the resource allows non-DRM download or not
» payPerCheckout boolean false none Indicates whether the resource has a pay per checkout license or not
» attachedResource AttachedResource false none Indicates if the title has an attached free download file (NO DRM download)
» totalCheckouts integer false none Amount of checkouts performed over the resource
» totalViews integer false none Amount of visits performed over the resource
» hasPreview boolean false none Indicates that the resource offers the preview option
» ppuLicenciaCompleta boolean false none Indicates that the resource is a Pay Full License Per Checkout type

RatingsResponse

{
  "mean": 4,
  "count": 234
}

Ratings Data Model Response

Properties

Name Type Required Restrictions Description
mean number(double) false none Average rating for the given resource
count integer false none Amount of ratings performed over the given resource

VisualizationResponse

{
  "totalElements": 4,
  "elements": {
    "id": 855,
    "fecha": 1560512781297,
    "numeroInformatico": "00029667",
    "lectorIp": "002000572",
    "title": "Dracula",
    "valoration": 5,
    "visualizationType": "REMOTE"
  }
}

External Resource Visualization Data Model

Properties

Name Type Required Restrictions Description
totalElements integer false none Total amount of results
elements [VisualizationElements] false none Information about the listed results

VisualizationElements

{
  "id": 855,
  "fecha": 1560512781297,
  "numeroInformatico": "00029667",
  "lectorIp": "002000572",
  "title": "Dracula",
  "valoration": 5,
  "visualizationType": "REMOTE"
}

Properties

Name Type Required Restrictions Description
id integer false none Visualization Internal Identifier
date integer(timestamp) false none Visualization Date
recordId string false none Resource internal identifier
patronId string false none Patron Internal Identifier
title string false none Resource Title
rate integer false none Rating assigned to the resource by the given patron
visualizationType string false none Type of external resource

Enumerated Values

Property Value
visualizationType REMOTE
visualizationType IMAGE

Comments

{
  "id": "45dc9a3a-f5ee-4b44-b7c2-e55b7c47bf08",
  "comment": "What an incredible story! I love it!",
  "resourceId": "00028531",
  "clientId": "E9119",
  "userid": "002000415",
  "userName": "John Smith",
  "resourceISBN": "0000000000083",
  "creationDate": 1544186195000,
  "userAgent": "Mozilla/5.0 (Windows NT 10.0)",
  "rating": 3,
  "status": "APPROVED",
  "parentId": "a6e4b78d-3fd2-4b46-80a9-f6325d41e871",
  "nestedComments": [],
  "likes": 4,
  "dislikes": 1,
  "sortNum": 3,
  "userVoted": [
    "002000572",
    "002001573",
    "002001276",
    "002097528"
  ],
  "errorCode": null
}

Comments Data Model Response

Properties

Name Type Required Restrictions Description
id string false none Comment Identifier
comment string true none Full text of the comment
resourceId string false none Resource Identifier
clientId string false none Customer Identifier
userid string false none patron Identifier
userName string false none Patron's name
resourceISBN string false none ISBN code
creationDate integer(timestamp) false none Creation Date of the comment
userAgent string false none Device or browser used to submit the comment
rating integer false none Mean of likes and dislikes performed over the comment
status string false none Indicates the status of the comment
parentId string false none If the given comment is an answer to another comment, this field indicates its ID
nestedComments [object] false none Answers to this comment
» schema Comments false none Comments Data Model Response
likes integer false none Amount of favourable ratings recived by the comment
dislikes integer false none Amount of unfavorable ratings recived by the comment
sortNum integer false none Comment position
userVoted [string] false none Patrons who liked or disliked the comment
errorCode string false none Code error is there is a problem posting the comment or the vote

Enumerated Values

Property Value
status APPROVED
status DELETED
status WAITING_APPROVAL
errorCode USER_NULL
errorCode COMMENT_NULL
errorCode ERROR_CODE
errorCode COMMENT_ERROR
errorCode ALREADY_VOTED
errorCode VOTE_YOUR_OWN_COMMENT

FooterResponse

{
  "id": 10,
  "hostId": 1,
  "name": "Odilo España",
  "link": "https://www.odilo.es",
  "kind": "generic01_ES",
  "order": 2,
  "withLocale": null
}

Footer Data Model Response

Properties

Name Type Required Restrictions Description
id integer false none Footer field identifier
hostId integer false none Identifier of the host associated to the opac
name string false none Footer field label
link string false none Footer Field Content
kind string false none Footer Field Type
order integer false none Field Position
withLocale string false none Footer Language

ConfigurationResponse

{
  "version": "otk_2283",
  "build": "20190531135105",
  "title": "OdiloTK",
  "languages": [
    "es",
    "en"
  ],
  "locale": "es",
  "multipleSignUp": false,
  "renewCheckouts": true,
  "customSignUp": false,
  "customLoginUrl": null,
  "customLogoutUrl": null,
  "helpUrl": null,
  "bookClubUrl": "https://www.odilobookclub.com",
  "firstLoginMessage": "Please, accept the terms and conditions of use",
  "firstLoginType": "FIRSTLOGIN_TERMS_COND",
  "showCopies": true,
  "showTotalCheckouts": true,
  "showAvailabilityFilter": true,
  "showSocialIcons": true,
  "showSubjectsPanel": false,
  "showCheckoutHistory": true,
  "showNewsBanner": true,
  "showResourceTotalViews": true,
  "showWikipediaLink": false,
  "banners": {
    "id": "8F8094E16B1DAB1C016B1DC9C3880000",
    "hostId": 1,
    "ordering": 1,
    "title": "Custom Slide Title",
    "content": "Custom Slide Message",
    "url": "https://www.odilo.us",
    "image": "https://.../bannerimage.jpg",
    "align": "R"
  },
  "infoButtons": {
    "id": 1,
    "host_id": 1,
    "orden": 1,
    "textButton": "About Odilo",
    "textContent": null,
    "link": "https://www.odilo.es"
  },
  "homeFilter": {
    "name": "materia_facet_ss",
    "label": "Explora Materias",
    "firstLevel": {
      "label": "Drama",
      "nextLevel": null,
      "criteria": [
        "Drama"
      ]
    }
  }
}

OPAC Configuration Data Model Response

Properties

Name Type Required Restrictions Description
version object false none none
» version string false none OTK version
» build string false none Current Installed Builds
title string false none Home page title
languages [string] false none Available languages (ISO code)
locale string false none OPAC default language (ISO code)
multipleSignUp boolean false none Indicates whether the multiple sign up form is active or not
renewCheckouts boolean false none Indicates whether the checkouts renewal is permitted or not
customSignUp boolean false none Indicates if there is a customized sign-up form active
customLoginUrl string(url) false none External url to call in order to perform the login
customLogoutUrl string(url) false none External url to call in order to perform the logout
helpUrl string(url) false none URL to the platform help document
bookClubUrl string(url) false none URL to the associated bookclub
fistLoginMessage string false none Terms and Conditions message to show when a user logs in for the first time
firstLoginType string false none According to the type, the first login message is accompanied by an acceptance checkbox or shows just the text.
showCopies boolean false none Shows the total amount of copies in the resource profile
showTotalCheckouts boolean false none Shows the total amount of copies in the resource profile
showAvailabilityFilter boolean false none Shows the Availability Filter in the Filters Sidebar
showSocialIcons boolean false none Shows the social network icons
showSubjectsPanel boolean false none Indicates whether the subjects panel is active or not
showCheckoutHistory boolean false none Indicates that the Checkouts History Section is active
showNewsBanner boolean false none Indicates that the News Banner functionality is active
showResourceTotalViews boolean false none Shows the amount of visits in the resource profile
showWikipediaLink boolean false none Allows to show a Wikipedia button in the resource profile that leads to related articles
banners [object] false none If showNewsBanner is enabled and the functionality is configured, this field shows the banner slides.
» id string false none Slide Identifier
» hostId integer false none Identifier of the host associated to the opac
» ordering integer false none Slide Position
» title string false none Slide Title
» content string false none Slide Full Text
» url string(url) false none URL associated to the slide
» image string(url) false none Slide Image URL
» align string false none Title and Content position within the slide
infoButtons [object] false none If the Info Menu is configured, list of entries.
» id integer false none Info Menu Entrie ID
» host_id integer false none Identifier of the host associated to the opac
» orden integer false none Entry position within the Info Menu
» textButton string false none Label to show on the entrie
» textContent string false none If the entry is text type, this field shows the full text
» link string(url) false none If the entry is link type, this field shows the link
homeFilter object false none List of random filters to show on the OPAC homepage
» name string false none Internal Filter Name
» label string false none Label to represent the filter
» firstLevel [object] false none Filter Terms
»» label string false none Visible Label
»» nextLevel string false none More specific filter term
»» criteria [string] false none Search Term

Enumerated Values

Property Value
firstLoginType FIRSTLOGIN_TERMS_COND
firstLoginType FIRSTLOGIN_MSG
align R
align L

NewHit

{
  "description": "Register a visit",
  "type": "object",
  "required": [
    "title",
    "from"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "Resource Title"
    },
    "from": {
      "type": "string",
      "enum": [
        "INIT_SCREEN",
        "RESULT_SCREEN",
        "RESULT_NAV",
        "RECORD_SCREEN",
        "EXTERNAL_REQUEST",
        "API_REQUEST",
        "USER_SCREENS",
        "BOOKCLUB_APP",
        "USER_HOLD_SCREEN",
        "SEARCH_SUGGEST",
        "USER_FAV_SCREEN",
        "USER_HST_SCREEN",
        "USER_HSTV_SCREEN",
        "NR_WEB",
        "NR_PREVIEW_WEB",
        "NR_PREVIEW_APP",
        "PDFV_WEB",
        "PDFV_PREVIEW_WEB",
        "PDFV_PREVIEW_APP"
      ],
      "description": "Indicates the origin of the visit"
    }
  }
}

Register a visit

Properties

Name Type Required Restrictions Description
title string true none Resource Title
from string true none Indicates the origin of the visit

Enumerated Values

Property Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

NewRemoteView

{
  "description": "Register a visualization in a image type resource",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "enum": [
        "INIT_SCREEN",
        "RESULT_SCREEN",
        "RESULT_NAV",
        "RECORD_SCREEN",
        "EXTERNAL_REQUEST",
        "API_REQUEST",
        "USER_SCREENS",
        "BOOKCLUB_APP",
        "USER_HOLD_SCREEN",
        "SEARCH_SUGGEST",
        "USER_FAV_SCREEN",
        "USER_HST_SCREEN",
        "USER_HSTV_SCREEN",
        "NR_WEB",
        "NR_PREVIEW_WEB",
        "NR_PREVIEW_APP",
        "PDFV_WEB",
        "PDFV_PREVIEW_WEB",
        "PDFV_PREVIEW_APP"
      ],
      "description": "Indicates the origin of the visit"
    }
  }
}

Register a visualization in a image type resource

Properties

Name Type Required Restrictions Description
from string false none Indicates the origin of the visit

Enumerated Values

Property Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

NewImageView

{
  "description": "Register a visualization in a external type resource",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "enum": [
        "INIT_SCREEN",
        "RESULT_SCREEN",
        "RESULT_NAV",
        "RECORD_SCREEN",
        "EXTERNAL_REQUEST",
        "API_REQUEST",
        "USER_SCREENS",
        "BOOKCLUB_APP",
        "USER_HOLD_SCREEN",
        "SEARCH_SUGGEST",
        "USER_FAV_SCREEN",
        "USER_HST_SCREEN",
        "USER_HSTV_SCREEN",
        "NR_WEB",
        "NR_PREVIEW_WEB",
        "NR_PREVIEW_APP",
        "PDFV_WEB",
        "PDFV_PREVIEW_WEB",
        "PDFV_PREVIEW_APP"
      ],
      "description": "Indicates the origin of the visit"
    }
  }
}

Register a visualization in a external type resource

Properties

Name Type Required Restrictions Description
from string false none Indicates the origin of the visit

Enumerated Values

Property Value
from INIT_SCREEN
from RESULT_SCREEN
from RESULT_NAV
from RECORD_SCREEN
from EXTERNAL_REQUEST
from API_REQUEST
from USER_SCREENS
from BOOKCLUB_APP
from USER_HOLD_SCREEN
from SEARCH_SUGGEST
from USER_FAV_SCREEN
from USER_HST_SCREEN
from USER_HSTV_SCREEN
from NR_WEB
from NR_PREVIEW_WEB
from NR_PREVIEW_APP
from PDFV_WEB
from PDFV_PREVIEW_WEB
from PDFV_PREVIEW_APP

ResourceTypes

[
  "TIPO_OCS_EPUB",
  "TIPO_EBOOK",
  "TIPO_STREAMING_EPUB"
]

List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB

Properties

Name Type Required Restrictions Description
anonymous string false none List of available resource types supported by OdiloTK. It gives more detailed information than formats field describing if the title is PDF or EPUB

Enumerated Values

Property Value
anonymous TIPO_MAGAZINE_STREAMING_OCS
anonymous TIPO_NEWSPAPER_STREAMING_OCS
anonymous TIPO_STREAMING_OCS_EPUB
anonymous TIPO_STREAMING_OCS_PDF
anonymous TIPO_MAGAZINE_OCS
anonymous TIPO_NEWSPAPER_OCS
anonymous TIPO_OCS_EPUB
anonymous TIPO_OCS_PDF
anonymous TIPO_FISICO

Format

[
  "OCS",
  "ACSM",
  "EBOOK_STREAMING"
]

List of file formats supported by OdiloTK

Properties

None

PhysicalFormat

[
  "MUSICA1",
  "MATERIALES_VISUALES",
  "PUBLICACIONES_SERIADAS"
]

List of possible values for the format of physical resources.

Properties

Name Type Required Restrictions Description
anonymous string false none List of possible values for the format of physical resources.

Enumerated Values

Property Value
anonymous VACIADO_ARTICULOS
anonymous PUBLICACIONES_SERIADAS
anonymous FICHEROS_INFORMATICOS
anonymous MAPAS
anonymous MATERIALES_VISUALES
anonymous MUSICA1
anonymous MUSICA2
anonymous RECURSOS_CONTINUOS
anonymous ARTICULOS
anonymous CLASIFICACION
anonymous COMUNIDAD
anonymous BK_MATERIAL_IMPRESO_TEXTUAL
anonymous CR_EJEMPLARES
anonymous BK_MATERIAL_MANUSCRITO_TEXTUAL
anonymous MP_MATERIAL_CARTOGRAFICO
anonymous MP_MATERIAL_CARTOGRAFICO_MANUSCRITO
anonymous MU_MUSICA_IMPRESA_CON_NOTACION
anonymous MU_MUSICA_MANUSCRITA
anonymous MU_GRABACION_SONORA_NO_MUSICAL
anonymous VM_MEDIO_PROYECTABLE
anonymous PHYSICAL

FormatFacet

[
  "EBOOK"
]

Record formats available in OdiloTK

Properties

None

Metadatum

{
  "type": "object",
  "description": "Represents a specific piece of metadata with a label and associated values.",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "CONTENT_ACCESS_MODE",
        "ACCESSIBILITY_FEATURES",
        "ACCESSIBILITY_NOTES"
      ],
      "description": "Enumeration defining specific types of accessibility metadata."
    },
    "label": {
      "type": "string",
      "description": "Metadata label to be shown to the user.",
      "example": "Publisher"
    },
    "values": {
      "type": "array",
      "description": "Value or values corresponding to the label.",
      "items": {
        "type": "object",
        "description": "Usually text will have a value, queryParams sometimes and externalLink may have it only for publishers.",
        "properties": {
          "text": {
            "type": "string",
            "description": "The metadatum value",
            "example": "Feedbooks"
          },
          "queryParams": {
            "type": "string",
            "description": "Query params to search for the value of text in Odilo Solr searcher. The escaped quotes are necessary.",
            "example": "publisher:\\\"Feedbooks\\\""
          },
          "externalLink": {
            "type": "object",
            "description": "Used to show a link of publisher url and its image as an icon. So far it can be non null only to show publishers.",
            "properties": {
              "imageUrl": {
                "type": "string",
                "description": "URL with the logo of the publisher company",
                "example": "https://www.teleread.com/wp-content/uploads/2014/05/logo_feedbooks.png"
              },
              "link": {
                "type": "string",
                "description": "URL of the publisher website",
                "example": "http://es.feedbooks.com"
              }
            }
          }
        }
      }
    }
  }
}

Represents a specific piece of metadata with a label and associated values.

Properties

Name Type Required Restrictions Description
type AccessibilityMetadatumType false none Specific type classification. This is non-null only for accessibility metadata.
label string false none Metadata label to be shown to the user.
values [MetadatumValue] false none Value or values corresponding to the label.

AccessibilityMetadatumType

{
  "type": "string",
  "enum": [
    "CONTENT_ACCESS_MODE",
    "ACCESSIBILITY_FEATURES",
    "ACCESSIBILITY_NOTES"
  ],
  "description": "Enumeration defining specific types of accessibility metadata."
}

Enumeration defining specific types of accessibility metadata.

Properties

Name Type Required Restrictions Description
anonymous string false none Enumeration defining specific types of accessibility metadata.

Enumerated Values

Property Value
anonymous CONTENT_ACCESS_MODE
anonymous ACCESSIBILITY_FEATURES
anonymous ACCESSIBILITY_NOTES

MetadatumValue

{
  "type": "object",
  "description": "Usually text will have a value, queryParams sometimes and externalLink may have it only for publishers.",
  "properties": {
    "text": {
      "type": "string",
      "description": "The metadatum value",
      "example": "Feedbooks"
    },
    "queryParams": {
      "type": "string",
      "description": "Query params to search for the value of text in Odilo Solr searcher. The escaped quotes are necessary.",
      "example": "publisher:\\\"Feedbooks\\\""
    },
    "externalLink": {
      "type": "object",
      "description": "Used to show a link of publisher url and its image as an icon. So far it can be non null only to show publishers.",
      "properties": {
        "imageUrl": {
          "type": "string",
          "description": "URL with the logo of the publisher company",
          "example": "https://www.teleread.com/wp-content/uploads/2014/05/logo_feedbooks.png"
        },
        "link": {
          "type": "string",
          "description": "URL of the publisher website",
          "example": "http://es.feedbooks.com"
        }
      }
    }
  }
}

Usually text will have a value, queryParams sometimes and externalLink may have it only for publishers.

Properties

Name Type Required Restrictions Description
text string false none The metadatum value
queryParams string false none Query params to search for the value of text in Odilo Solr searcher. The escaped quotes are necessary.
externalLink ExternalLink false none Used to show a link of publisher url and its image as an icon. So far it can be non null only to show publishers.

{
  "type": "object",
  "description": "Used to show a link of publisher url and its image as an icon. So far it can be non null only to show publishers.",
  "properties": {
    "imageUrl": {
      "type": "string",
      "description": "URL with the logo of the publisher company",
      "example": "https://www.teleread.com/wp-content/uploads/2014/05/logo_feedbooks.png"
    },
    "link": {
      "type": "string",
      "description": "URL of the publisher website",
      "example": "http://es.feedbooks.com"
    }
  }
}

Used to show a link of publisher url and its image as an icon. So far it can be non null only to show publishers.

Properties

Name Type Required Restrictions Description
imageUrl string false none URL with the logo of the publisher company
link string false none URL of the publisher website

AttachedResource

{
  "fileName": "9788474641288.epub",
  "mode": "LOGGED_USERS"
}

Indicates if the title has an attached free download file (NO DRM download)

Properties

Name Type Required Restrictions Description
fileName string false none Indicates if the attached file is an open download or is restricted to logged users
mode string false none List of possible values

Enumerated Values

Property Value
mode OPEN
mode LOGGED_USERS

CreatePatronRequest

{
  "externalId": "123456789",
  "name": "John Smith",
  "email": "jsmith@email.com",
  "customer": "BI002",
  "observations": "teacher",
  "additionalInfo": {
    "identifierType": "CARD_NUMBER",
    "password": "Password123",
    "profile": "profile1",
    "signUpDate": 1557305679000,
    "expiringDate": 1564305271100,
    "noSendVerificationEmail": false
  }
}

Request for creating new users

Properties

Name Type Required Restrictions Description
externalId string true none none
name string true none none
email string false none none
customer string false none none
observations string false none none
additionalInfo AdditionalInfo true none none

AdditionalInfo

{
  "identifierType": "CARD_NUMBER",
  "password": "Password123",
  "profile": "profile1",
  "signUpDate": 1557305679000,
  "expiringDate": "2031-08-15T12:27:51+02:00",
  "noSendVerificationEmail": false
}

Properties

Name Type Required Restrictions Description
identifierType string true none none
password string true none none
profile string false none none
signUpDate number false none none
expiringDate string false none Optional expiration date for the user account. Accepted formats: - ISO 8601 date-time with offset (e.g. 2031-08-15T12:27:51+02:00) - ISO 8601 date YYYY-MM-DD: Same as YYYY-MM-DDT00:00:00+00:00 If omitted and the client has configured a default expiration date, that default will be used instead.
noSendVerificationEmail boolean false none none

Enumerated Values

Property Value
identifierType USER
identifierType PASSWORD
identifierType USER_ID
identifierType LAST_NAME
identifierType FULL_NAME
identifierType PIN
identifierType BARCODE
identifierType USER_OR_BARCODE
identifierType EMAIL
identifierType CARD_NUMBER
identifierType LAST_4_DIGITS_PHONE
identifierType PARTNER_NUMBER
identifierType AZTECA_SIGNATURE
identifierType EXTERNAL_URL

CreatePatronResponse

{
  "userId": "002000123",
  "status": "OK"
}

Properties

Name Type Required Restrictions Description
userId string false none none
status string false none none

Enumerated Values

Property Value
status OK
status NEEDS_VALIDATION
status NEEDS_APPROVAL

ZinkersRegistrationDTO

{
  "type": "object",
  "description": "Container for all lists required to populate the registration form dropdowns.",
  "properties": {
    "centerTypes": {
      "type": "array",
      "description": "List of available center types (e.g., Public, Private).",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "channels": {
      "type": "array",
      "description": "List of available channels.",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "workspaces": {
      "type": "array",
      "description": "List of available workspaces.",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "educationStages": {
      "type": "array",
      "description": "List of education stages for the given country.",
      "items": {
        "type": "object",
        "description": "A generic key-value pair for dropdown options.",
        "properties": {
          "label": {
            "type": "string",
            "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
            "example": "signup.e1162.centerTypes.public"
          },
          "value": {
            "type": "string",
            "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
            "example": "Primary Education"
          }
        }
      }
    },
    "centers": {
      "type": "array",
      "description": "List of center names for the given country.\n",
      "items": {
        "type": "string",
        "example": "807005-EB Ribeiro de Alforra"
      }
    }
  }
}

Container for all lists required to populate the registration form dropdowns.

Properties

Name Type Required Restrictions Description
centerTypes [LabelValueDTO] false none List of available center types (e.g., Public, Private).
channels [LabelValueDTO] false none List of available channels.
workspaces [LabelValueDTO] false none List of available workspaces.
educationStages [LabelValueDTO] false none List of education stages for the given country.
centers [string] false none List of center names for the given country.

LabelValueDTO

{
  "type": "object",
  "description": "A generic key-value pair for dropdown options.",
  "properties": {
    "label": {
      "type": "string",
      "description": "The internal key or code for the option. \n(e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).\n",
      "example": "signup.e1162.centerTypes.public"
    },
    "value": {
      "type": "string",
      "description": "The human-readable text to display in the UI.\n(e.g., 'Primary Education').\n",
      "example": "Primary Education"
    }
  }
}

A generic key-value pair for dropdown options.

Properties

Name Type Required Restrictions Description
label string false none The internal key or code for the option. (e.g., 'signup.e1162.centerTypes.public' for center types or 'signup.e1162.channels.press' for channels).
value string false none The human-readable text to display in the UI. (e.g., 'Primary Education').

ErrorResponse

{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "A specific code for the error.",
      "example": "ERROR_FORBIDDEN_CLIENT"
    }
  }
}

Properties

Name Type Required Restrictions Description
errorCode string false none A specific code for the error.