Show cash flow and optional Sankey graph
curl --request GET \
--url https://app.sure.am/api/v1/cash_flow \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.sure.am/api/v1/cash_flow"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://app.sure.am/api/v1/cash_flow', 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://app.sure.am/api/v1/cash_flow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://app.sure.am/api/v1/cash_flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sure.am/api/v1/cash_flow")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/cash_flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"month": "2023-12-25",
"as_of": "2023-12-25",
"time_zone": "<string>",
"currency": "<string>",
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"savings_rate": "<string>",
"spending_comparison": {
"previous_period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"current_total": "<string>",
"comparison_total": "<string>",
"delta": "<string>",
"comparison_end_date": "2023-12-25",
"current": [
{
"date": "2023-12-25",
"amount": "<string>"
}
],
"previous": [
{
"date": "2023-12-25",
"amount": "<string>"
}
]
},
"sankey": {
"basis": "net_by_category",
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"nodes": [
{
"id": "<string>",
"name": "<string>",
"kind": "income",
"value": "<string>",
"percentage": "<string>",
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_value": "<string>",
"color": "<string>"
}
],
"links": [
{
"source": 1,
"target": 1,
"value": "<string>",
"percentage": "<string>"
}
],
"invested": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}Cash Flow
Show cash flow and optional Sankey graph
Server-calculated income, spending, savings, and daily cumulative comparison in family currency. Uses the authenticated user’s finance accounts and Sure reporting rules. Browser sessions do not authenticate this public API.
GET
/
api
/
v1
/
cash_flow
Show cash flow and optional Sankey graph
curl --request GET \
--url https://app.sure.am/api/v1/cash_flow \
--header 'X-Api-Key: <api-key>'import requests
url = "https://app.sure.am/api/v1/cash_flow"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://app.sure.am/api/v1/cash_flow', 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://app.sure.am/api/v1/cash_flow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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://app.sure.am/api/v1/cash_flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.sure.am/api/v1/cash_flow")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/cash_flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"month": "2023-12-25",
"as_of": "2023-12-25",
"time_zone": "<string>",
"currency": "<string>",
"period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"savings_rate": "<string>",
"spending_comparison": {
"previous_period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"current_total": "<string>",
"comparison_total": "<string>",
"delta": "<string>",
"comparison_end_date": "2023-12-25",
"current": [
{
"date": "2023-12-25",
"amount": "<string>"
}
],
"previous": [
{
"date": "2023-12-25",
"amount": "<string>"
}
]
},
"sankey": {
"basis": "net_by_category",
"income": "<string>",
"spending": "<string>",
"net_savings": "<string>",
"nodes": [
{
"id": "<string>",
"name": "<string>",
"kind": "income",
"value": "<string>",
"percentage": "<string>",
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_value": "<string>",
"color": "<string>"
}
],
"links": [
{
"source": 1,
"target": 1,
"value": "<string>",
"percentage": "<string>"
}
],
"invested": "<string>"
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}Authorizations
Query Parameters
Response
summary returned
- Option 1
- Option 2
Was this page helpful?