# Transaction Management

<details>

<summary><strong>Export Uncategorized Transactions for Review</strong></summary>

**The Script**

bash

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

MONTH_START="2026-01-01"
MONTH_END="2026-01-31"
OUTPUT_FILE="uncategorized-$(date +%Y%m%d).csv"

kick transactions list \
  --from="$MONTH_START" \
  --to="$MONTH_END" \
  --filter="category=null" \
  --format=csv \
  > "$OUTPUT_FILE"

count=$(wc -l < "$OUTPUT_FILE")
count=$((count - 1))

echo "Exported $count uncategorized transactions to $OUTPUT_FILE"

if [ $count -gt 0 ]; then
  echo "⚠️  Review and categorize these transactions before closing the month"
fi
```

**How to Customize**

* Add additional filters: `--filter="category=null AND amount>1000"`
* Change date range to current month
* Export to JSON instead of CSV

**What It Outputs**

* CSV file with all uncategorized transactions
* Console message showing count

</details>

<details>

<summary><strong>Bulk Update Transactions from Spreadsheet</strong></summary>

**The Script**

bash

```bash
#!/bin/bash
# bulk-update-transactions.sh

INPUT_FILE="transaction-updates.csv"

if [ ! -f "$INPUT_FILE" ]; then
  echo "Error: $INPUT_FILE not found"
  exit 1
fi

echo "Previewing changes..."
kick transactions update --file="$INPUT_FILE" --dry-run

read -p "Apply these changes? (y/n) " -n 1 -r
echo

if [[ $REPLY =~ ^[Yy]$ ]]; then
  kick transactions update --file="$INPUT_FILE"
  echo "✓ Transactions updated"
else
  echo "Update cancelled"
fi
```

**How to Customize**

* Remove confirmation prompt for automation
* Add logging to track changes
* Send Slack notification after update

**What It Outputs**

* Preview of changes before applying
* Confirmation of successful updates

</details>

<details>

<summary><strong>Find Duplicate Transactions</strong></summary>

**The Script**

bash

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

FROM_DATE="2026-01-01"
TO_DATE="2026-01-31"

echo "Finding potential duplicates..."

kick transactions list \
  --from="$FROM_DATE" \
  --to="$TO_DATE" \
  --format=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**

* Adjust grouping criteria
* Export duplicates to CSV for review
* Auto-flag duplicates with a tag

**What It Outputs**

```
Potential duplicates:
  ID: txn_123 | 2026-01-15 | 500.00 | Amazon
  ID: txn_456 | 2026-01-15 | 500.00 | Amazon
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kick.co/ai/kick-cli/cli-use-case-library/transaction-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
