Transactions
A transaction is income or an expense, belonging to a wallet. Transactions are the core record in Trakli. All routes below require a bearer token and live under /api/v1.
Endpoints
Section titled “Endpoints”| Method | Path | Action |
|---|---|---|
GET | /api/v1/transactions | List transactions |
POST | /api/v1/transactions | Create a transaction |
GET | /api/v1/transactions/{id} | Show one transaction |
PUT | /api/v1/transactions/{id} | Update a transaction |
DELETE | /api/v1/transactions/{id} | Delete a transaction |
POST | /api/v1/transactions/{id}/files | Attach files |
DELETE | /api/v1/transactions/{id}/files/{file_id} | Remove a file |
POST | /api/v1/transactions/{id}/refund | Mark as refunded |
DELETE | /api/v1/transactions/{id}/refund | Unmark refund |
GET | /api/v1/refunds | List refunds |
Fields
Section titled “Fields”When creating a transaction:
| Field | Type | Required | Notes |
|---|---|---|---|
amount | number | yes | Minimum 0.01. |
type | string | yes | income or expense. |
wallet_id | integer | yes | Must reference one of your wallets. |
description | string | no | Free text. |
datetime | string | no | ISO 8601. When the transaction occurred. |
party_id | integer | no | Who you paid or were paid by. |
group_id | integer | no | Optional grouping. |
categories | integer[] | no | Category IDs. |
is_recurring | boolean | no | Whether this repeats. |
recurrence_period | string | no | daily, weekly, monthly, or yearly. |
recurrence_interval | integer | no | Minimum 1. |
recurrence_ends_at | string | no | ISO 8601, after today. |
client_id | string | no | Client-generated ID, {device_uuid}:{entity_uuid}. |
created_at | string | no | ISO 8601. |
File attachments are sent as files[] on the upload endpoint.
Create
Section titled “Create”curl -X POST https://api.your-domain.example/api/v1/transactions \ -H "Authorization: Bearer your-token-here" \ -H "Content-Type: application/json" \ -d '{ "amount": 12.50, "type": "expense", "wallet_id": 1, "description": "Coffee", "categories": [4] }'Response shape
Section titled “Response shape”{ "success": true, "message": "Transaction created", "data": { "id": 101, "type": "expense", "amount": 12.5, "description": "Coffee", "datetime": "2026-06-14T09:12:00.000000Z", "user_id": 1, "wallet_id": 1, "party_id": null, "group_id": null, "transfer_id": null, "categories": [4], "files": [], "is_recurring": false, "is_refund": false, "client_generated_id": "device-uuid:entity-uuid", "last_synced_at": "2026-06-14T09:12:00.000000Z" }}Listing and sync
Section titled “Listing and sync”The list endpoint supports sync query parameters used by offline clients, including synced_since (return records changed after a timestamp) and a per-page limit. See Offline-first and sync.