DCB Pickup Flow details
Purpose:
This page provides the steps for end-to-end transaction flow in the Pickup library.
Steps:
1:- CREATE TRANSACTION
Note:
1:-API key should change based on the tenant.
HTTP Method: Post
Request Body :
{
"item": {
"id": "565a17a1-e258-4973-bab6-da176010ea3c",
"title": "Test",
"barcode": "18",
"materialType": "book",
"lendingLibraryCode": "KU"
},
"patron": {
"id": "ee6542c3-f98e-414a-94e4-caad908aeb00",
"group": "staff",
"barcode": "user2"
},
"pickup": {
"servicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f"
},
"role": "PICKUP"
}
Note - In the above payload the fields with the values are required for the "role": "PICKUP".
Note:
1:- It's not expected to have a patron and/or an item already existed before making this call.
The successful response will do the below activities
1:- The patron will be created in the users schema with the patron details provided in the payload.
2:- An item will be created in the mod-circulation-item schema with item details provided in the payload.
4:- A hold request will be created in mod-circulation with the status as OPEN-not yet filled.
5:- A transaction record will be created in DCB schema with the status CREATED and role as Pickup.
2:- UPDATE TRANSACTION
Note:-
DCB will keep on polling the status of the Lending Transaction, if it's changed from CREATED to OPEN, then DCB will send a PUT request also to change the request from CREATED to OPEN for the Pickup role.
URL :-
HTTP Method : PUT
Request Body :
{
"status" : "OPEN"
}
3:- GET TRANSACTION STATUS
To poll/get the status of the transaction, call the below API.
HTTP Method : GET
4:- The status of the Pickup transaction is OPEN. The item is delivered to the Pickup location service point, so the user checks in the DCB item. Manually via UI, this will do the below activity:
4.1:- Item status will be changed to AWAITING_PICKUP
4.2:- Transaction status for pickup library also changed to AWAITING_PICKUP.
Note:- Transaction status and item status will only be changed if the service points are the same while checking the item in (checkIn). if different then there will be no change in item and transaction status.
5:- The manual item check-out from the side of Pickup lib(at the time the patron takes the item) happens:
5.1:- Item status will be changed to checked_out
5.2:- Transaction status for PickUp library also changed to ITEM_CHEKED_OUT.
5.3:- Hold request which was created previously, will be updated to close-filled.
5.4:- Loan will be created for the patron.
Note:- Transaction statuses will be in sync with the Lending library and Borrowing library. For more info about Lending flow(DCB Lending Flow Details)
6:- CHECK_IN ITEM
Patron returns the item, so the manual item check-in is triggered via UI. This will do below activities:-
6.1:- Loan for the patron will be closed
6.2:- Item status will be updated from checked_out to checked_In .
6.3:- Transaction status in PickUp library will be changed to ITEM_CHECKED_IN
7:- ITEM_CHECKED_IN to CLOSED
- The item reaches the lending library and the user does the check-in action (Manual). DCB will listen to the check-in action and update the status from ITEM_CHECKED_IN to CLOSED.
URL :-
HTTP Method : PUT
Request Body :
{
"status" : "CLOSED"
}