Skip to content

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.

MethodPathAction
GET/api/v1/transactionsList transactions
POST/api/v1/transactionsCreate 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}/filesAttach files
DELETE/api/v1/transactions/{id}/files/{file_id}Remove a file
POST/api/v1/transactions/{id}/refundMark as refunded
DELETE/api/v1/transactions/{id}/refundUnmark refund
GET/api/v1/refundsList refunds

When creating a transaction:

FieldTypeRequiredNotes
amountnumberyesMinimum 0.01.
typestringyesincome or expense.
wallet_idintegeryesMust reference one of your wallets.
descriptionstringnoFree text.
datetimestringnoISO 8601. When the transaction occurred.
party_idintegernoWho you paid or were paid by.
group_idintegernoOptional grouping.
categoriesinteger[]noCategory IDs.
is_recurringbooleannoWhether this repeats.
recurrence_periodstringnodaily, weekly, monthly, or yearly.
recurrence_intervalintegernoMinimum 1.
recurrence_ends_atstringnoISO 8601, after today.
client_idstringnoClient-generated ID, {device_uuid}:{entity_uuid}.
created_atstringnoISO 8601.

File attachments are sent as files[] on the upload endpoint.

Terminal window
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]
}'
{
"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"
}
}

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.