Retrieve a Savings Account
curl --request GET \
--url https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}Deposit Account
Retrieve a Savings Account
GET
/
savingsaccounts
/
{savingsId}
Retrieve a Savings Account
curl --request GET \
--url https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spark.test.woodcore.co/api/v2/savingsaccounts/{savingsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}The balance on a savings account is automatically re-calculated and upated after every 30 mins on Woodcore, when a transaction is done on an an account, the change on the balance might not impact immediately but the message has been efected, if you need to see the calculated balaned realtime you can passs
refresh as trueExample- GET Account Balance - $500
- POST Debit Transaction - $100
- GET Account Balance - $500
- GET Account Balance with
refresh = true- $400 - GET Account Balance 30 min after - $400