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>",
"spending_comparison": {
"previous_period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"current_total": "<string>",
"comparison_total": "<string>",
"comparison_end_date": "2023-12-25",
"delta": "<string>",
"current": [
{
"date": "2023-12-25",
"amount": "<string>"
}
],
"previous": [
{
"date": "2023-12-25",
"amount": "<string>"
}
]
},
"savings_rate": "<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": 123,
"target": 123,
"value": "<string>",
"percentage": "<string>"
}
]
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "invalid_view",
"message": "<string>"
}Show cash flow
Returns income, spending, net savings, and a day-by-day comparison against the previous month for a given calendar month, or a Sankey graph for an arbitrary date range.
Query modes
| Parameters | Response shape | |---|---| | month (or none) | CashFlow — monthly summary with spending comparison series | | month + include=sankey | CashFlow with an additional sankey field | | view=sankey + start_date + end_date | CashFlowGraph — Sankey-only response for any date range |
include and view cannot be combined. Both parameters currently support only the value sankey. view=sankey requires start_date and end_date and must not include month.
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>",
"spending_comparison": {
"previous_period": {
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"current_total": "<string>",
"comparison_total": "<string>",
"comparison_end_date": "2023-12-25",
"delta": "<string>",
"current": [
{
"date": "2023-12-25",
"amount": "<string>"
}
],
"previous": [
{
"date": "2023-12-25",
"amount": "<string>"
}
]
},
"savings_rate": "<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": 123,
"target": 123,
"value": "<string>",
"percentage": "<string>"
}
]
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "invalid_view",
"message": "<string>"
}Authorizations
API key for authentication. Generate one from your account settings.
Query Parameters
First day of the calendar month to summarize (ISO 8601, e.g. 2025-01-01). Defaults to the current month. Must not be in the future. Cannot be combined with view=sankey.
Pass sankey to append a Sankey graph to the standard monthly CashFlow response. Cannot be combined with view.
sankey Pass sankey to retrieve a Sankey-only CashFlowGraph response for an arbitrary date range. Requires start_date and end_date. Cannot be combined with include or month.
sankey Start of the custom date range (ISO 8601). Required when view=sankey.
End of the custom date range (ISO 8601). Required when view=sankey. Must be on or after start_date.
Response
cash flow returned
- Option 1
- Option 2
First day of the requested month (ISO 8601).
Date the response was calculated.
IANA time zone identifier for the authenticated user.
Family primary currency code.
Show child attributes
Show child attributes
Total income for the period as a decimal string.
Total spending for the period as a decimal string.
income - spending as a decimal string.
Show child attributes
Show child attributes
Savings rate as a percentage decimal string (0–100), or null when income is zero.
Sankey graph data. Present only when include=sankey is passed.
Show child attributes
Show child attributes
Was this page helpful?