LibKey Lending Tool API Documentation

LibKey Lending Tool API Documentation

Below outlines the various calls and elements produced by the LibKey Lending Tool’s API (INCDocs is the branded version of this service used by NHS England and for whom this documentation is also applicable).

Authenticating to the API

You will need a Third Iron API Key that is specially scoped to using the lending tool. Please email us at support@thirdiron.com to request your API key, and mention which group you are with so we can get you the correct access.
Once you have your API key, use it as a Bearer Token on a header, or in a query parameter of access_token at the end of a URL, as shown in the examples below.

Get a list of libraries

Supported Methods

GET

Endpoint Location

https://public-api.thirdiron.com/public/v1/libraryGroups/:library_group_id/libraries?access_token=ffffffff-ffff-ffff-ffff-ffffffffffff

Endpoint Parameters

 

:library_group_id

Replace the :library_group_id portion of the endpoint path with the id # of your library group, which will be provided by support@thirdiron.com

Library List Response

The LibKey Library List response is a JSON object if the library group ID is found in the LibKey system. The structure of the response overall is described in the following tables.

Response Object

Property

Type

Description

Property

Type

Description

data

Array

An array of Library Result objects is returned if the Fulfillment Request ID and Library Group ID is recognized.

Library Result

A Library Result represents a single library in the associated LibKey library group.
The full list of properties that may appear on a Library Result are described in detail in the table below:

Property

Type

Description

Optional

Property

Type

Description

Optional

id

string

A unique ID for the library ID.

No

type

string

The value libraries

No

name

string

The human-readable name of the library.

No

Example response body

{ "data": [ { "id": "39411", "name": "First Library in the Group", "type": "libraries" }, { "id": "39412", "name": "Second Library in the Group", "type": "libraries" } ] }

 

Check the availability of an article in a library group

Supported Methods

GET

Endpoint Location

https://public-api.thirdiron.com/public/v1/libraryGroups/:library_group_id/libraries/:library_id/articles/doi/:article_doi?access_token=ffffffff-ffff-ffff-ffff-ffffffffffff
-or-
https://public-api.thirdiron.com/public/v1/libraryGroups/:library_group_id/libraries/:library_id/articles/pmid/:article_pmid?access_token=ffffffff-ffff-ffff-ffff-ffffffffffff

Endpoint Parameters

 

:library_group_id

Replace the :library_group_id portion of the endpoint path with the id # of your library group, which will be provided by support@thirdiron.com

:library_id

Replace the :library_id portion of the endpoint path with the id # of your library

:article_doi

Replace :article_doi with the DOI of an article. Only one DOI can be supplied. (DOI value does not need to be URI encoded)

:article_pmid

Replace :article_pmid with the pmid of an article. Only one pmid can be supplied.

Optional Includes

 

?include=journal

Adding this include to your request will cause the response to include information about the journal that the DOI is located within. This includes the name of the journal, ISSN, SJR Value, Cover Image URL, BrowZine Enabled Status and the Link to the Journal (more details below including example response)

?include=forceILLLibraryLookup=true

Adding this include your request will cause the ILL related fields articulated below to appear even when the request can, according to LibKey data, be filled locally. This feature is included to provide the ability to show a route to request from another library if the local download access doesn’t work. (This could happen for any number of reasons but most likely through clerical error or timing of holdings data accuracy provided to LibKey).

Availability of an article in a library group response

If the article is recognized by Third Iron systems, many details about the article will be returned. See Article DOI/PMID Lookup Endpoint (LibKey) | LibKey Article DOI or PMID Lookup Response: for the article-specific details.

There are a small number of fulfillment request-specific fields in the response that you can use to craft a fulfillment request.

Unless the parameter ?include=forceILLLibraryLookup=true is set these will ONLY appear if there is NO contentLocation or fullTextFile present meaning there is no way for the local requesting library to fulfill the item immediately and thus the illLibrary details are presented.

Property

Type

Description

Optional

Property

Type

Description

Optional

illLibraryId

integer

If an article is available at another library, this property will exist with an ID as its value.

Yes

illLibraryName

string

If an article is available at another library, this displays the human-readable name of the library.

Yes

libraryIllEmail

string

If an article is available at another library, this displays the email where the request will be sent at that library.

Yes

Example response body (the item can be locally provided but the &forceIllLibraryLookup=true option is present

{ "data": { "id": 657981611, "type": "articles", "title": "Care guided by tissue oxygenation and haemodynamic monitoring in off-pump coronary artery bypass grafting (Bottomline-CS): assessor blind, single centre, randomised controlled trial", "date": "2025-03-24", "authors": "Han, Jiange; Zhai, Wenqian; Wu, Zhenhua; Zhang, Zhao; Wang, Tao; Ren, Min; Liu, Ziyue; Sessler, Daniel I; Guo, Zhigang; Meng, Lingzhong", "inPress": false, "abandoned": false, "doi": "10.1136/bmj-2024-082104", "linkResolverOpenUrl": "http://resolver.ebscohost.com/openurl?authtype=athens&custid=ns123330&genre=article&aulast=Han&issn=0959-8138&title=theBMJ%20(British%20Medical%20Journal)&atitle=Care%20guided%20by%20tissue%20oxygenation%20and%20haemodynamic%20monitoring%20in%20off-pump%20coronary%20artery%20bypass%20grafting%20(Bottomline-CS)%3A%20assessor%20blind%2C%20single%20centre%2C%20randomised%20controlled%20trial&volume=2025&issue=24%20Mar%20-%2030%20Mar&spage=e082104&epage=&date=2025-03-24&doi=10.1136%2Fbmj-2024-082104&sid=LibKey", "pmid": "40127893", "openAccess": true, "unpaywallUsable": false, "fullTextFile": "https://incdocs.libkey.io/libraries/73/articles/657981611/full-text-file?utm_source=api_111", "contentLocation": "https://incdocs.libkey.io/libraries/73/articles/657981611/content-location?utm_source=api_111", "availableThroughBrowzine": true, "illLibraryId": 123, "illLibraryName": "<<Library Name 123>>", "libraryIllEmail": "<<Library 123 Email Contact>>", "startPage": "e082104", "endPage": "", "browzineWebLink": "https://browzine.com/libraries/73/journals/18126/issues/605090431?showArticleInContext=doi:10.1136%2Fbmj-2024-082104&utm_source=api_111", "bestIntegratorLink": { "bestLink": "https://incdocs.libkey.io/libraries/73/articles/657981611/full-text-file?utm_source=api_111", "linkType": "fullTextFile", "recommendedLinkText": "Download PDF" } } }

Example response body (the item CANNOT be locally provided and so ILL options are presented)

{ "data": { "id": 322820738, "type": "articles", "title": "Fluorochrome choices for multi-color flow cytometry", "date": "2019-12-01", "authors": "Flores-Montero, Juan; Kalina, Tomas; Corral-Mateos, Alba; Sanoja-Flores, Luzalba; Pérez-Andrés, Martin; Martin-Ayuso, Marta; Sedek, Lukasz; Rejlova, Katerina; Mayado, Andrea; Fernández, Paula; van der Velden, Vincent; Bottcher, Sebastian; van Dongen, Jaques J.M.; Orfao, Alberto", "inPress": false, "abandoned": false, "doi": "10.1016/j.jim.2019.06.009", "linkResolverOpenUrl": "http://resolver.ebscohost.com/openurl?authtype=athens&custid=ns47200&genre=article&aulast=Flores-Montero&issn=0022-1759&title=Journal%20of%20Immunological%20Methods&atitle=Fluorochrome%20choices%20for%20multi-color%20flow%20cytometry&volume=475&issue=&spage=112618&epage=&date=2019-12-01&doi=10.1016%2Fj.jim.2019.06.009&sid=LibKey", "pmid": "31181212", "openAccess": false, "unpaywallUsable": true, "fullTextFile": "", "contentLocation": "", "availableThroughBrowzine": false, "illLibraryId": 123, "illLibraryName": "<<Library Name 123>>", "libraryIllEmail": "<<Library 123 Email Contact>>", "startPage": "112618", "endPage": "", "bestIntegratorLink": { "bestLink": "http://resolver.ebscohost.com/openurl?authtype=athens&custid=ns47200&genre=article&aulast=Flores-Montero&issn=0022-1759&title=Journal%20of%20Immunological%20Methods&atitle=Fluorochrome%20choices%20for%20multi-color%20flow%20cytometry&volume=475&issue=&spage=112618&epage=&date=2019-12-01&doi=10.1016%2Fj.jim.2019.06.009&sid=LibKey", "linkType": "linkResolverOpenUrl", "recommendedLinkText": "Access Options" } } }

Example response body (the item can be locally provided but the &forceIllLibraryLookup=true option is NOT present so there are no ILL related data presented)

{ "data": { "id": 657981611, "type": "articles", "title": "Care guided by tissue oxygenation and haemodynamic monitoring in off-pump coronary artery bypass grafting (Bottomline-CS): assessor blind, single centre, randomised controlled trial", "date": "2025-03-24", "authors": "Han, Jiange; Zhai, Wenqian; Wu, Zhenhua; Zhang, Zhao; Wang, Tao; Ren, Min; Liu, Ziyue; Sessler, Daniel I; Guo, Zhigang; Meng, Lingzhong", "inPress": false, "abandoned": false, "doi": "10.1136/bmj-2024-082104", "linkResolverOpenUrl": "http://resolver.ebscohost.com/openurl?authtype=athens&custid=ns47200&genre=article&aulast=Han&issn=0959-8138&title=theBMJ%20(British%20Medical%20Journal)&atitle=Care%20guided%20by%20tissue%20oxygenation%20and%20haemodynamic%20monitoring%20in%20off-pump%20coronary%20artery%20bypass%20grafting%20(Bottomline-CS)%3A%20assessor%20blind%2C%20single%20centre%2C%20randomised%20controlled%20trial&volume=2025&issue=24%20Mar%20-%2030%20Mar&spage=e082104&epage=&date=2025-03-24&doi=10.1136%2Fbmj-2024-082104&sid=LibKey", "pmid": "40127893", "openAccess": true, "unpaywallUsable": false, "fullTextFile": "https://incdocs.libkey.io/libraries/73/articles/657981611/full-text-file?utm_source=api_111", "contentLocation": "https://incdocs.libkey.io/libraries/73/articles/657981611/content-location?utm_source=api_111", "availableThroughBrowzine": true, "startPage": "e082104", "endPage": "", "browzineWebLink": "https://browzine.com/libraries/73/journals/18126/issues/605090431?showArticleInContext=doi:10.1136%2Fbmj-2024-082104&utm_source=api_111", "bestIntegratorLink": { "bestLink": "https://incdocs.libkey.io/libraries/73/articles/657981611/full-text-file?utm_source=api_3630", "linkType": "fullTextFile", "recommendedLinkText": "Download PDF" } } }

 

Create a fulfillment request

Supported Methods

POST

Endpoint Location

https://lendingtool-api.thirdiron.com/public/v1/libraryGroups/:library_group_id/fulfillmentRequests?access_token=ffffffff-ffff-ffff-ffff-ffffffffffff

Endpoint Parameters

 

:library_group_id

Replace the :library_group_id portion of the endpoint path with the id # of your library group

Mandatory Body data Fields

These must appear in the body of the POST in an element named data

type

String - This should be the value fulfillment-requests

articleId

Integer - The Third Iron ID of the article. Only one ID can be supplied.

requesterLibraryId

Integer - This is the Third Iron ID of your library, to indicate from where the fulfillment request is arriving.

requesterEmail

String - This is the email address to which you would like the fulfillment response to arrive.

lenderLibraryId

Integer - This is the library ID from which you would like to attempt to borrow the article. This typically should be captured by using the “Check the availability of an article in a library group” endpoint documented above.

customReference

String - Empty string, or a value if you would like to store a unique identifier for your fulfillment request.

Example fulfillment request body

{ "data": { "type": "fulfillment-requests", "articleId": 2349019438, "requesterLibraryId": 123, "requesterEmail": "me@gmail.com", "lenderLibraryId": 4930123, "customReference": "" } }

Create fulfillment request response

Details about the fulfillment request will be returned if the POST is successful. See LibKey Lending Tool API Documentation - Old | Fulfillment Request Result: for details about what is in that request.

If a problem occurs, a 4xx or 5xx HTTP status code will be returned informing you if your API token is not working, you have been rate limited, a temporary problem happened on Third Iron’s servers, etc.

Get the status of a fulfillment request

Supported Methods

GET

Endpoint Location

https://public-api.thirdiron.com/public/v1/libraryGroups/:library_group_id/fulfillmentRequests/:fulfillment_request_id?access_token=ffffffff-ffff-ffff-ffff-ffffffffffff

Endpoint Parameters

 

:library_group_id

Replace the :library_group_id portion of the endpoint path with the id # of your library group

:fulfillment_request_id

Replace the :fulfillment_request_id portion of the endpoint path with the ID # of your fulfillment request. This is typically acquired when you create a fulfillment request using the POST endpoint documented above.

Optional Includes

 

?include=journal

Adding this include to your request will cause the response to include information about the journal that the DOI is located within. This includes the name of the journal, ISSN, SJR Value, Cover Image URL, BrowZine Enabled Status and the Link to the Journal (more details below including example response)

Fulfillment Request Status Response

The LibKey Fulfillment Request Status is a JSON object if the fulfillment request is found in the LibKey system. The structure of the response overall is described in the following tables.

Response Object

Property

Type

Description

Optional

Property

Type

Description

Optional

data

Object

A Fulfillment Request Result object is returned if the Fulfillment Request ID and Library Group ID is recognized.

No

Fulfillment Request Result

A Fulfillment Request Result represents a fulfillment request that the LibKey system is aware of.

The full list of properties that may appear on a Fulfillment Request result are described in detail in the table below:

Property

Type

Description

Optional

Property

Type

Description

Optional

id

string

The fulfillment request’s unique id in the Third Iron system. It follows a format of YYYYMMDD-{random_unique_id}

No

type

string

The value fulfillment-requests

No

created

date & time

When the fulfillment request was created.

No

lastUpdated

date & time

When the fulfillment request was last updated, such as when its “status” was last changed.

No

status

string

One of the following values:

  • pending - the lender library has not determined whether they can complete the lending or will decline it

  • complete - the lender library has contacted the requester email with the article

  • declined - the lender library declined lending the article. See the declinedReason property for more information about why.

No

articleId

integer

A Third Iron article ID (not a DOI) that helps Third Iron keep track of which article was requested in the system.

No

requesterLibraryId

integer

The ID of the library that is requesting the article.

No

requesterEmail

URL

The email address of the person / entity requesting the article.

No

lenderLibraryId

integer

The ID of the library that has been requested to lend the article.

No

libraryGroupId

integer

The ID of the library group to which the library belongs.

No

declinedReason

string

A value entered by the lender library informing the requester why the article was unable to be lent.

Yes

customReference

string

If the requester library added a custom reference value, it is stored and displayed here.

Yes

Example Response Body

{ "data": { "id": "20221003-randomid", "type": "fulfillment-requests", "created": "2024-10-21T23:58:11.833Z", "lastUpdated": "2024-10-21T23:58:11.833Z", "status": "pending", "articleId": 689611, "requesterLibraryId": 9875, "requesterEmail": "requester@foo.somewhere", "lenderLibraryId": 9876, "libraryGroupId": 123, "customReference": "abc-123", "relationships": { "article": { "data": { "id": 689611, "type": "articles" } }, "journal": { "data": { "type": "journals" } }, "issue": { "data": { "id": 68961, "type": "issues" } }, "requesterLibrary": { "data": { "id": 9875, "type": "libraries" } }, "lenderLibrary": { "data": { "id": 9876, "type": "libraries" } } } } }

Related content