Zum Inhalt springen
In der Referenz stöbern
Alle Ressourcen

Regeln

8 Endpunkte · Die Endpunktbeschreibungen sind auf Englisch.

List rules (ordered by priority then created_at)

GET/households/{householdId}/rules
read:rules
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -X GET https://api.vokse.ai/households/current/rules
Antwort200 · Success

Create a classification rule

POST/households/{householdId}/rules
write:rules
Request-Body
json
{  "name": "Auto-categorise coffee",  "predicate": {    "combinator": "all",    "conditions": [      {        "field": "payee_name",        "op": "contains",        "value": "coffee"      }    ]  },  "action": {    "setCategoryId": "01J8ME9B7QW3ZK5X2V8T4R6S1D"  }}
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -H "Content-Type: application/json" \     -H "Idempotency-Key: $(uuidgen)" \     -X POST https://api.vokse.ai/households/current/rules \     -d '{"name":"Auto-categorise coffee","predicate":{"combinator":"all","conditions":[{"field":"payee_name","op":"contains","value":"coffee"}]},"action":{"setCategoryId":"01J8ME9B7QW3ZK5X2V8T4R6S1D"}}'
Antwort201 · Success

Fetch a single rule

GET/households/{householdId}/rules/{id}
read:rules

Parameter

NameOrtErforderlich
idpathErforderlich
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -X GET https://api.vokse.ai/households/current/rules/{id}
Antwort200 · Success

Update a rule (priority, enabled, predicate, action)

PATCH/households/{householdId}/rules/{id}
write:rules

Parameter

NameOrtErforderlich
idpathErforderlich
Request-Body
json
{  "enabled": false}
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -H "Content-Type: application/json" \     -H "Idempotency-Key: $(uuidgen)" \     -X PATCH https://api.vokse.ai/households/current/rules/{id} \     -d '{"enabled":false}'
Antwort200 · Success

Soft-delete a rule

DELETE/households/{householdId}/rules/{id}
write:rules

Parameter

NameOrtErforderlich
idpathErforderlich
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -X DELETE https://api.vokse.ai/households/current/rules/{id}
Antwort204 · No content

Apply this rule to existing transactions (manual back-fill; trigger=manual)

POST/households/{householdId}/rules/{id}/apply
write:rules

Parameter

NameOrtErforderlich
idpathErforderlich
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -H "Idempotency-Key: $(uuidgen)" \     -X POST https://api.vokse.ai/households/current/rules/{id}/apply
Antwort200 · Success

Preview which existing transactions this rule matches (dry-run, applies nothing)

POST/households/{householdId}/rules/{id}/preview
read:rules

Parameter

NameOrtErforderlich
idpathErforderlich
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -H "Idempotency-Key: $(uuidgen)" \     -X POST https://api.vokse.ai/households/current/rules/{id}/preview
Antwort200 · Success

Apply every enabled rule (priority order, first-match-wins) to matching transactions

POST/households/{householdId}/rules/apply-all
write:rules
Beispielanfrage
bash
curl -H "Authorization: Bearer vokse_sk_…" \     -H "Idempotency-Key: $(uuidgen)" \     -X POST https://api.vokse.ai/households/current/rules/apply-all
Antwort200 · Success