Search code examples
restyodlee

What does an empty search result mean in yodlee?


After completing a refresh, getting users account data and then performing a transaction search we often get back search results in the format

{"searchIdentifier":{},"numberOfHits":0}

What does this mean and what should I do with this response?

Do I

  • retry and assume the refresh info i got was wrong and the users account are not in fact refreshed?
  • take that result as an empty result set as there are no transactions?

To me it is an error however we cant be sure that is not an empty search. As Yodlee does not support a proper rest/http protocol a 200 response code is sent with this... but it may be an error. At the very least it is not a valid payload as it has no search identifier.

The problem becomes worse as we have seen - the above search result be returned, then retry and get a result - and we have seen the above search result be returned and after dozens of reties get the same result.

It seems to be incredibly inconsistent.

Attempting to manage Yodlee's large number of ways of articulating an error is cause the code base to be a mess, how are other solving this?

What I really want is Yodlee to follow the HTTP spec and for empty search result be sensible and send a correct payload eg :

{
    "searchIdentifier" : {
        "identifier" : "0000000000-0000000000000--000000000-TX_SEARCH" //i.e. a valid identifier
    },
    "numberOfHits" : 0,
    "searchResult" : {
        "transactions" : [
            //i.e. nothing
        ]
    },
    "countOfAllTransaction" : 0,
    "countOfProjectedTxns" : 0,
    "debitTotalOfTxns" : {
        "amount" : 0.0,
        "currencyCode" : "USD"
    },
    "creditTotalOfTxns" : {
        "amount" : 0.0,
        "currencyCode" : "USD"
    },
    "debitTotalOfProjectedTxns" : {
        "amount" : 0.0,
        "currencyCode" : "USD"
    },
    "creditTotalOfProjectedTxns" : {
        "amount" : 0.0,
        "currencyCode" : "USD"
    }
}

HELP!


Solution

  • {"searchIdentifier":{},"numberOfHits":0}
    

    This result means that there are no transactions present in the Yodlee DB. This can be due to -

    1. Refresh still not completed and Yodlee is still gathering transactions
    2. There were no transactions found.

    While adding an account you should be trying to fetch transactions only once the refresh is completed. To know more on add account flow please refer this link . This has complete flow on add account for both site based and container based approach. You should only try fetching transactions once the flow completes.

    Yodlee can only return transactions when it's scraped from end site and present in Yodlee's data base.

    Also thanks for your feedback, we will certainly look into it.