# Transactions

## GET Transactions

<mark style="color:green;">`POST`</mark> `https://api.finqware.com/v1/transactions/get`

Get transaction data related to a certain **credentials\_id**.

#### Request Body

| Name                                               | Type   | Description                                                      |
| -------------------------------------------------- | ------ | ---------------------------------------------------------------- |
| client\_id<mark style="color:red;">\*</mark>       | string | An identifier for your tenant app.                               |
| client\_secret<mark style="color:red;">\*</mark>   | string | A tenant app secret.                                             |
| credentials\_id<mark style="color:red;">\*</mark>  | string | A pointer to a consent record created via an onboarding session. |
| access\_token<mark style="color:red;">\*</mark>    | string | An authorization key for this particular consent record.         |
| tenant\_user\_id<mark style="color:red;">\*</mark> | string | A unique identifier for your end-user.                           |
| filter                                             | object | A filter object. Criteria in the table below.                    |

{% tabs %}
{% tab title="200: OK A list of bank account transactions and related info." %}

```javascript
[
  {
    "account_id": "91ba3b32-...-6b41bf682aa8",
    "timestamp": "2021-02-01T13:14:52Z",
    "id": "99459ac2-a7b3-11e9-b37d-bfb2bf7bff33",
    "utx_id": "Jd+ErYeFaUOWzU37k9y1+fHz/+4v/YwQ/fq8A4jbSjc=",
    
    "data": {
      "amount": "4.27",
      "balance": "9434.52",
      "booking_date_time": "2019-05-11T07:57:00Z",
      "credit_debit_indicator": "debit",
      "currency": "RON",
      "info": "Currency payment or withdrawal",
      "status": "booked",

      // future use
      "details": null,
      "exchange_rate": null
    }
  }
]
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message": "Error message"
}
```

{% endtab %}
{% endtabs %}

| Filter element           | Type          | Info                                |
| ------------------------ | ------------- | ----------------------------------- |
| account\_id              | string        | **finqware id** of the bank account |
| currency                 | string        | eg: RON                             |
| status                   | string        | eg: booked                          |
| credit\_debit\_indicator | string        | debit \| credit                     |
| category                 | string        | eg: shopping                        |
| eq                       | decimal       | amount equal to                     |
| gte                      | decimal       | amount >= than                      |
| gt                       | decimal       | amount > than                       |
| lte                      | decimal       | amount <= than                      |
| lt                       | decimal       | amount < than                       |
| booking\_date\_eq        | utc\_datetime | date equal to                       |
| booking\_date\_gte       | utc\_datetime | date later or equal to              |
| booking\_date\_gt        | utc\_datetime | later than                          |
| booking\_date\_lte       | utc\_datetime | earlier or equal to                 |
| booking\_date\_lt        | utc\_datetime | earlier than                        |
| timestamp\_eq            | utc\_datetime | timestamp equal to                  |
| timestamp\_gte           | utc\_datetime | timestamp later or equal to         |
| timestamp\_gt            | utc\_datetime | timestamp later than                |
| timestamp\_lte           | utc\_datetime | timestamp earlier or equal to       |
| timestamp\_lt            | utc\_datetime | timestamp earlier than              |

The **timestamp** represents the time the transaction was inserted in Finqware's database.

```javascript
// Filter example

"filter": {
  "account_id": "91ba3b32-...-6b41bf682aa8",
  "lt": 4.2700000000000001,
  "booking_date_gt": "2025-05-03T00:00:00Z",
  "timestamp_gte": "2025-05-11T00:00:00Z"
}
```

For each transaction Finqware calculates an unique transaction id (utx\_id) that is the same across consents.\
Make sure you always use this id in order to decide if you need to update or insert a record.\
If you already syncronised and inserted in your DB a certain transaction record and you receive it again, you can update the existing record, not insert it again.
