Ingen beskrivelse i spesifikasjonen.

8 operasjoner
GET /patron/{patronId}/list

Get all patron lists

Bearer-token GetPatronLists

Eksempel på kall

cURL

curl -X GET "$PLAS_BASE_URL/patron/40218873/list?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
data = response.json()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Svar

200 Success PatronListsResponseBody
Generert fra skjemaet

Eksempel

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

Skjema

PatronListsResponseBody

  • defaultstringpåkrevdmin. lengde 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 PatronListpåkrevd

    A list of patron lists.

    Vis 2 felterSkjul 2 felter
    • idstringpåkrevdmin. lengde 1

      The ID of the list.

    • namestringpåkrevd

      The name of the list.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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.

Eksempel på kall

cURL

curl -X POST "$PLAS_BASE_URL/patron/40218873/list?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    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()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Request body

application/json · påkrevd · CreatePatronListRequestBody
  • idstringpåkrevdmin. lengde 1

    The ID of the list.

  • namestringpåkrevd

    The name of the list.

Svar

204 Success

Ikke noe innhold i svaret.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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

Get patron list and items

Bearer-token GetPatronListAndItems

Eksempel på kall

cURL

curl -X GET "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
data = response.json()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
listIdpåkrevd
path · string

Patron list ID

Eksempel: 12
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Svar

200 Success PatronListResponseBody
Generert fra skjemaet

Eksempel

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

Skjema

PatronListResponseBody

  • idstringpåkrevdmin. lengde 1

    The ID of the list.

  • namestringpåkrevd

    The name of the list.

  • Items contained in the list.

    Vis 1 varianterSkjul 1 varianter

    Velges av feltet type

    Variant: workAndPublication

    PatronListItemWorkAndPublication

    • idstringpåkrevd

      The unique ID of the item in the list.

    • publicationIdstringpåkrevd

      A publication ID.

    • typestringpåkrevd

      This item type represents a work.

      Én av: workAndPublication

    • workIdstringpåkrevd

      A work ID.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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

Insert an item to a patron list

Bearer-token InsertItemToPatronList

Insert an item anywhere into the patron list.

Eksempel på kall

cURL

curl -X POST "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    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()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
listIdpåkrevd
path · string

Patron list ID

Eksempel: 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.

Eksempel: 0
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Request body

application/json · påkrevd · AddItemToPatronListRequestBody

Velges av feltet type

Variant: workAndPublication

PatronListItemWorkAndPublication

  • idstringpåkrevd

    The unique ID of the item in the list.

  • publicationIdstringpåkrevd

    A publication ID.

  • typestringpåkrevd

    This item type represents a work.

    Én av: workAndPublication

  • workIdstringpåkrevd

    A work ID.

Svar

204 Success

Ikke noe innhold i svaret.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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

Delete patron list

Bearer-token DeletePatronList

Eksempel på kall

cURL

curl -X DELETE "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
response.raise_for_status()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
listIdpåkrevd
path · string

Patron list ID

Eksempel: 12
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Svar

204 Success

Ikke noe innhold i svaret.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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

Update patron list

Bearer-token UpdatePatronList

Eksempel på kall

cURL

curl -X PATCH "$PLAS_BASE_URL/patron/40218873/list/12?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    headers={
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
    json={
        "name": "Kari Nordmann",
    },
)
response.raise_for_status()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
listIdpåkrevd
path · string

Patron list ID

Eksempel: 12
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Request body

application/json · påkrevd · UpdatePatronListRequestBody
  • namestringpåkrevd

    The new name of the list.

Svar

204 Success

Ikke noe innhold i svaret.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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

Delete item from a patron list

Bearer-token DeletePatronListItem

Eksempel på kall

cURL

curl -X DELETE "$PLAS_BASE_URL/patron/40218873/list/12/item/03011042557129?version=0.6.4" \
  -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.4`, {
  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.4",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
response.raise_for_status()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
listIdpåkrevd
path · string

Patron list ID

Eksempel: 12
itemIdpåkrevd
path · string

Item ID from a patron list

Eksempel: 03011042557129
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Svar

204 Success

Ikke noe innhold i svaret.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

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}).

Eksempel på kall

cURL

curl -X PATCH "$PLAS_BASE_URL/patron/40218873/list/12/item/03011042557129?version=0.6.4&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.4&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.4",
        "position": "0",
    },
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
)
response.raise_for_status()
Verten og tokenet er miljøvariabler: PLAS_BASE_URL providerens adresse · PLAS_TOKEN et access token.

Parametere

patronIdpåkrevd
path · string

Patron ID from authentication

Eksempel: 40218873
listIdpåkrevd
path · string

Patron list ID

Eksempel: 12
itemIdpåkrevd
path · string

Item ID from a patron list

Eksempel: 03011042557129
positionpåkrevd
query · integer

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

Eksempel: 0
Felles for operasjonene: version. Se den felles kontrakten på versjonssiden.

Svar

204 Success

Ikke noe innhold i svaret.

400 The list of errors. Errors

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Generert fra skjemaet

Eksempel

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

Skjema

Errors

  • errorsarray of Errorpåkrevdmin. antall 1

    The first error should always be the most relevant.

    Vis 2 felterSkjul 2 felter
    • codeintegerpåkrevd

      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 username or password
      • 100023: Patron ID not found
      • 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

      Én av: 500 · 600 · 100001 · 100023 · 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

    • infostringpåkrevd

      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.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.

404 Resource not found.

Felles svar, definert én gang for hele API-et. Se den felles kontrakten på versjonssiden.

Ikke noe innhold i svaret.