POST /api/import/preview

Preview a CSV import

Parses a CSV string and returns each row tagged with a duplicate flag. The expected header row is Date, Description, Amount, Dr/Cr.

Request body

NameTypeRequiredDescription
csv_content string Required The raw CSV text (newlines separating rows).
account_id integer Required Account the imported transactions will belong to.

Request body example

REQUEST
{
  "account_id": 1,
  "csv_content": "Date,Description,Amount,Dr/Cr\n2026-06-01,Coffee shop,4.50,Dr\n2026-06-02,Salary,2500.00,Cr\n2026-06-03,Grocery store,32.10,Dr"
}

Response

200 OK
[
  {
    "transaction_date": "2026-06-01",
    "description": "Coffee shop",
    "amount": 4.50,
    "type": "expense",
    "is_duplicate": false,
    "account_id": 1
  },
  {
    "transaction_date": "2026-06-02",
    "description": "Salary",
    "amount": 2500.00,
    "type": "income",
    "is_duplicate": false,
    "account_id": 1
  },
  {
    "transaction_date": "2026-06-03",
    "description": "Grocery store",
    "amount": 32.10,
    "type": "expense",
    "is_duplicate": true,
    "account_id": 1
  }
]
422 Unprocessable Entity
{
  "message": "The given data was invalid.",
  "errors": {
    "account_id": ["The selected account_id is invalid."]
  }
}
POST /api/import/store requires verified email

Commit an import

Persists the chosen rows from a preview as real transactions on the user's account. Requires a verified email.

Request body

NameTypeRequiredDescription
transactions array Required Array of transaction objects. Each must include account_id, transaction_date, amount, and type.

Request body example

REQUEST
{
  "transactions": [
    {
      "account_id": 1,
      "transaction_date": "2026-06-01",
      "description": "Coffee shop",
      "amount": 4.50,
      "type": "expense"
    },
    {
      "account_id": 1,
      "transaction_date": "2026-06-02",
      "description": "Salary",
      "amount": 2500.00,
      "type": "income"
    }
  ]
}

Responses

200 OK
{ "message": "Successfully imported 2 transactions." }
403 Forbidden (email not verified)
{
  "message": "Your email address is not verified.",
  "requires_verified_email": true
}
POST /api/import/kuda/preview

Preview a Kuda bank-statement import

Same shape as the generic /import/preview, but tuned for the column layout of Kuda MFB statement exports. The parser is more lenient about whitespace and the “Dr/Cr” column (Kuda exports use D/C).

POST /api/import/kuda/store requires verified email

Commit a Kuda bank-statement import

Persists the chosen rows from a Kuda preview as real transactions. Requires a verified email and a 403 with requires_verified_email: true is returned otherwise.

© 2026 Pasona Finance Tracker API. All rights reserved.

API version: v1