# Patron Loan History

Provider API v0.6.5 · 3 operations
Source: https://plas.redia.dk/en/provider/v0.6.5/patron-loan-history/

No description in the specification.

## Get patron loan history

`GET` `/patron/{patronId}/loan-history` · `GetPatronLoanHistory`

### Parameters

- `patronId` (In `path`, `string`, required) — Patron ID from authentication
- `before` (In `query`, `string (date-time)`, required) — This tells the time period for when we fetch data. The period will be (-∞, before].
- `offset` (In `query`, `integer`, required) — This tells the offset. The offset should be 0 or above.
- `size` (In `query`, `integer`, required) — This tells the size of the request. The size should be between 1 and 50.
- `sorting_type` (In `query`, `string enum`, optional) — This can be used to choose the value (default: addedToHistoryTime) that the response is sorted on.

When sorting, some entries might not have the chosen sorting type (or it may be null). When this happens, the
entries should be sorted last when sorting order is `desc`, and then be sorted on addedToHistoryTime.

- `sorting` (In `query`, `string enum`, optional) — This can be used to choose if response should be sorted descending (default) or ascending.


Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Responses

- `200` [`PatronLoanHistoryResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronLoanHistoryResponseBody) — Success

Error responses: 400 · 401 · 404 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

## Adds a loan to the patron's loan history

`POST` `/patron/{patronId}/loan-history` · `AddLoanToPatronLoanHistory`

### Parameters

- `patronId` (In `path`, `string`, required) — Patron ID from authentication

Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Request body

`application/json` · required

[`AddLoanToPatronLoanHistoryRequestBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#AddLoanToPatronLoanHistoryRequestBody)

### Responses

- `204` `No response body.` — Success

Error responses: 400 · 401 · 404 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

## Delete loan from patron loan history

`DELETE` `/patron/{patronId}/loan-history/{loanHistoryId}` · `DeleteLoanFromPatronLoanHistory`

### Parameters

- `patronId` (In `path`, `string`, required) — Patron ID from authentication
- `loanHistoryId` (In `path`, `string`, required) — Loan history ID

Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Responses

- `204` `No response body.` — Success

Error responses: 400 · 401 · 404 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)
