v1

latestOpenAPI 3.0.02026-07-2422987517.5 KB
Transaction

Retrieve one transaction

Returns a single transaction by its accounting-ledger id (accounting_ledger_tx_id). The response additionally includes the attached transaction_labels, merchant_details and payables (the latter two only for banking_bank_transactions, and payables only when the Pay product is active).

Note: show returns a different, narrower projection than the list endpoint. It does not compute the labeled ledger fields (transaction_type, status, charge, deposit, amount, exchange_rate, target_cumulative_balance_with_commission, commission fields, etc.) that GET /v1/transactions adds — those are list/CSV-only. The plain cumulative_balance / target_cumulative_balance keys are the exception: they are virtual attributes aliased to the persisted ledger value, so they are present on both the list and the show responses. See the response schema.

get/v1/transactions/{transaction_id}

Path parameters

transaction_idstring uuid required

The Cardda accounting-ledger transaction id (accounting_ledger_tx_id). This is the same value exposed as id in the unified transactions list.

Headers

company-idstring uuid required

UUID of the company on whose behalf the request is made. Required for every Accounting endpoint. See The company-id header for details on how to obtain a value for this header and the error responses to expect when it is missing or invalid.

Response

The requested transaction

idstring uuid required

The transaction record id.

accounting_ledger_tx_idstring uuid

The underlying Accounting::LedgerTx id used to look this transaction up.

merchant_detailsobject nullable

Recipient details, populated for banking_bank_transactions only (null otherwise).

cumulative_balanceinteger nullable required

Running balance in cents. A virtual attribute aliased to the persisted ledger value (target_cumulative_balance_cents), so the key is always present — it holds the value stored on the ledger row. cumulative_balance and target_cumulative_balance are aliases of the SAME underlying value. Only the on-the-fly window-function recomputation of these balances is gated on _with_cumulative_balances=true (and on the CSV export); without it the persisted value is returned.

target_cumulative_balanceinteger nullable required

Running balance in cents. Aliased to the SAME persisted ledger value as cumulative_balance (target_cumulative_balance_cents); both keys are always present and carry the same number. Only the window-function recomputation is gated on _with_cumulative_balances=true (or the CSV export).

Example response

{
  "id": "09f6cc5e-8a16-43ae-8bb1-637c0e1c0a6d",
  "accounting_ledger_tx_id": "09f6cc5e-8a16-43ae-8bb1-637c0e1c0a6d",
  "transaction_labels": [
    {
      "id": "f1e2d3c4-b5a6-4978-8c9d-0e1f2a3b4c5d",
      "label": "Reembolsable",
      "color": "#22C55E",
      "company_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  ]
}