# Data

### **Aggregation**

Zūm Rails can retrieve and utilize a user's financial data for account verification (KYC) and risk assessment purposes when aggregation is enabled in your account.

{% hint style="info" %}
**Personal Information**

This section contains details about the account holder, which are primarily used for identity verification (KYC) and risk assessment. The information includes:

* **Full Name:** The first name, last name, and full name of the account holder.
* **Email Address:** The registered email associated with the account.
* **Phone Number**: A contact number linked to the account.
* **Date of Birth:** The birth date of the account holder.
* **Address Information:**
  * **Street Address (Civic Address)**: The home address of the user.
  * **City:** The city of residence.
  * **Province/State:** The province or state of residence.
  * **Country:** The country where the account holder resides.
  * **Postal Code:** The postal or ZIP code.
    {% endhint %}

{% hint style="info" %}
**Account Information**

This section provides details about the bank accounts, including account types, balances, and institution identifiers. The information includes:

* **Institution Information:**
  * **Institution ID:** A unique identifier for the financial institution.
  * **Institution Name:** The name of the bank or financial institution (e.g., Tangerine).
* **Account Details:**
  * **Account ID:** A unique identifier for each account.
  * **Institution Number:** The unique bank institution number.
  * **Transit Number:** The branch transit number where the account is held.
  * **Account Number:** The actual bank account number
  * **Title:** The name or description of the account (e.g., "Bank Chequing Account").
  * **Currency:** The currency type of the account (e.g., CAD).
  * **Balance:** The available balance in the account at the time of retrieval.
  * **Account Category:** The type of account (e.g., "Operation" for standard bank accounts).\
    Account Subcategory: More specific classifications such as "Chequing," "Savings," or "CreditCard."\ <br>
    {% endhint %}

{% hint style="info" %}
**Transaction History**

This section lists financial transactions associated with each account, detailing expenditures, deposits, and category classifications. The information includes:

* **Transaction ID**: A unique identifier for each transaction.
* **Transaction Date:** The date the transaction was processed.
* **Description:** A short description of the transaction (e.g. "UBER EATS," "TARGET STORE").
* **Transaction Amount:**
  * **Debit:** The amount deducted from the account (expenses).
  * **Credit:** Any deposit made into the account (income).
* **Balance After Transaction:** The account balance after processing the transaction.
* **Transaction Category:**
  * **Category Name:** The classification of the transaction (e.g. "Food Delivery & Restaurants", "Mortgage Payments", "Other Shopping").
  * **Insights Type:** Whether the transaction is categorized as an "Expense" or “Income”
    {% endhint %}

The sample response below shows the data that can be expected when querying account owners, account information and account transaction history:

```json
{
  "statusCode": 200,
  "message": "GET Request successful.",
  "isError": false,
  "result": {
    "RequestId": "6082136a-...-e4b5129dc9d4",
    "CustomerId": "b0db65fd-...-55a57b9a7c69",
    "Card": {
      "Id": "0f980576-..-02d090f70edf",
      "UpdatedAt": "0001-01-01T00:00:00Z",
      "CreatedAt": "0001-01-01T00:00:00Z",
      "Accounts": [
        {
          "Id": "dc8b5922-...-ac7e9f7eeed3",
          "UpdatedAt": "0001-01-01T00:00:00Z",
          "InstitutionNumber": "001",
          "TransitNumber": "12345",
          "AccountNumber": "1234567",
          "Title": "Bank Chequing Account",
          "Balance": 10.83,
          "Currency": "CAD",
          "AccountCategory": "Operation",
          "AccountSubCategory": "Chequing",
          "Transactions": [
            {
              "Id": "1a97486e-...-b5df75a75501",
              "UpdatedAt": "0001-01-01T00:00:00Z",
              "Date": "2022-06-05T00:00:00Z",
              "Description": "UBER EATS",
              "Debit": 30.0,
              "Balance": 1000.83,
              "Category": {
                  "Id": "baeda044-...-ae6ed78cf524",
                  "Name": "Food Delivery & Restaurants",
                  "InsightsType": "Expense"
              }
            }
          ]
        },
        {
          "Id": "bae5010d-...-5eb2f2517652",
          "UpdatedAt": "0001-01-01T00:00:00Z",
          "InstitutionNumber": "001",
          "TransitNumber": "12345",
          "AccountNumber": "1234567",
          "Title": "Bank Savings Account",
          "Balance": 103.17,
          "Currency": "CAD",
          "AccountCategory": "Operation",
          "AccountSubCategory": "Savings",
          "Transactions": [
            {
              "Id": "7bb694d3-...-df90dbc9d8ad",
              "UpdatedAt": "0001-01-01T00:00:00Z",
              "Date": "2022-06-03T00:00:00Z",
              "Description": "Bank Mortgage",
              "Debit": 530.12,
              "Balance": 103.17,
              "Category": {
                  "Id": "baeda044-...-ae6ed78cf524",
                  "Name": "Mortgage payments",
                  "InsightsType": "Expense"
              }
            }
          ]
        },
        {
          "Id": "4ff87b60-...-28b40cb1d935",
          "UpdatedAt": "0001-01-01T00:00:00Z",
          "InstitutionNumber": "001",
          "TransitNumber": "00152",
          "AccountNumber": "4242 xxxx  xxxx 4242",
          "Title": "Bank World Visa",
          "Balance": 3953.75,
          "Currency": "CAD",
          "AccountCategory": "Credit",
          "AccountSubCategory": "CreditCard",
          "Transactions": [
            {
              "Id": "e7523aa5-....-790bfa70ee9b",
              "UpdatedAt": "0001-01-01T00:00:00Z",
              "Date": "2022-06-04T00:00:00Z",
              "Description": "TARGET STORE",
              "Debit": 29.35,
              "Balance": 548.78,
              "Category": {
                  "Id": "baeda044-...-ae6ed78cf524",
                  "Name": "Other Shopping",
                  "InsightsType": "Expense"
              }
            }
          ]
        }
      ],
      "InstitutionId": "08cde436-e9a0-41c3-915a-7e7ebad26be8",
      "InstitutionName": "Tangerine",
      "HolderId": "634ba946-...-2815891e3439",
      "Holder": {
        "FirstName": "John Paul",
        "LastName": "Smith",
        "FullName": "John Paul Smith",
        "Email": "johnpaul@smith.com",
        "PhoneNumber": "514-123-1234",
        "DateOfBirth": "1980-01-01",
        "AddressCivic": "101 Street",
        "AddressCity": "Toronto",
        "AddressProvince": "ON",
        "AddressCountry": "CA",
        "AddressPostalCode": "A0A 0A0"
      },
      "SelectedAccountId": "dc8b5922-...-ac7e9f7eeed3"
    }
  }
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zumrails.com/data-aggregation/data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
