foliolib.folio.api.dcb.DcbTransaction
- class foliolib.folio.api.dcb.DcbTransaction(tenant: str)
Bases:
foliolib.folio.FolioApimod DCB FOLIO API
mod DCB FOLIO API
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
createcirculationrequest(dcbTransactionId, ...)Create circulation request
gettransactionstatusbyid(dcbTransactionId)Get transaction status across circulation institutions
updatetransactionstatus(transactionStatus, ...)Update transaction status across circulation institutions
- createcirculationrequest(dcbTransactionId, dcbTransaction)
Create circulation request
POST /transactions/{dcbTransactionId}- Parameters
dcbTransactionId (str) –
dcbTransaction (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestConflict – Validation errors
OkapiRequestFatalError – Internal server error
Schema
{ "type": "object", "properties": { "item": { "description": "Item metadata required for the transaction", "type": "object", "properties": { "id": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$" }, "title": { "description": "The title of the item that has been requested", "type": "string" }, "barcode": { "description": "The barcode of the item as specified in the lending library", "type": "string" }, "materialType": { "description": "The \u201chub-normalized\u201d form of the item item type, used in the circulation rules for determining the correct loan policy.", "type": "string" }, "lendingLibraryCode": { "description": "The code which identifies the lending library", "type": "string" } } }, "patron": { "description": "Patron metadata required for the transaction", "type": "object", "properties": { "id": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$" }, "group": { "description": "The patron group associated with the requesting patron", "type": "string" }, "barcode": { "description": "The barcode of the patron", "type": "string" } } }, "pickup": { "description": "Pickup Location metadata required for the pickup service point", "type": "object", "properties": { "libraryCode": { "description": "The code which identifies the pickup library", "type": "string" }, "servicePointId": { "description": "UUID of the pickup service point", "type": "string" }, "servicePointName": { "description": "The name of the pickup service point", "type": "string" } } }, "role": { "type": "string", "enum": [ "LENDER", "BORROWER", "PICKUP", "BORROWING-PICKUP" ] } } }
{ "allOf": [ { "$ref": "transactionStatus.yaml#/TransactionStatus" }, { "$ref": "dcbTransaction.yaml#/DcbTransaction" } ] }
- gettransactionstatusbyid(dcbTransactionId)
Get transaction status across circulation institutions
GET /transactions/{dcbTransactionId}/status- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Resource not found
OkapiRequestError – Bad request
OkapiRequestFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "transactionStatus.yaml#/TransactionStatus" }, { "$ref": "dcbTransaction.yaml#/DcbTransaction" } ] }
- updatetransactionstatus(transactionStatus, dcbTransactionId)
Update transaction status across circulation institutions
PUT /transactions/{dcbTransactionId}/status- Parameters
transactionStatus (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
Schema
{ "type": "object", "properties": { "status": { "type": "string", "enum": [ "CREATED", "OPEN", "AWAITING_PICKUP", "ITEM_CHECKED_OUT", "ITEM_CHECKED_IN", "CLOSED", "CANCELLED", "ERROR" ] }, "message": { "type": "string" } } }
{ "allOf": [ { "$ref": "transactionStatus.yaml#/TransactionStatus" }, { "$ref": "dcbTransaction.yaml#/DcbTransaction" } ] }