Skip to content

Instantly share code, notes, and snippets.

@mrweiland
Created February 28, 2018 13:05
Show Gist options
  • Save mrweiland/d66f6660ba8ad3bc0321c57f2297f741 to your computer and use it in GitHub Desktop.
Save mrweiland/d66f6660ba8ad3bc0321c57f2297f741 to your computer and use it in GitHub Desktop.
Get banking transactions from Northbricks
URL obj = new URL("https://api.northbricks.io/api/v1/banks/{bankId}/accounts/{accountId}/transactions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

{ "transactions": [ { "id": "string", "description": "string", "bookingDate": "2017-12-07T21:19:53Z", "valueDate": "2017-12-07T21:19:53Z", "amount": { "value": 0, "currency": "string" }, "relatedParty": { "name": "string" } } ] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment