Rules

Dry Run Rule

POST
/v1/households/{household_id}/rules/dry-run

Previews which visible transactions match a set of rule criteria without saving a rule or changing data. All set criteria must match; sending none matches nothing.

Returns total counts, one page of matches, and daily totals (each covering every match on that day across all pages). Pass next_cursor as cursor with the same criteria to continue; start without a cursor if criteria change. Read-only tokens and household viewers can call this endpoint.

Authorization

PersonalApiToken
AuthorizationBearer <token>

Personal API token (penny_pat_…). Paste only the token; the Bearer prefix is added automatically. Read-only tokens only allow read requests, and read/write tokens follow your current household membership and role. See https://penny.finance/docs/api#authentication.

In: header

Path Parameters

household_id*string

ID of the household that owns the resource. GET /v1/households lists the households you can access.

Request Body

application/json

filter_uncategorized?boolean

Whether the rule only matches transactions that have no category. A rule with this criterion is a fallback: it runs after all other rules, only when none of them assigned a category, and only fills in actions that no other rule took.

Defaultfalse
account_ids?array<string>|

Only match transactions on one of these accounts. Omit it, or send null or [], to match any account. Deleted accounts' transactions are skipped by dry runs and apply_to_existing, though transactions synced while deleted still run through rules. Saving a rule rejects a deleted account it doesn't already have.

merchant_ids?array<string>|

Only match transactions assigned to one of these merchants (transactions without a merchant never match). Omit it, or send null or [], to skip this check. A deleted merchant matches nothing, and saving rejects one the rule doesn't already have.

category_ids?array<string>|

Only match transactions currently in one of these categories (uncategorized transactions never match). Omit it, or send null or [], to skip this check. A deleted category matches nothing, and saving rejects one the rule doesn't already have.

amount_filter?|

Only match transactions on the given side (income or expense) whose amount passes the comparison. Omit it or send null to match any direction and amount.

classifications?array<>|

Only match transactions whose classification is one of these values (transactions without one never match). Omit it, or send null or [], to skip this check.

name_conditions?array<>|

Only match transactions whose name matches at least one of these conditions. Omit it, or send null or [], to skip this check.

cursor?|

The next_cursor from the previous page. Omit it to start from the first page.

limit?integer

The most results to return in one page.

Range1 <= value <= 200
Default50

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.penny.finance/v1/households/Hh4vK8pQ2sLm/rules/dry-run" \  -H "Authorization: Bearer $PENNY_API_TOKEN" \  -H "Content-Type: application/json" \  --data-raw '{  "name_conditions": [    {      "pattern": "groceries",      "mode": "contains"    }  ],  "amount_filter": {    "currency": "USD",    "direction": "expense",    "operator": "between",    "value": "20.00",    "value_upper": "200.00"  },  "limit": 50}'
{  "matched_count": 1,  "total_transactions": 436,  "matches": [    {      "id": "Tx3fJ9mS6vBa",      "original_name": "TRADER JOE'S #142",      "custom_name": "Weekly groceries",      "amount": {        "amount": "-54.20",        "currency": "USD"      },      "native_amount": {        "amount": "-54.20",        "currency": "USD"      },      "lat": 37.7764,      "lon": -122.4231,      "pending": false,      "classification": "FOOD_AND_DRINK_GROCERIES",      "account": {        "id": "Ac7kP2mN9qRs",        "mask": "4821",        "name": "Everyday Checking",        "type": "depository",        "current_balance": {          "amount": "2481.33",          "currency": "USD"        },        "currency": "USD",        "household_id": "Hh4vK8pQ2sLm",        "custom_name": null      },      "category": {        "id": "Ct5nR8wY1jFu",        "name": "Groceries",        "emoji": "🥬",        "category_type": "expense",        "group_id": "Cg2mV7pL4zXe"      },      "merchant": {        "id": "Mr9dL3xT6bQa",        "name": "Trader Joe's",        "website": "https://www.traderjoes.com/",        "image_url": "https://cdn.penny.finance/merchants/trader-joes.png",        "default_image_url": "https://cdn.penny.finance/logos/trader-joes.png",        "transaction_count": 18      },      "image_url": "https://cdn.penny.finance/merchants/trader-joes.png",      "image_kind": "merchant",      "tags": [        {          "id": "Tg8qN1cK5rWd",          "name": "Shared",          "color": "#6D5BD0"        }      ],      "hidden_at": null,      "deleted_at": null,      "listing": "visible",      "pending_transaction_id": null,      "date": "2026-08-14",      "transacted_at": "2026-08-14T15:38:00Z",      "needs_review": false,      "is_editable": true,      "notes": "Groceries and paper towels",      "created_at": "2026-08-14T15:41:27Z",      "updated_at": "2026-08-14T16:02:11Z",      "name": "Weekly groceries",      "split_parent_id": null,      "split_child_ids": [],      "is_recurring": false    }  ],  "daily_sums": [    {      "date": "2026-08-14",      "amount": {        "amount": "-54.20",        "currency": "USD"      }    }  ],  "next_cursor": null,  "has_more": false}