Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/soker90/finper/llms.txt

Use this file to discover all available pages before exploring further.

Transactions are the core financial records in Finper. Each transaction records a movement of money — an expense, an income, or a non-computable entry — linked to a specific account and category. Transactions also carry an optional store reference, which is auto-created if the named store does not yet exist. All endpoints require the token header.

Transaction Type Reference

TypeDescription
expenseMoney leaving an account (e.g. a purchase, a bill payment).
incomeMoney entering an account (e.g. a salary, a refund).
not_computableA movement that should not be counted in income/expense totals (e.g. an inter-account transfer recorded manually).

POST /api/transactions

Create a new transaction for the authenticated user. POST /api/transactions
If a store name is provided and no store with that name exists for the user, a new store record is created automatically. This allows quick entry without pre-registering every merchant.

Request Body

date
number
required
Transaction date as a Unix timestamp in milliseconds (e.g. 1704067200000 for 2024-01-01).
amount
number
required
Monetary amount of the transaction. Use the absolute value — the type field determines direction.
type
string
required
Transaction type. One of: expense, income, not_computable.
category
string
required
ID of the category to associate this transaction with. The category must belong to the authenticated user.
account
string
required
ID of the account this transaction is recorded against. The account must belong to the authenticated user.
store
string
Name of the store or merchant. If the name does not match an existing store for this user, a new store is created automatically.
note
string
Optional free-text note for the transaction.
tags
array
Optional array of tag strings. Each tag must be 30 characters or fewer; a maximum of 10 tags per transaction is allowed.

Response — 201 Created

Returns the newly created transaction object with the category and account fields populated.

Example

curl -X POST http://localhost:3008/api/transactions \
  -H 'token: <your-jwt>' \
  -H 'Content-Type: application/json' \
  -d '{
    "date": 1704067200000,
    "amount": 42.50,
    "type": "expense",
    "category": "64a1f2e3b4c5d6e7f8g9h0c1",
    "account": "64a1f2e3b4c5d6e7f8g9h0i1",
    "store": "Whole Foods",
    "note": "Weekly groceries"
  }'

GET /api/transactions

List transactions for the authenticated user, with optional filtering. GET /api/transactions

Query Parameters

date
number
Filter to transactions on this exact date (Unix ms). Exact-match on the stored timestamp.
category
string
Filter by category ID. Returns only transactions belonging to this category.
type
string
Filter by transaction type. One of: expense, income, not_computable.
account
string
Filter by account ID. Returns only transactions for the specified account.
store
string
Filter by store ID. Returns only transactions linked to the specified store.
page
number
Page number for pagination (1-based).

Response — 200 OK

Returns an array of transaction objects. The category and account fields are populated with their respective objects.
id
string
Unique identifier of the transaction.
date
number
Transaction date as Unix milliseconds.
amount
number
Monetary amount.
type
string
One of expense, income, or not_computable.
category
object
Populated category object (id, name, type).
account
object
Populated account object (id, name, bank).
store
string
Store name, if provided.
note
string
Free-text note, if provided.
tags
array
Array of tag strings, if any.

Example

curl "http://localhost:3008/api/transactions?type=expense&account=64a1f2e3b4c5d6e7f8g9h0i1&page=1" \
  -H 'token: <your-jwt>'

PUT /api/transactions/:id

Replace all fields of an existing transaction (full update). PUT /api/transactions/:id

Path Parameters

id
string
required
The unique identifier of the transaction to update.

Request Body

The same fields as POST /api/transactions. All fields are considered in the replacement — omitted optional fields are cleared.
date
number
required
Transaction date as Unix milliseconds.
amount
number
required
Monetary amount.
type
string
required
One of: expense, income, not_computable.
category
string
required
Category ID.
account
string
required
Account ID.
store
string
Store name (optional).
note
string
Free-text note (optional).
tags
array
Array of tag strings (optional).

Response — 200 OK

Returns the updated transaction object.

Example

curl -X PUT http://localhost:3008/api/transactions/64a1f2e3b4c5d6e7f8g9h0t1 \
  -H 'token: <your-jwt>' \
  -H 'Content-Type: application/json' \
  -d '{
    "date": 1704067200000,
    "amount": 38.75,
    "type": "expense",
    "category": "64a1f2e3b4c5d6e7f8g9h0c1",
    "account": "64a1f2e3b4c5d6e7f8g9h0i1",
    "store": "Whole Foods",
    "note": "Corrected amount"
  }'

DELETE /api/transactions/:id

Permanently delete a transaction. DELETE /api/transactions/:id

Path Parameters

id
string
required
The unique identifier of the transaction to delete.

Response — 204 No Content

No response body on success.

Example

curl -X DELETE http://localhost:3008/api/transactions/64a1f2e3b4c5d6e7f8g9h0t1 \
  -H 'token: <your-jwt>'

Build docs developers (and LLMs) love