curl --request GET \
--url https://api.despezzas.com/v1/reports/spending-calendar \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/reports/spending-calendar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/reports/spending-calendar"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/reports/spending-calendar"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"available_years": [
2024,
2025,
2026
],
"days": [
{
"amount_cents": 25990,
"date": "2026-09-15",
"transaction_count": 1
}
],
"range": {
"end_date": "2026-12-31",
"start_date": "2026-01-01"
},
"totals": {
"days_with_expense": 212,
"max_day_cents": 250000,
"total_cents": 5420000
},
"weekdays": [
{
"day_count": 38,
"total_cents": 1200000,
"transaction_count": 180,
"weekday": 5
}
],
"year": 2026,
"top_day": {
"amount_cents": 250000,
"date": "2026-03-05",
"transaction_count": 3
}
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Calendário de gastos
Escopo necessário: read.
curl --request GET \
--url https://api.despezzas.com/v1/reports/spending-calendar \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/reports/spending-calendar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/reports/spending-calendar"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v1/reports/spending-calendar"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"available_years": [
2024,
2025,
2026
],
"days": [
{
"amount_cents": 25990,
"date": "2026-09-15",
"transaction_count": 1
}
],
"range": {
"end_date": "2026-12-31",
"start_date": "2026-01-01"
},
"totals": {
"days_with_expense": 212,
"max_day_cents": 250000,
"total_cents": 5420000
},
"weekdays": [
{
"day_count": 38,
"total_cents": 1200000,
"transaction_count": 180,
"weekday": 5
}
],
"year": 2026,
"top_day": {
"amount_cents": 250000,
"date": "2026-03-05",
"transaction_count": 3
}
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Authorizations
HTTP Basic com o token como usuário e o secret como senha: curl -u dpz_tk_…:dpz_sk_…. Crie a chave em https://despezzas.com/settings/api-keys.
Query Parameters
Ano (YYYY). Padrão: ano atual.
"2026"
Filtra pelas contas informadas (repita o parâmetro ou use account_ids[]). Também aceita a forma account_ids[].
["3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"]
Filtra pelos cartões informados. Também aceita a forma credit_card_ids[].
["c4d5e6f7-0a1b-4c2d-9e3f-4a5b6c7d8e9f"]
Filtra pelas tags informadas. Também aceita a forma tag_ids[].
["e2f3a4b5-c6d7-4e8f-9a0b-1c2d3e4f5a6b"]
Response
Sucesso.
Mapa de calor anual de despesas: série esparsa (só dias com gasto), totais e o dia da semana em que você mais gasta.
Anos com lançamentos.
[2024, 2025, 2026]
Só os dias com gasto.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Os 7 dias da semana (0 = domingo).
Show child attributes
Show child attributes
Ano.
2026
Dia de maior gasto, ou null.
Show child attributes
Show child attributes