Dmitry N. Medvedev
Dmitry N. Medvedev

Reputation: 77

Yodlee: empty list of transactions on a test account

I've registered test account with Yodlee and tried code sample for NodeJS.

The idea was to get a list of transactions of a test user. Nothing. Never seen and example of how to specify, say, fromDate and toDate parameters, as recommended.

Could you please drop a very simple code listing transactions of a user?

Thanks in advance.

Upvotes: 1

Views: 258

Answers (2)

en_austin
en_austin

Reputation: 71

From Yodlee API docs:

By default, this service returns the last 30 days of transactions from today's date.

You are receiving an empty transactions list with valid API call since all their demo transactions in dev sandboxes are being created with "2013-mm-dd" timestamp - so that's why the same API call by @Krithik returns some data.

Upvotes: 3

Krithik
Krithik

Reputation: 224

Here is the sample code for getting transactions. Hope this helps

var http = require("https");

var options = {
  "method": "GET",
  "hostname": "developer.api.yodlee.com",
  "port": null,
  "path": "/ysl/restserver/v1/transactions?container=bank&fromDate=2013-01-05&toDate=2016-12-20",
  "headers": {
    "authorization": "cobSession=08062013_2:99be18ed5a16856c1e1f3cce1cadd064152c6c3664d5aac935a72992967f20dbf057bdb8580ada5c29dd29fff6fd9baa20238c4384ab0be9d8e80a708b301bb0,userSession=08062013_0:1f5692792f5b97a1c825fb8fbe687023f583c9b5029d8437c90ddb99c9eb77539cef1b37005e5007cbdeb2df272626b49ce1c3cc9539ef52526c267a1de238b7",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();

Upvotes: 1

Related Questions