Retrieve transactions

Retrieve transactions

Using the previously generated user-access-token in step 3 and public_access_token in step 1, We can now retrieve all transactions for a user from all his financial institution account under the login used with the brick widget.

curl --request GET \
     --url 'https://sandbox.onebrick.io/v2/data/transaction/list?from=15-1-2020'&to='20-03-2020' \
     --header 'Accept: application/json' \
     --header 'public_access_token: public_access_token' \
     --header 'user-access-token: user_access_token'

Where [user-access-token] is the access token generated after a successful financial institution connection through the widget which needs to be passed as the headers.

This API is Async API, So once you send the request you will receive the acceptance response synchronously and then will receive the data in your callback URL asynchronously. If you haven't set the callback URL till now, Feel free to set it from here.

The API responds with rich transaction data of all the accounts associated with the user under his login.

{
  "status": 202,
  "data": {
    "job_id": "KVWJUrwQ78333309",
    "message": "We are processing your request and will send the data in the callback URL."
  },
  "metadata": {
    "source": {{API/Widget/Dashboard/SDK/Portal}},
    "entity": "Data"
  },
  "error": null
}
{
  "data": {
    "method": "GET",
    "api": "/v2/data/transaction/list",
    "job_id": "PRwR0rlr03400817",
    "message": "We are able to fetch transactions for you",
    "count": "5",
    "last_updated_at": 1662103406871,
    "session": "valid",
    "transaction_list": [
      {
        "id": 0,
        "account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
        "account_number": "8831355336",
        "account_currency": "IDR",
        "institution_id": 2,
        "merchant_id": 0,
        "outlet_outlet_id": 0,
        "location_city_id": 0,
        "location_country_id": 0,
        "date": "2022-08-12",
        "amount": 10001,
        "description": "TRSF E-BANKING CR 1208/FTSCY/WS95051 10001.00 BRICK TEKNOLOGI IN",
        "status": "CONFIRMED",
        "direction": "in",
        "reference_id": "XH3c7dtoskIqAmEbwHAM7Q==-20220812-1",
        "transaction_type": "Savings",
        "category": {
          "category_id": 5,
          "category_name": "transfer-in ",
          "classification_group_id": 26,
          "classification_group": "account transfer-in",
          "classification_subgroup_id": 92,
          "classification_subgroup": "others account transfer-in"
        }
      },
      {
        "id": 0,
        "account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
        "account_number": "8831355336",
        "account_currency": "IDR",
        "institution_id": 2,
        "merchant_id": 0,
        "outlet_outlet_id": 0,
        "location_city_id": 0,
        "location_country_id": 0,
        "date": "2022-08-12",
        "amount": 10002,
        "description": "TRSF E-BANKING CR 1208/FTSCY/WS95051 10002.00 BRICK TEKNOLOGI IN",
        "status": "CONFIRMED",
        "direction": "in",
        "reference_id": "XH3c7dtoskIqAmEbwHAM7Q==-20220812-2",
        "transaction_type": "Savings",
        "category": {
          "category_id": 5,
          "category_name": "transfer-in ",
          "classification_group_id": 26,
          "classification_group": "account transfer-in",
          "classification_subgroup_id": 92,
          "classification_subgroup": "others account transfer-in"
        }
      },
      {
        "id": 0,
        "account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
        "account_number": "8831355336",
        "account_currency": "IDR",
        "institution_id": 2,
        "merchant_id": 0,
        "outlet_outlet_id": 0,
        "location_city_id": 0,
        "location_country_id": 0,
        "date": "2022-08-12",
        "amount": 10000,
        "description": "TRSF E-BANKING CR 1208/FTSCY/WS95051 10000.00 BRICK TEKNOLOGI IN",
        "status": "CONFIRMED",
        "direction": "in",
        "reference_id": "XH3c7dtoskIqAmEbwHAM7Q==-20220812-3",
        "transaction_type": "Savings",
        "category": {
          "category_id": 5,
          "category_name": "transfer-in ",
          "classification_group_id": 26,
          "classification_group": "account transfer-in",
          "classification_subgroup_id": 92,
          "classification_subgroup": "others account transfer-in"
        }
      },
      {
        "id": 0,
        "account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
        "account_number": "8831355336",
        "account_currency": "IDR",
        "institution_id": 2,
        "merchant_id": 0,
        "outlet_outlet_id": 0,
        "location_city_id": 0,
        "location_country_id": 0,
        "date": "2022-08-12",
        "amount": 10001,
        "description": "TRSF E-BANKING CR 1208/FTSCY/WS95051 10001.00 BRICK TEKNOLOGI IN",
        "status": "CONFIRMED",
        "direction": "in",
        "reference_id": "XH3c7dtoskIqAmEbwHAM7Q==-20220812-4",
        "transaction_type": "Savings",
        "category": {
          "category_id": 5,
          "category_name": "transfer-in ",
          "classification_group_id": 26,
          "classification_group": "account transfer-in",
          "classification_subgroup_id": 92,
          "classification_subgroup": "others account transfer-in"
        }
      },
      {
        "id": 0,
        "account_id": "XH3c7dtoskIqAmEbwHAM7Q==",
        "account_number": "8831355336",
        "account_currency": "IDR",
        "institution_id": 2,
        "merchant_id": 0,
        "outlet_outlet_id": 0,
        "location_city_id": 0,
        "location_country_id": 0,
        "date": "2022-08-19",
        "amount": 15000,
        "description": "BIAYA ADM",
        "status": "CONFIRMED",
        "direction": "out",
        "reference_id": "XH3c7dtoskIqAmEbwHAM7Q==-20220819-1",
        "transaction_type": "Savings",
        "category": {
          "category_id": 4,
          "category_name": "payment",
          "classification_group_id": 21,
          "classification_group": "fee & tax",
          "classification_subgroup_id": 63,
          "classification_subgroup": "admin fee"
        }
      }
    ]
  },
  "metadata": {
    "entity": "Data",
    "source": "API"
  },
  "error": null,
  "status": 200
}