Skip to Content
SaaSFlow
DevelopersAPIReferencetransactions

Selection summary

Count and sum a transaction selection without fetching the rows, which is what makes "1,284 selected, €412,900" possible over a filter that matches more…

Authentication

Checking whether you're signed in…
POST
/companies/{companyId}/transactions/selection_summary

Authorization

headerAuthorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

Path Parameters

companyId*string
Formatuuid

Request Body

application/json
  1. body
selection*|

Response Body

Per-currency amount sums over the selection

application/json
  1. response
count*integer

Number of transactions in the selection.

sums*array<>

Per-currency sums of the selected transactions, sorted by currency code.

partialSums?array<>

Per-currency sums counting only the amount attributed to the matching categorizations, for selections with category-level filters where some transactions match only partially (e.g. a split categorization). Omitted when every transaction is attributed in full. Transactions without a partial attribution contribute their full amount.

Example Request
curl -X POST 'https://api.saasflow.com/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/transactions/selection_summary' \  -H 'Content-Type: application/json' \  -d '{  "selection": {    "mode": "ids",    "ids": [      "string"    ]  }}'
Example Response200
{  "count": 0,  "sums": [    {      "currency": "string",      "value": 0    }  ],  "partialSums": [    {      "currency": "string",      "value": 0    }  ]}