Lists a patron keeps for themselves, such as books to read later. The vendor can create and delete lists, rename them, and add publications to a list or remove them again. Lists belong to the patron and are private to them.

8 operations
GET /patron/{patronId}/list

Get all patron lists

Bearer token GetPatronLists

Example request

cURL

curl -X GET "$PLAS_BASE_URL/patron/40218873/list?version=0.6.7" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN"

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list?version=0.6.7`, {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
});
const data = await response.json();

Python

import os
import requests

response = requests.get(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
data = response.json()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
Shared across operations: version. See the shared contract on the version page.

Responses

200 Success PatronListsResponseBody
Generated from the schema

Example

{
  "default": "12",
  "lists": [
    {
      "id": "94549",
      "name": "Kari Nordmann"
    }
  ]
}

Schema

PatronListsResponseBody

  • defaultstringrequiredmin length 1

    The default patron list ID. If a vendor chooses to only use one patron list, this will be the recommended ID of that list.

    If there exist no patron list with the default ID, the default list can be created.

  • listsarray of PatronListrequired

    A list of patron lists.

    Show 2 fieldsHide 2 fields
    • idstringrequiredmin length 1

      The ID of the list.

    • namestringrequired

      The name of the list.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

POST /patron/{patronId}/list

Create a new patron list

Bearer token CreatePatronList

Create a new patron list, the list id is determined by the id in the request.

If there exist no patron list with the default ID, the default list can be created.

Example request

cURL

curl -X POST "$PLAS_BASE_URL/patron/40218873/list?version=0.6.7" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN" \
  -d '{
  "id": "94549",
  "name": "Kari Nordmann"
}'

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list?version=0.6.7`, {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
  body: JSON.stringify({
    "id": "94549",
    "name": "Kari Nordmann"
  }),
});

Python

import os
import requests

response = requests.post(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
    json={
        "id": "94549",
        "name": "Kari Nordmann",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
Shared across operations: version. See the shared contract on the version page.

Request body

application/json · required · CreatePatronListRequestBody
  • idstringrequiredmin length 1

    The ID of the list.

  • namestringrequired

    The name of the list.

Responses

204 Success

No response body.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

GET /patron/{patronId}/list/{listId}

Get patron list and items

Bearer token GetPatronListAndItems

Example request

cURL

curl -X GET "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.7" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN"

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list/12?version=0.6.7`, {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
});
const data = await response.json();

Python

import os
import requests

response = requests.get(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list/12",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
data = response.json()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
listIdrequired
path · string

Patron list ID

Example: 12
Shared across operations: version. See the shared contract on the version page.

Responses

200 Success PatronListResponseBody
Generated from the schema

Example

{
  "id": "94549",
  "name": "Kari Nordmann",
  "items": [
    {
      "id": "94549",
      "publicationId": "310552",
      "type": "workAndPublication",
      "workId": "882107"
    }
  ]
}

Schema

PatronListResponseBody

  • idstringrequiredmin length 1

    The ID of the list.

  • namestringrequired

    The name of the list.

  • Items contained in the list.

    Show 1 variantsHide 1 variants

    Selected by the field type

    Variant: workAndPublication

    PatronListItemWorkAndPublication

    • idstringrequired

      The unique ID of the item in the list.

    • publicationIdstringrequired

      A publication ID.

    • typestringrequired

      This item type represents a work.

      One of: workAndPublication

    • workIdstringrequired

      A work ID.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

POST /patron/{patronId}/list/{listId}

Insert an item to a patron list

Bearer token InsertItemToPatronList

Insert an item anywhere into the patron list.

Example request

cURL

curl -X POST "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.7" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN" \
  -d '{
  "id": "94549",
  "publicationId": "310552",
  "type": "workAndPublication",
  "workId": "882107"
}'

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list/12?version=0.6.7`, {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
  body: JSON.stringify({
    "id": "94549",
    "publicationId": "310552",
    "type": "workAndPublication",
    "workId": "882107"
  }),
});

Python

import os
import requests

response = requests.post(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list/12",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
    json={
        "id": "94549",
        "publicationId": "310552",
        "type": "workAndPublication",
        "workId": "882107",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
listIdrequired
path · string

Patron list ID

Example: 12
position
query · integer

Used to decide where to insert the item, zero based. Default value is 0.

If position is greater than the number of items in the list, the item will be added to the end of the list.
If position is less than zero, the item will be added to the front of the list.

If an item already exists at the position, the new item will be inserted before (at the specified position), and the existing item will be shifted one position down the list.

Example: 0
Shared across operations: version. See the shared contract on the version page.

Request body

application/json · required · AddItemToPatronListRequestBody

Selected by the field type

Variant: workAndPublication

PatronListItemWorkAndPublication

  • idstringrequired

    The unique ID of the item in the list.

  • publicationIdstringrequired

    A publication ID.

  • typestringrequired

    This item type represents a work.

    One of: workAndPublication

  • workIdstringrequired

    A work ID.

Responses

204 Success

No response body.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

DELETE /patron/{patronId}/list/{listId}

Delete patron list

Bearer token DeletePatronList

Example request

cURL

curl -X DELETE "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.7" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN"

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list/12?version=0.6.7`, {
  method: "DELETE",
  headers: {
    "Accept": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
});

Python

import os
import requests

response = requests.delete(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list/12",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
listIdrequired
path · string

Patron list ID

Example: 12
Shared across operations: version. See the shared contract on the version page.

Responses

204 Success

No response body.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

PATCH /patron/{patronId}/list/{listId}

Update patron list

Bearer token UpdatePatronList

Example request

cURL

curl -X PATCH "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.7" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN" \
  -d '{
  "name": "Kari Nordmann"
}'

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list/12?version=0.6.7`, {
  method: "PATCH",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
  body: JSON.stringify({
    "name": "Kari Nordmann"
  }),
});

Python

import os
import requests

response = requests.patch(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list/12",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
    json={
        "name": "Kari Nordmann",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
listIdrequired
path · string

Patron list ID

Example: 12
Shared across operations: version. See the shared contract on the version page.

Request body

application/json · required · UpdatePatronListRequestBody
  • namestringrequired

    The new name of the list.

Responses

204 Success

No response body.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

DELETE /patron/{patronId}/list/{listId}/item/{itemId}

Delete item from a patron list

Bearer token DeletePatronListItem

Example request

cURL

curl -X DELETE "$PLAS_BASE_URL/patron/40218873/list/12/item/03011042557129?version=0.6.7" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN"

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list/12/item/03011042557129?version=0.6.7`, {
  method: "DELETE",
  headers: {
    "Accept": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
});

Python

import os
import requests

response = requests.delete(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list/12/item/03011042557129",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
listIdrequired
path · string

Patron list ID

Example: 12
itemIdrequired
path · string

Item ID from a patron list

Example: 03011042557129
Shared across operations: version. See the shared contract on the version page.

Responses

204 Success

No response body.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

PATCH /patron/{patronId}/list/{listId}/item/{itemId}

Move item position on patron list

Bearer token MovePatronListItem

This moves the item to the specified position on the patron list, the same rules applies here as when inserting an item to a patron list (POST /patron/{patronId}/list/{listId}).

Example request

cURL

curl -X PATCH "$PLAS_BASE_URL/patron/40218873/list/12/item/03011042557129?version=0.6.7&position=0" \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN"

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/patron/40218873/list/12/item/03011042557129?version=0.6.7&position=0`, {
  method: "PATCH",
  headers: {
    "Accept": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
});

Python

import os
import requests

response = requests.patch(
    f"{os.environ['PLAS_BASE_URL']}/patron/40218873/list/12/item/03011042557129",
    params={
        "version": "0.6.7",
        "position": "0",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL · PLAS_TOKEN an access token.

Parameters

patronIdrequired
path · string

Patron ID from authentication

Example: 40218873
listIdrequired
path · string

Patron list ID

Example: 12
itemIdrequired
path · string

Item ID from a patron list

Example: 03011042557129
positionrequired
query · integer

Used to decide where to move an item to, zero based.

Example: 0
Shared across operations: version. See the shared contract on the version page.

Responses

204 Success

No response body.

400 The list of errors. Errors

Shared response, defined once for the whole API. See the shared contract on the version page.

Generated from the schema

Example

{
  "errors": [
    {
      "code": 200103,
      "info": "200103: invalid/unsupported query parameter value"
    }
  ]
}

Schema

Errors

  • errorsarray of Errorrequiredmin items 1

    The first error should always be the most relevant.

    Show 2 fieldsHide 2 fields
    • codeintegerrequired

      A number representing the type of error.

      List of error codes:

      • \<error code\>: \<error description\>
      • 500: System error
      • 600: Unsupported Open Library API version
      • 10001: Endpoint disabled
      • 71001: Consent has not been given for 'loan history'
      • 100001: Wrong patron identifier, password or pin code
      • 100011: New password or pin code rejected, because it does not meet the provider's requirements
      • 100013: The provider does not let the patron change the given credential
      • 100023: Patron ID not found
      • 100101: Patron could not be deleted, because the patron has something unresolved issue with the library (this could be anything from a loan to a fee, and so on ...)
      • 100211: maxNumberOfEmailAddresses exceeded
      • 100215: maxNumberOfPhoneNumbers exceeded
      • 100221: Pickup location cannot contain sections
      • 100411: Updating patron consent failed
      • 100611: Updating patron notification settings failed
      • 101001: Reservation ID not found
      • 101047: Branch ID cannot be used as pick up branch
      • 101053: Section ID cannot be used as pick up branch
      • 102001: Loan ID not found
      • 102301: Loan not renewable, because it is an interlibrary loan
      • 102311: Loan not renewable, because it is reserved
      • 110001: Branch ID not found
      • 200001: Publication ID not found
      • 200077: ui language not supported
      • 200101: missing required query parameter
      • 200103: invalid/unsupported query parameter value
      • 300001: Initialize payment should not be used
      • 300005: Initialize payment should be used
      • 300009: Payment method not supported
      • 300013: Payment method does not support partial payment
      • 300301: Finalized payment can not de changed
      • 300311: FinalizePaymentRequest.fees contains fees with the same ID
      • 310001: Loan history ID not found
      • 310011: Loan history ID already exists
      • 330001: List ID not found
      • 330011: List ID already exists
      • 330101: List item ID not found
      • 330111: List item ID already exists

      One of: 500 · 600 · 10001 · 71001 · 100001 · 100011 · 100013 · 100023 · 100101 · 100211 · 100215 · 100221 · 100411 · 100611 · 101001 · 101047 · 101053 · 102001 · 102301 · 102311 · 110001 · 200001 · 200077 · 200101 · 200103 · 300001 · 300005 · 300009 · 300013 · 300301 · 300311 · 310001 · 310011 · 330001 · 330011 · 330101 · 330111

    • infostringrequired

      Starts with the text matching the error code field (defined above), and a describing text could be added.

401 Bearer token invalid, missing, or expired.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.

404 Resource not found.

Shared response, defined once for the whole API. See the shared contract on the version page.

No response body.