DCB Borrowing Flow Details

Purpose:

This page provides the steps for end-to-end transaction flow in the Borrowing library.

Quick note: The Borrowing flow means the absence of manual check-in / check-out actions

Prerequisites: The patron is the existing user.

Steps:

1:- CREATE TRANSACTION

  URL : https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

  Note:

    1:-API key should change based on tenant.

  HTTP Method : Post

  Request Body :

  {
    "item": {
        "id": "91aa52cb-29d2-41c1-99a2-fb9b293956dc",
        "title": "Test",
        "barcode": "item-barcode-4",
        "materialType": "book"
      },
    "patron": {
        "id": "9fa67b9c-5546-45ca-a82f-66495794591d",
        "barcode": "user-barcode-3"
    },
    "pickup": {
        "servicePointId""3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
        "servicePointName""Diku",
        "libraryCode""diku"
    },
    "role": "BORROWER"
}

  • Note - In the above payload with fields and the values are required for the "role": "BORROWER".

  Note:

    1:-The patron should already exist before making this call.

    2. Service PointId is requried and name is optional for Borrowing library.

    3. The patron is fetched based on barcode and id.

  The successful response will do the below activities

    1:- An item will be created in the mod-circulation-item schema with item details provided in the payload.

    2:- A Service point will be created with pickup details in the payload.

    3:- A hold request will be created in mod-circulation with the status as OPEN-not yet filled.

    4:- A transaction record will be created in the DCB schema with the status CREATED and role as BORROWING.



2:- UPDATE  TRANSACTION

 Note:-

    The manual item CheckIn action from the side of Lending lib triggers the DCB reflection, which means the DCB changes the transaction status in the Borrowing lib from  CREATED to OPEN.
(DCB will send a PUT request to change the request from CREATED to OPEN for the BORROWING role.)

 URL :-

    https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345/status?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

HTTP Method : PUT

   Request Body : 

  {
    "status" : "OPEN"
  }


3:- GET TRANSACTION STATUS

    To poll/get the status of the transaction, call the below API.

  URL : https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345/status?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ== 

  HTTP Method: GET

4:- Once the status of the Borrowing transaction is OPEN, the item delivery to the pickup service point is initiated.

At the time the item has been delivered to pickup SP, the SP triggers manual check-in on behalf of the Pickup role then the DCB triggers the transaction status update from OPEN to AWAITING_PICKUP for the BORROWING role.

URL :-

    https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345/status?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

HTTP Method : PUT

   Request Body : 

  {
    "status" : "AWAITING_PICKUP"
  }


This will do the below activity:

       4.1:- Item status will be changed to AWAITING_PICKUP

       4.2:- Transaction status for borrowing library also changed to AWAITING_PICKUP.

5:- The manual item check-out from the side of Pickup lib(at the time the patron takes the item), triggers the DCB need to update the BORROWING transaction status from AWAITING_PICKUP to ITEM_CHEKED_OUT.

URL :-

    https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345/status?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

HTTP Method : PUT

   Request Body : 

  {
    "status" : "ITEM_CHECKED_OUT"
  }


This will do the below activity:

       5.1:- Item status will be changed to checked_out

       5.2:- Transaction status for borrowing 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 Pickup library. For more info about Lending flow. (DCB Lending Flow Details


6:- CHECK_IN  ITEM

       Patron returns the item, so the DCB needs to check it in: the DCB triggers the BORROWING transaction status update from ITEM_CHEKED_OUT to ITEM_CHEKED_IN.

URL :-

    https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345/status?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

HTTP Method : PUT

   Request Body : 

  {
    "status" : "ITEM_CHECKED_IN"
  }


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 the Borrowing 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 :-

    https://folio-dev-volaris-edge.ci.folio.org/dcbService/transactions/12345/status?apiKey=eyJzIjoieHFpNzNjNEZzOSIsInQiOiJkaWt1IiwidSI6ImRpa3VfYWRtaW4ifQ==

HTTP Method : PUT

   Request Body : 

  {
    "status" : "CLOSED"
  }