List transactions
const url = 'https://app.commitly.com/api/transactions/?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/?type=incomes&page_size=100' \ --header 'Authorization: Bearer <token>'Returns the transactions of all bank accounts of the company. Default order:
newest value date first (-value_date,id).
This endpoint returns no sum, whatever the filters. For the sum of all
matching transactions, use GET /transactions/extended/ with the same
parameters.
predicted_unmapped_transactions is deprecated and will be removed. It is a
company-wide flag and does not depend on the filters of the request: it is
true if at least one uncategorized transaction with a non-zero amount has a
suggested category waiting for review.
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.
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.
Example
{ "count": 122, "next": "https://app.commitly.com/api/transactions/?category=1003&page=2", "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 }, { "id": 7003, "account": { "id": 4002, "name": "Checking account", "alias": "Main" }, "category": { "id": 1004, "name": "Uncategorized outflows", "description": "" }, "predicted_category": { "id": 1003, "name": "Rent and leases", "slug": "", "description": "", "type": "EX", "order": 11, "date_created": "2020-10-30T10:04:03.952090Z", "is_default": false, "is_obsolete": false, "lft": 104, "rght": 105, "tree_id": 156, "level": 5, "tenant": 19, "company": 1423, "parent": 1005, "source": 129 }, "invoice": null, "parent": null, "value_date": "2023-12-26", "value_time": null, "bank_booking_date": "2023-12-26", "amount": -99.99, "reporting_amount": -99.99, "purpose": "Invoice 5/12346", "counterpart_name": "Example Hosting AG", "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."}
