DCB GET API for polling transactions.

  • Overview:
    A new API is created in edge-dcb to support Polling the list of updated transaction between fromDate and toDate. This api response are immutable and will also support pagination.

  • Endpoint:
    GET : /transactions/status

  • Request format:
    Following are the parameters needed for this API
    1) fromDate - This is a mandatory query param which indicates the Start date for filtering transactions
    2) toDate - This is a mandatory query param which indicates the End date for filtering transactions.
    Both fromDate and toDate should follow below
    Format : ISO.DATE_TIME
    Valid values : 2024-04-30T12:00:00-01:00 , 2024-04-30T12:00:00Z
    Note : Clients should ensure that the provided date-time value is in UTC timezone to avoid ambiguity.
    3) pageNumber - This is a optional param which indicates the page of results to retrieve. It starts from 0. For example, if pageNumber is set to 0, it indicates the first page of results; if it's set to 1, it indicates the second page, and so on. Default pageNumber will be 0.
    4) pageSize - This is a optional param which specifies the number of items or records to include in each page of results. It determines the size of each page of data returned by the API. For example, if pageSize is set to 10, each page will contain up to 10 items/records. Default pageSize will be 1000.

  • Response Format

    {     "transactions": [         {             "id": "1234516",             "status": "OPEN",             "item": {                 "id": "7212ba6a-8dcf-45a1-be9a-ffaa847c4423",                 "title": "test123", "barcode": "BW-item17", "materialType": "book", "lendingLibraryCode": "KU123"             },             "patron": {                 "id": "11b526a6-37d6-47c2-a4df-e46189791256",                 "group": "staff",                 "barcode": "systemDemoUser1"             },             "pickup": {                 "libraryCode": "GVSU",                 "servicePointId": "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",                 "servicePointName": "Circ Desk 1"             },             "role": "LENDER"         }     ],     "currentPageNumber": 0,     "currentPageSize": 1,     "maximumPageNumber": 12,     "totalRecords": 13 }

    transactions: An array containing details of individual transactions. Each transaction object includes:
    id: Unique identifier for the transaction.
    status: Current status of the transaction (e.g., "OPEN").
    item: Details of the item involved in the transaction
    patron: Details of the patron involved in the transaction
    pickup: Details of the pickup location/service point
    role: Role of the library in the transaction (e.g., "LENDER").
    currentPageNumber: Indicates the current page number of the returned results. In this case, it's page 0, which typically indicates the first page.
    currentPageSize: Specifies the number of items included in the current page of results. Here, it's 1, indicating that there's one transaction object in the array.
    maximumPageNumber: Indicates the maximum page Number to fetch total records with current page size. In this case, it's 12, meaning that you will get the last records when the pageNumber will be 12.
    totalRecords: Specifies the total number of records available in the dataset. Here, it's 13, indicating that there are a total of 13 transactions which are available between the given date range.

  • ERROR HANDLING:
    If the fromDate or toDate parameter is not provided or is provided in an invalid format, the API will respond with a 400 Bad Request error indicating the missing or invalid parameter.

  • DOCUMENTATION
    Detailed API documentation is available here