transaction management.md

Transaction Management

Export uncategorized transactions for review

To pull transactions that still need a category before you close a period, fetch JSON for the date range and filter client-side. The CLI does not support a category=null filter flag.

The Script

#!/bin/bash
# export-uncategorized.sh

WORKSPACE_ID="<workspace-id>"
SINCE="2026-01-01"
UNTIL="2026-01-31"
OUTPUT_FILE="uncategorized-$(date +%Y%m%d).json"

kick --workspace "$WORKSPACE_ID" transactions find \
  --since "$SINCE" \
  --until "$UNTIL" \
  --fields id,date,amount,counterparty,category,bank_description \
  --output json \
  | jq '[.[] | select(.category == null or .category == "")]' \
  > "$OUTPUT_FILE"

count=$(jq 'length' "$OUTPUT_FILE")

echo "Exported $count uncategorized transactions to $OUTPUT_FILE"

if [ "$count" -gt 0 ]; then
  echo "Review and update categories in Kick before closing the period"
fi

How to Customize

What It Outputs

Inspect a transaction before updating it

To review one transaction and apply a change, fetch it first. Updates require a payload file and preview confirmation.

The Script

#!/bin/bash
# inspect-and-update-transaction.sh

WORKSPACE_ID="<workspace-id>"
TRANSACTION_ID=12345
PAYLOAD_FILE="transaction-update.json"

echo "Current transaction (read):"
kick --workspace "$WORKSPACE_ID" transactions get "$TRANSACTION_ID" --output json | jq .

if [ ! -f "$PAYLOAD_FILE" ]; then
  echo "Create $PAYLOAD_FILE with the fields you want to change, then re-run."
  exit 1
fi

echo ""
echo "Preview update (write):"
kick --workspace "$WORKSPACE_ID" transactions update \
  --transaction-id "$TRANSACTION_ID" \
  --payload-file "$PAYLOAD_FILE"

How to Customize

What It Outputs

Find duplicate transactions

To flag likely duplicates in a period, group transactions by date, amount, and counterparty.

The Script

#!/bin/bash
# find-duplicates.sh

WORKSPACE_ID="<workspace-id>"
SINCE="2026-01-01"
UNTIL="2026-01-31"

echo "Finding potential duplicates..."

kick --workspace "$WORKSPACE_ID" transactions find \
  --since "$SINCE" \
  --until "$UNTIL" \
  --fields id,date,amount,counterparty \
  --output json | \
jq -r '
  group_by([.date, .amount, .counterparty]) |
  map(select(length > 1)) |
  .[] |
  "Potential duplicates:\n" +
  (map("  ID: \(.id) | \(.date) | \(.amount) | \(.counterparty)") | join("\n")) +
  "\n"
'

How to Customize

What It Outputs

Potential duplicates:
  ID: 123 | 2026-01-15 | -500.00 | Amazon
  ID: 456 | 2026-01-15 | -500.00 | Amazon