Purpose:
This page will provide the steps for all the state transition in Lending library.
...
- For the first time, if user wants to create a transaction they can call the edge-api with the below payload.
Note: API key should change based on tenant.
HTTP Method : POST
Request Body :
{
"item": {
"id": "948b3fd4-047c-4291-9509-b583f860d6c5",
"barcode": "SystemDemoItem4"
},
"patron": {
"id": "11b526a6-37d6-47c2-a4df-e46189791256",
"group": "staff",
"barcode": "systemDemoUser1"
},
"pickup": {
"servicePointId": "5d2625ef-81eb-4e61-a8a9-87c94ba3764d",
"servicePointName": "circDesk2",
"libraryCode": "GVSU"
},
"role": "LENDER"
}
...
- If the item reaches the Borrowing library and user do the checkin in the Borrowing library, status of the transaction will change from OPEN to Awaiting_pickup in Borrowing library. DCB will poll this status change using get API and propagate it to lending library with the below API.
HTTP Method : PUT
Request Body :
{
"status" : "AWAITING_PICKUP"
}
- When this request executes, below actions will happen.
- Automatic checkin happens in the same service point in which the request is created in step1. So that status of the item is changed to Awaiting_pickup and request is changed to Open-Awaiting pickup.
- Status of the transaction change from OPEN to AWAITING_PICKUP
...
- Patron reaches the Borrowing library and do the checkout in the Borrowing library, status of the transaction will change from AWAITING_PICKUP to ITEM_CHECKED_OUT in Borrowing library. DCB will poll this status change using get API and propagate it to lending library with the below API.
HTTP Method : PUT
Request Body :
{
"status" : "ITEM_CHECKED_OUT"
}
- When this request executes, below actions will happen.
- Automatic checkout happens in Lending library. As a result of checkout, loan will be created and status of the item is changed to checked out and request is changed to Closed .
- Status of the transaction change from AWAITING_PICKUP to ITEM_CHECKED_OUT
...
- Patron return the item so that checkin action takes place in the Borrowing library, status of the transaction will change from ITEM_CHECKED_OUT to ITEM_CHECKED_IN in Borrowing library. DCB will poll this status change using get API and propagate it to lending library with the below API.
HTTP Method : PUT
Request Body :
{
"status" : "ITEM_CHECKED_IN"
}
- When this request executes, below actions will happen.
- Status of the transaction change from ITEM_CHECKED_OUT to ITEM_CHECKED_IN
- There will be no other action happens here, we are just synchronizing the states.
...
- Item reaches the lending library and the user do the checkin action (Manual). DCB mod-dcb will listen to the check-in action and update the status from ITEM_CHECKED_IN to CLOSED.
...
- If user wants to poll/get the status of the transaction, they can call the below API.
HTTP Method : GET