curl --request GET \
--url https://api.despezzas.com/v1/categorization-rules \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/categorization-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/categorization-rules"
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/categorization-rules"
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))
}[
{
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"enabled": true,
"id": "d4e5f6a7-b8c9-4d0e-8f1a-2b3c4d5e6f7a",
"is_expense": true,
"match_fields": [
"merchant_name"
],
"source_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"source_kind": "ACCOUNT",
"source_transaction_id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"available_criteria": [
{
"field": "merchant_name",
"normalized": "pao de acucar",
"value": "Pão de Açúcar"
}
],
"createdAt": "2026-09-01T09:00:00.000Z",
"fingerprint": "sha256:4f2a…",
"profile_id": null,
"subcategory_id": "d7e8f9a0-b1c2-4d3e-8f4a-5b6c7d8e9f0a",
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
}
]{
"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"
}Listar regras
Escopo necessário: read.
curl --request GET \
--url https://api.despezzas.com/v1/categorization-rules \
--header 'Authorization: Basic <encoded-value>'const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.despezzas.com/v1/categorization-rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.despezzas.com/v1/categorization-rules"
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/categorization-rules"
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))
}[
{
"category_id": "b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"enabled": true,
"id": "d4e5f6a7-b8c9-4d0e-8f1a-2b3c4d5e6f7a",
"is_expense": true,
"match_fields": [
"merchant_name"
],
"source_id": "3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f",
"source_kind": "ACCOUNT",
"source_transaction_id": "8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
"available_criteria": [
{
"field": "merchant_name",
"normalized": "pao de acucar",
"value": "Pão de Açúcar"
}
],
"createdAt": "2026-09-01T09:00:00.000Z",
"fingerprint": "sha256:4f2a…",
"profile_id": null,
"subcategory_id": "d7e8f9a0-b1c2-4d3e-8f4a-5b6c7d8e9f0a",
"updatedAt": "2026-09-15T14:32:10.000Z",
"user_id": "0d6b923c-3392-424e-a152-2ee32474e8d5"
}
]{
"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
Filtra pela origem.
ACCOUNT, CREDIT_CARD "ACCOUNT"
Filtra pela conta ou cartão de origem.
"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"
Só ativas (true) ou só inativas (false).
true
Response
Sucesso.
Categoria aplicada.
"b1a2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
Ativa.
true
Id.
"d4e5f6a7-b8c9-4d0e-8f1a-2b3c4d5e6f7a"
Se vale para despesas (senão, receitas).
true
Campos que a regra compara.
["merchant_name"]
Id da conta ou do cartão de origem.
"3a9e7d21-4b5c-4d6e-8f70-1a2b3c4d5e6f"
De onde vêm os lançamentos comparados.
ACCOUNT, CREDIT_CARD "ACCOUNT"
Lançamento que originou a regra.
"8f1c2a34-5b6d-4e7f-8a9b-0c1d2e3f4a5b"
Critérios que o lançamento de origem oferece.
Show child attributes
Show child attributes
Criação.
"2026-09-01T09:00:00.000Z"
Assinatura dos critérios (evita regras duplicadas).
"sha256:4f2a…"
Perfil de Acesso / empresa.
null
Subcategoria aplicada.
"d7e8f9a0-b1c2-4d3e-8f4a-5b6c7d8e9f0a"
Última alteração.
"2026-09-15T14:32:10.000Z"
Dono.
"0d6b923c-3392-424e-a152-2ee32474e8d5"