List transactions with sum
const url = 'https://app.commitly.com/api/transactions/extended/?type=incomes&page_size=100';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.commitly.com/api/transactions/extended/?type=incomes&page_size=100' \ --header 'Authorization: Bearer <token>'Same parameters and the same transaction fields as GET /transactions/, plus
sum: the sum of reporting_amount over all transactions that match the
filters, across all pages (not only the current page).
sum is in the company currency. For accounts in another currency it
therefore differs from a sum of amount.
Use it to check that an import is complete: compare count with the number
of records fetched over all pages, and sum with the sum of
reporting_amount over those records.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Bank account ID. Repeat the parameter for several accounts.
Category ID; includes its subcategories. Repeat the parameter for several categories.
Earliest value date.
Latest value date.
Year of the value date.
Month of the value date (1 to 12).
Fiscal year of the company.
Minimum reporting amount.
Maximum reporting amount.
incomes or expenses.
true: transactions still in a default (uncategorized) category.
true: uncategorized transactions that have a suggested category.
true: transactions linked to an invoice.
Filter on the transaction field is_payment.
Filter on tags.
true: transactions without tags.
Comma-separated transaction IDs.
Earliest creation time (ISO 8601).
Latest creation time (ISO 8601).
Earliest time of the last update (ISO 8601).
Latest time of the last update (ISO 8601).
Full-text search.
Sort order. Allowed fields: value_date, counterpart_name,
reporting_amount. Prefix a field with - for descending order. Default:
-value_date,id.
Page number, starting at 1. When paging through results, read this value
from the next link and send it to the documented base URL.
Number of records per page. Default 100, maximum 1000; larger values are reduced to 1000.
Responses
Section titled “Responses”Paginated list of transactions with the sum of all matching transactions.
object
Total number of matching records.
URL of the next page, or null on the last page. The host name may differ
from the documented base URL; read page from it and call the documented
base URL.
URL of the previous page, or null on the first page.
Deprecated, will be removed; do not build on it. Company-wide, independent of the request’s filters: true if at least
one uncategorized transaction with a non-zero amount has a suggested
category waiting for review.
object
Short form of a bank account, embedded in transactions.
object
Bank name. Present in the create-transactions response only.
Present in the create-transactions response only.
Extended category representation, embedded as predicted_category in transactions.
object
AG aggregating, EX expenses, IN incomes.
Display position.
Internal; can be ignored.
Internal; can be ignored.
Internal; can be ignored.
Internal; can be ignored.
ID of the parent category.
Invoice linked to the transaction, or null.
Value date (YYYY-MM-DD).
Value time (HH:MM:SS), or null. Most banks supply only the date of a
transaction, not the time, so expect null in most cases and do not rely
on this field for ordering within a day.
Booking date as reported by the bank (YYYY-MM-DD), or null.
Negative for outflows, positive for inflows. In the currency of the account.
amount converted to the company currency. Equal to amount for accounts in
the company currency.
Present in list responses.
Sum of reporting_amount over all transactions that match the filters,
across all pages (not only the current page). In the company currency, so
it differs from a sum of amount when there are accounts in another
currency.
Example
{ "count": 1, "sum": -1350, "next": null, "previous": null, "predicted_unmapped_transactions": false, "results": [ { "id": 7002, "account": { "id": 4002, "name": "Checking account", "alias": "Main" }, "category": { "id": 1003, "name": "Rent and leases", "description": "" }, "predicted_category": null, "invoice": null, "parent": null, "value_date": "2023-11-15", "value_time": null, "bank_booking_date": "2023-11-15", "amount": -1350, "reporting_amount": -1350, "purpose": "Office rent November", "counterpart_name": "Example Property GmbH", "counterpart_iban": "", "is_adjusting_entry": false, "is_payment": true, "is_leaf_node": true, "tags": null, "comment_count": 0 } ]}The access token is invalid or has expired. Request a new token. The message is
localized (see Accept-Language).
object
Error message.
Present only if the company’s edition does not include the function; value billing_plan_permission_denied.
Example
{ "detail": "Invalid token."}Headers
Section titled “Headers”Authentication scheme, Bearer.
Example
BearerNo access token was sent, or the credentials are not allowed to call this
endpoint. If the company’s COMMITLY edition does not include the requested
function, the body additionally contains
"code": "billing_plan_permission_denied".
object
Error message.
Present only if the company’s edition does not include the function; value billing_plan_permission_denied.
Example
{ "detail": "User must be authenticated to access this resource."}
