# Checkout & Checkin

Provider API v0.6.7 · 2 operasjoner
Kilde: https://plasapi.com/no/provider/v0.6.7/checkout-and-checkin/

Lending an item to a patron and taking it back again. A checkout may complete straight away, or first need the patron to accept something such as a lending fee. Both endpoints also accept transactions carried out while the vendor was offline.

## Check in an item

`POST` `/checkin/{itemId}` · `Checkin`

Check in an item.

A vendor must find `circulation.checkin.isEnabled` set to true in GET /configuration before using this
endpoint, and `circulation.checkin.offline.isAllowed` set to true before sending `checkin.offline`.

This endpoint always answers 200 when the request was understood. Whether the item was checked in is said
by `status` in the response body, never by the HTTP status code:
- `completed` the item was checked in, and `checkin` holds the result.
- `failed` the item was not checked in, and `reason` says why.

An unknown `itemId` is a `failed` checkin with the reason `item_not_found`. It is not a 404. 404 is not
used by this endpoint, so a vendor only needs one code path for a refused checkin.

On a completed checkin, `permanentLocation` says where the item belongs, `needsStaff` says whether a
person has to look at it, and `sortingCode` carries the provider's own bin value where it has one. That
is what a sorter needs to route it.

`message.text` is shown to the patron, so send `ui_language` to say which language it should be written
in.

A checkin can be sent again safely. If the item is not on loan, the provider answers `failed` with the
reason `item_not_on_loan`, and a vendor that is retrying may treat that as done, since the item is back
either way. This is how a vendor recovers when a response is lost, and how an offline queue can be
replayed more than once.


### Eksempel på kall

**cURL**

```bash
curl -X POST "$PLAS_BASE_URL/checkin/03011042557129?version=0.6.7" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN" \
  -d '{
  "checkin": {
    "location": {
      "branchId": "nordby-main",
      "sections": [
        {
          "id": "nordby-main-children",
          "name": "Children’s department",
          "type": "department"
        }
      ]
    },
    "offline": false,
    "returnDateTime": "2025-03-14T10:24:00+01:00"
  }
}'
```

**JavaScript**

```javascript
const response = await fetch(`${process.env.PLAS_BASE_URL}/checkin/03011042557129?version=0.6.7`, {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
  body: JSON.stringify({
    "checkin": {
      "location": {
        "branchId": "nordby-main",
        "sections": [
          {
            "id": "nordby-main-children",
            "name": "Children’s department",
            "type": "department"
          }
        ]
      },
      "offline": false,
      "returnDateTime": "2025-03-14T10:24:00+01:00"
    }
  }),
});
const data = await response.json();
```

**Python**

```python
import os
import requests

response = requests.post(
    f"{os.environ['PLAS_BASE_URL']}/checkin/03011042557129",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
    json={
        "checkin": {
            "location": {
                "branchId": "nordby-main",
                "sections": [
                    {
                        "id": "nordby-main-children",
                        "name": "Children’s department",
                        "type": "department",
                    },
                ],
            },
            "offline": False,
            "returnDateTime": "2025-03-14T10:24:00+01:00",
        },
    },
)
data = response.json()
```

Verten og tokenet er miljøvariabler: `PLAS_BASE_URL` providerens adresse · `PLAS_TOKEN` et access token.

### Parametere

- `itemId` (i `path`, [`FieldItemId`](https://plasapi.com/no/provider/v0.6.7/schemas/#FieldItemId), påkrevd) — The item identifier of the item to check in.

Felles for operasjonene: `ui_language`, `version`. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

### Request body

`application/json` · påkrevd

[`CheckinRequestBody`](https://plasapi.com/no/provider/v0.6.7/schemas/#CheckinRequestBody)

### Svar

#### `200` It is important to check the returned `status` field, to distinguish between a completed checkin and a failure.

`CheckinResponseBody`

Eksempel (Generert fra skjemaet):

```json
{
  "message": {
    "text": "This item is reserved by another patron. Please return it to the counter.",
    "type": "reservation-waiting"
  },
  "requestId": "5b1f6c2e-9a7d-4e3b-8f21-6c0d9e4a7b13",
  "status": "completed",
  "checkin": {
    "acquiredFrom": {
      "type": "local_circulation"
    },
    "dueDate": "2025-04-11",
    "fees": [
      {
        "amount": 15000,
        "createdTime": "2025-03-14T10:24:00+01:00",
        "currency": "NOK",
        "dueDate": "2025-04-11",
        "id": "94549",
        "items": [
          {
            "acquiredFrom": {
              "type": "local_circulation"
            },
            "itemId": "03011042557129",
            "publicationMetadata": {
              "additionalIdentifiers": [
                {
                  "digits": "10",
                  "type": "isbn",
                  "value": "9788203363344"
                }
              ],
              "binding": {
                "type": "literal",
                "value": "Hardback"
              },
              "contributors": [
                {
                  "agent": {
                    "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
                    "fullName": "Sigrid Undset",
                    "id": "agent-4102",
                    "images": [
                      {
                        "height": 1200,
                        "mime": "png",
                        "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                        "width": 800,
                        "type": "agent"
                      }
                    ],
                    "active": {
                      "type": "literal",
                      "value": "1882-1949"
                    },
                    "birthDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "deathDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "externals": {
                      "identifiers": [
                        {
                          "type": "norwegianAuthorityFile",
                          "value": "4102"
                        }
                      ]
                    },
                    "givenName": "Kari",
                    "surname": "Nordmann",
                    "type": "person"
                  },
                  "roles": [
                    {
                      "roleCode": "aut",
                      "type": "marcRelator"
                    }
                  ]
                }
              ],
              "creators": [
                {
                  "agent": {
                    "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
                    "fullName": "Sigrid Undset",
                    "id": "agent-4102",
                    "images": [
                      {
                        "height": 1200,
                        "mime": "png",
                        "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                        "width": 800,
                        "type": "agent"
                      }
                    ],
                    "active": {
                      "type": "literal",
                      "value": "1882-1949"
                    },
                    "birthDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "deathDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "externals": {
                      "identifiers": [
                        {
                          "type": "norwegianAuthorityFile",
                          "value": "4102"
                        }
                      ]
                    },
                    "givenName": "Kari",
                    "surname": "Nordmann",
                    "type": "person"
                  },
                  "roles": [
                    {
                      "roleCode": "aut",
                      "type": "marcRelator"
                    }
                  ]
                }
              ],
              "edition": {
                "type": "literal",
                "value": "2nd edition"
              },
              "extent": [
                {
                  "type": "literal",
                  "value": "312 pages"
                }
              ],
              "identifier": "310552",
              "images": [
                {
                  "height": 1200,
                  "mime": "png",
                  "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                  "width": 800,
                  "type": "frontCover"
                }
              ],
              "language": [
                {
                  "code": "SplxlOBeZQQYbYS6WxSbIA",
                  "name": "Kari Nordmann"
                }
              ],
              "mediaTypes": [
                {
                  "code": "book",
                  "name": "Kari Nordmann"
                }
              ],
              "publicationDate": {
                "type": "literal",
                "value": "1920"
              },
              "publishers": [
                {
                  "places": [
                    {
                      "place": "Oslo"
                    }
                  ],
                  "publisher": {
                    "id": "94549",
                    "name": "Kari Nordmann"
                  }
                }
              ],
              "titles": [
                {
                  "language": {
                    "code": "SplxlOBeZQQYbYS6WxSbIA",
                    "name": "Kari Nordmann"
                  },
                  "main": "Kristin Lavransdatter",
                  "part": {
                    "name": "Kari Nordmann",
                    "number": "1"
                  },
                  "remainder": "The Wreath",
                  "type": "preferred"
                }
              ],
              "works": [
                {
                  "identifier": "882107",
                  "relation": "contains"
                }
              ]
            }
          }
        ],
        "payableState": "payable",
        "remainingAmount": 1,
        "type": "fee"
      }
    ],
    "itemId": "03011042557129",
    "loanId": "58210447",
    "needsStaff": false,
    "patronId": "40218873",
    "permanentLocation": {
      "branchId": "nordby-main",
      "sections": [
        {
          "id": "nordby-main-children",
          "name": "Children’s department",
          "type": "department"
        }
      ]
    },
    "publicationId": "310552",
    "publicationMetadata": {
      "additionalIdentifiers": [
        {
          "digits": "10",
          "type": "isbn",
          "value": "9788203363344"
        }
      ],
      "binding": {
        "type": "literal",
        "value": "Hardback"
      },
      "contributors": [
        {
          "agent": {
            "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
            "fullName": "Sigrid Undset",
            "id": "agent-4102",
            "images": [
              {
                "height": 1200,
                "mime": "png",
                "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                "width": 800,
                "type": "agent"
              }
            ],
            "active": {
              "type": "literal",
              "value": "1882-1949"
            },
            "birthDate": {
              "type": "literal",
              "value": "1920"
            },
            "deathDate": {
              "type": "literal",
              "value": "1920"
            },
            "externals": {
              "identifiers": [
                {
                  "type": "norwegianAuthorityFile",
                  "value": "4102"
                }
              ]
            },
            "givenName": "Kari",
            "surname": "Nordmann",
            "type": "person"
          },
          "roles": [
            {
              "roleCode": "aut",
              "type": "marcRelator"
            }
          ]
        }
      ],
      "creators": [
        {
          "agent": {
            "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
            "fullName": "Sigrid Undset",
            "id": "agent-4102",
            "images": [
              {
                "height": 1200,
                "mime": "png",
                "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                "width": 800,
                "type": "agent"
              }
            ],
            "active": {
              "type": "literal",
              "value": "1882-1949"
            },
            "birthDate": {
              "type": "literal",
              "value": "1920"
            },
            "deathDate": {
              "type": "literal",
              "value": "1920"
            },
            "externals": {
              "identifiers": [
                {
                  "type": "norwegianAuthorityFile",
                  "value": "4102"
                }
              ]
            },
            "givenName": "Kari",
            "surname": "Nordmann",
            "type": "person"
          },
          "roles": [
            {
              "roleCode": "aut",
              "type": "marcRelator"
            }
          ]
        }
      ],
      "edition": {
        "type": "literal",
        "value": "2nd edition"
      },
      "extent": [
        {
          "type": "literal",
          "value": "312 pages"
        }
      ],
      "identifier": "310552",
      "images": [
        {
          "height": 1200,
          "mime": "png",
          "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
          "width": 800,
          "type": "frontCover"
        }
      ],
      "language": [
        {
          "code": "SplxlOBeZQQYbYS6WxSbIA",
          "name": "Kari Nordmann"
        }
      ],
      "mediaTypes": [
        {
          "code": "book",
          "name": "Kari Nordmann"
        }
      ],
      "publicationDate": {
        "type": "literal",
        "value": "1920"
      },
      "publishers": [
        {
          "places": [
            {
              "place": "Oslo"
            }
          ],
          "publisher": {
            "id": "94549",
            "name": "Kari Nordmann"
          }
        }
      ],
      "titles": [
        {
          "language": {
            "code": "SplxlOBeZQQYbYS6WxSbIA",
            "name": "Kari Nordmann"
          },
          "main": "Kristin Lavransdatter",
          "part": {
            "name": "Kari Nordmann",
            "number": "1"
          },
          "remainder": "The Wreath",
          "type": "preferred"
        }
      ],
      "works": [
        {
          "identifier": "882107",
          "relation": "contains"
        }
      ]
    },
    "sortingCode": "A3",
    "transactionDateTime": "2025-03-14T10:24:00+01:00"
  }
}
```

#### `400` The list of errors.

`Errors`

Felles svar, definert én gang for hele API-et. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

Eksempel (Generert fra skjemaet):

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

#### `401` Bearer token invalid, missing, or expired.

Ikke noe innhold i svaret.

Felles svar, definert én gang for hele API-et. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

#### `429` Too many requests. The provider is rate limiting and did not carry out the request.

Ikke noe innhold i svaret.

Felles svar, definert én gang for hele API-et. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

## Check out an item

`POST` `/checkout/{itemId}` · `Checkout`

Check out an item to a patron.

A vendor must find `circulation.checkout.isEnabled` set to true in GET /configuration before using this
endpoint, and `circulation.checkout.offline.isAllowed` set to true before sending `checkout.offline`.

This endpoint always answers 200 when the request was understood. Whether the item was checked out is
said by `status` in the response body, never by the HTTP status code:
- `completed` the item was checked out, and `checkout` holds the resulting loan.
- `needs_acknowledgement` the item was not checked out. The patron must accept what `acknowledgement`
  describes, and the same checkout must then be sent again carrying `acknowledgement.code`.
- `failed` the item was not checked out, and `reason` says why.

An unknown `itemId` or an unknown `patronId` is a `failed` checkout with the reason `item_not_found` or
`patron_not_found`. It is not a 404. 404 is not used by this endpoint, so a vendor only needs one code
path for a refused checkout.

A patron sent as an `identifier` rather than a `patronId` is different: everything that goes wrong while
identifying them is `patron_authentication_failed`, in the same time and with the same rate limiting
whether the identifier is real or not, so that nobody can use this endpoint to find out which card
numbers belong to real patrons.

`checkout.patron` identifies the patron either by `patronId` from a successful authentication, or by the
same `identifier` and optional `password` that POST /patron/authentication and
POST /patron/authentication/no-password take. A vendor replaying an offline checkout has to use the
second form: a patron ID is only obtained by authenticating against the provider, which is what it could
not do while it was offline.

`message.text` and the `message` entries in `acknowledgement.conditions` are shown to the patron, so send
`ui_language` to say which language they should be written in.

A checkout can be sent again safely. If the item is already on loan to this patron, the provider answers
`completed` with that loan instead of lending it a second time. This check comes before the acknowledgement
code is looked at, so it also covers a lost answer to the acknowledging request. It is how a vendor
recovers when a response is lost, and how an offline queue can be replayed more than once.


### Eksempel på kall

**cURL**

```bash
curl -X POST "$PLAS_BASE_URL/checkout/03011042557129?version=0.6.7" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $PLAS_TOKEN" \
  -d '{
  "acknowledgement": {
    "code": "SplxlOBeZQQYbYS6WxSbIA"
  },
  "checkout": {
    "location": {
      "branchId": "nordby-main",
      "sections": [
        {
          "id": "nordby-main-children",
          "name": "Children’s department",
          "type": "department"
        }
      ]
    },
    "offline": {
      "dueDate": "2025-04-11"
    },
    "patron": {
      "identifiedBy": "patron_id",
      "patronId": "40218873"
    },
    "transactionDateTime": "2025-03-14T10:24:00+01:00"
  }
}'
```

**JavaScript**

```javascript
const response = await fetch(`${process.env.PLAS_BASE_URL}/checkout/03011042557129?version=0.6.7`, {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.PLAS_TOKEN}`,
  },
  body: JSON.stringify({
    "acknowledgement": {
      "code": "SplxlOBeZQQYbYS6WxSbIA"
    },
    "checkout": {
      "location": {
        "branchId": "nordby-main",
        "sections": [
          {
            "id": "nordby-main-children",
            "name": "Children’s department",
            "type": "department"
          }
        ]
      },
      "offline": {
        "dueDate": "2025-04-11"
      },
      "patron": {
        "identifiedBy": "patron_id",
        "patronId": "40218873"
      },
      "transactionDateTime": "2025-03-14T10:24:00+01:00"
    }
  }),
});
const data = await response.json();
```

**Python**

```python
import os
import requests

response = requests.post(
    f"{os.environ['PLAS_BASE_URL']}/checkout/03011042557129",
    params={
        "version": "0.6.7",
    },
    headers={
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['PLAS_TOKEN']}",
    },
    json={
        "acknowledgement": {
            "code": "SplxlOBeZQQYbYS6WxSbIA",
        },
        "checkout": {
            "location": {
                "branchId": "nordby-main",
                "sections": [
                    {
                        "id": "nordby-main-children",
                        "name": "Children’s department",
                        "type": "department",
                    },
                ],
            },
            "offline": {
                "dueDate": "2025-04-11",
            },
            "patron": {
                "identifiedBy": "patron_id",
                "patronId": "40218873",
            },
            "transactionDateTime": "2025-03-14T10:24:00+01:00",
        },
    },
)
data = response.json()
```

Verten og tokenet er miljøvariabler: `PLAS_BASE_URL` providerens adresse · `PLAS_TOKEN` et access token.

### Parametere

- `itemId` (i `path`, [`FieldItemId`](https://plasapi.com/no/provider/v0.6.7/schemas/#FieldItemId), påkrevd) — The item identifier of the item to check out.

Felles for operasjonene: `ui_language`, `version`. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

### Request body

`application/json` · påkrevd

[`CheckoutRequestBody`](https://plasapi.com/no/provider/v0.6.7/schemas/#CheckoutRequestBody)

### Svar

#### `200` It is important to check the returned `status` field, to distinguish between a completed checkout, one waiting to be acknowledged, and a failure.

`CheckoutResponseBody`

Eksempel (Generert fra skjemaet):

```json
{
  "message": {
    "text": "This item is reserved by another patron. Please return it to the counter.",
    "type": "reservation-waiting"
  },
  "requestId": "5b1f6c2e-9a7d-4e3b-8f21-6c0d9e4a7b13",
  "status": "completed",
  "checkout": {
    "acquiredFrom": {
      "type": "local_circulation"
    },
    "dueDate": "2025-04-11",
    "fees": [
      {
        "amount": 15000,
        "createdTime": "2025-03-14T10:24:00+01:00",
        "currency": "NOK",
        "dueDate": "2025-04-11",
        "id": "94549",
        "items": [
          {
            "acquiredFrom": {
              "type": "local_circulation"
            },
            "itemId": "03011042557129",
            "publicationMetadata": {
              "additionalIdentifiers": [
                {
                  "digits": "10",
                  "type": "isbn",
                  "value": "9788203363344"
                }
              ],
              "binding": {
                "type": "literal",
                "value": "Hardback"
              },
              "contributors": [
                {
                  "agent": {
                    "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
                    "fullName": "Sigrid Undset",
                    "id": "agent-4102",
                    "images": [
                      {
                        "height": 1200,
                        "mime": "png",
                        "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                        "width": 800,
                        "type": "agent"
                      }
                    ],
                    "active": {
                      "type": "literal",
                      "value": "1882-1949"
                    },
                    "birthDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "deathDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "externals": {
                      "identifiers": [
                        {
                          "type": "norwegianAuthorityFile",
                          "value": "4102"
                        }
                      ]
                    },
                    "givenName": "Kari",
                    "surname": "Nordmann",
                    "type": "person"
                  },
                  "roles": [
                    {
                      "roleCode": "aut",
                      "type": "marcRelator"
                    }
                  ]
                }
              ],
              "creators": [
                {
                  "agent": {
                    "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
                    "fullName": "Sigrid Undset",
                    "id": "agent-4102",
                    "images": [
                      {
                        "height": 1200,
                        "mime": "png",
                        "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                        "width": 800,
                        "type": "agent"
                      }
                    ],
                    "active": {
                      "type": "literal",
                      "value": "1882-1949"
                    },
                    "birthDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "deathDate": {
                      "type": "literal",
                      "value": "1920"
                    },
                    "externals": {
                      "identifiers": [
                        {
                          "type": "norwegianAuthorityFile",
                          "value": "4102"
                        }
                      ]
                    },
                    "givenName": "Kari",
                    "surname": "Nordmann",
                    "type": "person"
                  },
                  "roles": [
                    {
                      "roleCode": "aut",
                      "type": "marcRelator"
                    }
                  ]
                }
              ],
              "edition": {
                "type": "literal",
                "value": "2nd edition"
              },
              "extent": [
                {
                  "type": "literal",
                  "value": "312 pages"
                }
              ],
              "identifier": "310552",
              "images": [
                {
                  "height": 1200,
                  "mime": "png",
                  "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                  "width": 800,
                  "type": "frontCover"
                }
              ],
              "language": [
                {
                  "code": "SplxlOBeZQQYbYS6WxSbIA",
                  "name": "Kari Nordmann"
                }
              ],
              "mediaTypes": [
                {
                  "code": "book",
                  "name": "Kari Nordmann"
                }
              ],
              "publicationDate": {
                "type": "literal",
                "value": "1920"
              },
              "publishers": [
                {
                  "places": [
                    {
                      "place": "Oslo"
                    }
                  ],
                  "publisher": {
                    "id": "94549",
                    "name": "Kari Nordmann"
                  }
                }
              ],
              "titles": [
                {
                  "language": {
                    "code": "SplxlOBeZQQYbYS6WxSbIA",
                    "name": "Kari Nordmann"
                  },
                  "main": "Kristin Lavransdatter",
                  "part": {
                    "name": "Kari Nordmann",
                    "number": "1"
                  },
                  "remainder": "The Wreath",
                  "type": "preferred"
                }
              ],
              "works": [
                {
                  "identifier": "882107",
                  "relation": "contains"
                }
              ]
            }
          }
        ],
        "payableState": "payable",
        "remainingAmount": 1,
        "type": "fee"
      }
    ],
    "itemId": "03011042557129",
    "loanId": "58210447",
    "patronId": "40218873",
    "publicationId": "310552",
    "publicationMetadata": {
      "additionalIdentifiers": [
        {
          "digits": "10",
          "type": "isbn",
          "value": "9788203363344"
        }
      ],
      "binding": {
        "type": "literal",
        "value": "Hardback"
      },
      "contributors": [
        {
          "agent": {
            "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
            "fullName": "Sigrid Undset",
            "id": "agent-4102",
            "images": [
              {
                "height": 1200,
                "mime": "png",
                "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                "width": 800,
                "type": "agent"
              }
            ],
            "active": {
              "type": "literal",
              "value": "1882-1949"
            },
            "birthDate": {
              "type": "literal",
              "value": "1920"
            },
            "deathDate": {
              "type": "literal",
              "value": "1920"
            },
            "externals": {
              "identifiers": [
                {
                  "type": "norwegianAuthorityFile",
                  "value": "4102"
                }
              ]
            },
            "givenName": "Kari",
            "surname": "Nordmann",
            "type": "person"
          },
          "roles": [
            {
              "roleCode": "aut",
              "type": "marcRelator"
            }
          ]
        }
      ],
      "creators": [
        {
          "agent": {
            "description": "Norwegian novelist, awarded the Nobel Prize in Literature in 1928.",
            "fullName": "Sigrid Undset",
            "id": "agent-4102",
            "images": [
              {
                "height": 1200,
                "mime": "png",
                "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
                "width": 800,
                "type": "agent"
              }
            ],
            "active": {
              "type": "literal",
              "value": "1882-1949"
            },
            "birthDate": {
              "type": "literal",
              "value": "1920"
            },
            "deathDate": {
              "type": "literal",
              "value": "1920"
            },
            "externals": {
              "identifiers": [
                {
                  "type": "norwegianAuthorityFile",
                  "value": "4102"
                }
              ]
            },
            "givenName": "Kari",
            "surname": "Nordmann",
            "type": "person"
          },
          "roles": [
            {
              "roleCode": "aut",
              "type": "marcRelator"
            }
          ]
        }
      ],
      "edition": {
        "type": "literal",
        "value": "2nd edition"
      },
      "extent": [
        {
          "type": "literal",
          "value": "312 pages"
        }
      ],
      "identifier": "310552",
      "images": [
        {
          "height": 1200,
          "mime": "png",
          "url": "https://images.nordby.bibliotek.example/covers/310552.jpg",
          "width": 800,
          "type": "frontCover"
        }
      ],
      "language": [
        {
          "code": "SplxlOBeZQQYbYS6WxSbIA",
          "name": "Kari Nordmann"
        }
      ],
      "mediaTypes": [
        {
          "code": "book",
          "name": "Kari Nordmann"
        }
      ],
      "publicationDate": {
        "type": "literal",
        "value": "1920"
      },
      "publishers": [
        {
          "places": [
            {
              "place": "Oslo"
            }
          ],
          "publisher": {
            "id": "94549",
            "name": "Kari Nordmann"
          }
        }
      ],
      "titles": [
        {
          "language": {
            "code": "SplxlOBeZQQYbYS6WxSbIA",
            "name": "Kari Nordmann"
          },
          "main": "Kristin Lavransdatter",
          "part": {
            "name": "Kari Nordmann",
            "number": "1"
          },
          "remainder": "The Wreath",
          "type": "preferred"
        }
      ],
      "works": [
        {
          "identifier": "882107",
          "relation": "contains"
        }
      ]
    },
    "renewed": false,
    "transactionDateTime": "2025-03-14T10:24:00+01:00"
  }
}
```

#### `400` The list of errors.

`Errors`

Felles svar, definert én gang for hele API-et. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

Eksempel (Generert fra skjemaet):

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

#### `401` Bearer token invalid, missing, or expired.

Ikke noe innhold i svaret.

Felles svar, definert én gang for hele API-et. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)

#### `429` Too many requests. The provider is rate limiting and did not carry out the request.

Ikke noe innhold i svaret.

Felles svar, definert én gang for hele API-et. [Se den felles kontrakten på versjonssiden.](https://plasapi.com/no/provider/v0.6.7/)
