curl --request PUT \
--url https://api.despezzas.com/v2/personal-config \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"auto_reconcile_enabled": true,
"include_bill_payments": true,
"include_current_bill_in_to_pay": false,
"include_investments": false,
"include_transfers": false,
"show_open_bill": false
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auto_reconcile_enabled: true,
include_bill_payments: true,
include_current_bill_in_to_pay: false,
include_investments: false,
include_transfers: false,
show_open_bill: false
})
};
fetch('https://api.despezzas.com/v2/personal-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v2/personal-config"
payload = {
"auto_reconcile_enabled": True,
"include_bill_payments": True,
"include_current_bill_in_to_pay": False,
"include_investments": False,
"include_transfers": False,
"show_open_bill": False
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v2/personal-config"
payload := strings.NewReader("{\n \"auto_reconcile_enabled\": true,\n \"include_bill_payments\": true,\n \"include_current_bill_in_to_pay\": false,\n \"include_investments\": false,\n \"include_transfers\": false,\n \"show_open_bill\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"auto_reconcile_enabled": true,
"configured": true,
"include_bill_payments": true,
"include_current_bill_in_to_pay": false,
"include_investments": false,
"include_transfers": false,
"show_open_bill": false
}{
"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"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}{
"message": "Credenciais de API inválidas",
"statusCode": 401,
"error": "Unauthorized"
}Atualizar preferências
Escopo necessário: write.
curl --request PUT \
--url https://api.despezzas.com/v2/personal-config \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"auto_reconcile_enabled": true,
"include_bill_payments": true,
"include_current_bill_in_to_pay": false,
"include_investments": false,
"include_transfers": false,
"show_open_bill": false
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auto_reconcile_enabled: true,
include_bill_payments: true,
include_current_bill_in_to_pay: false,
include_investments: false,
include_transfers: false,
show_open_bill: false
})
};
fetch('https://api.despezzas.com/v2/personal-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v2/personal-config"
payload = {
"auto_reconcile_enabled": True,
"include_bill_payments": True,
"include_current_bill_in_to_pay": False,
"include_investments": False,
"include_transfers": False,
"show_open_bill": False
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.despezzas.com/v2/personal-config"
payload := strings.NewReader("{\n \"auto_reconcile_enabled\": true,\n \"include_bill_payments\": true,\n \"include_current_bill_in_to_pay\": false,\n \"include_investments\": false,\n \"include_transfers\": false,\n \"show_open_bill\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"auto_reconcile_enabled": true,
"configured": true,
"include_bill_payments": true,
"include_current_bill_in_to_pay": false,
"include_investments": false,
"include_transfers": false,
"show_open_bill": false
}{
"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"
}{
"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.
Body
Todos opcionais: só o que for enviado muda.
Conciliação automática.
true
Pagamentos de fatura entram nos totais.
true
Fatura atual entra no "a pagar".
false
Contas de investimento entram no saldo.
false
Transferências entre contas entram nos totais.
false
Mostra sempre a fatura aberta.
false
Response
Sucesso.
Preferências que mudam como saldos e totais são calculados.
Conciliação automática de pagamentos previstos.
true
Se o usuário já salvou preferências (senão valem os padrões).
true
Pagamentos de fatura entram nos totais.
true
Fatura atual entra no "a pagar".
false
Contas de investimento entram no saldo.
false
Transferências entre contas entram nos totais.
false
Mostra sempre a fatura aberta.
false