---
description: >-
  The Advisory product lets you retrieve metrics computed on end user’s banking
  data.
---

# Advisory (obsolete)

## API endpoint

{% hint style="info" %}
Authentication: endpoint in this page requires [header authentication](https://docs.powens.com/api-reference/overview/authentication) with a user token.
{% endhint %}

## Get advisory data for the user

<mark style="color:blue;">`GET`</mark> `https://{domain}.biapi.pro/2.0/users/{userId}/advisory`

Get advisory metrics computed on end user’s banking data by user ID.

#### Path Parameters

| Name                                     | Type     | Description    |
| ---------------------------------------- | -------- | -------------- |
| userId<mark style="color:red;">\*</mark> | Integer  | ID of the user |

{% tabs %}
{% tab title="200: OK User’s advisory metrics" %}
Response body: [#useradvisory-object](#useradvisory-object "mention")
{% endtab %}
{% endtabs %}

### Data model

### _UserAdvisory_ object

<table><thead><tr><th width="170">Property</th><th width="218.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id_user</code></td><td>Integer</td><td>Id of the user.</td></tr><tr><td><code>last_update</code></td><td>DateTime</td><td>DateTime of the last Advisory run.</td></tr><tr><td><code>currency</code></td><td>String</td><td><a href="https://docs.1010data.com/1010dataReferenceManual/DataTypesAndFormats/currencyUnitCodes.html">Currency codes (ISO 4217) </a>of the analyzed accounts. <code>EUR</code> only.</td></tr><tr><td><code>periods</code></td><td>Array of <a href="#period-object">Period</a> objects</td><td>List of periods.</td></tr></tbody></table>

### _Period_ object

<table><thead><tr><th width="274.3333333333333">Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>period</code></td><td>String</td><td>Month analyzed in format YYYY_MM e.g. 2023_12.</td></tr><tr><td><code>transactions_count</code></td><td>Integer</td><td>Number of transactions in the analyzed month.</td></tr><tr><td><code>id_accounts</code></td><td>Array of Integer</td><td>List of account ids.</td></tr><tr><td><code>min_date</code></td><td>Date</td><td>Date of the first analyzed transaction in the period.</td></tr><tr><td><code>max_date</code></td><td>Date</td><td>Date of the last analyzed transaction in the period.</td></tr><tr><td><code>disposable_income</code></td><td><a href="../../payments/payments#company">MonetaryAmount</a> object</td><td>Recurring revenues minus recurring expenses.</td></tr><tr><td><code>net_savings</code></td><td><a href="#monetaryamout-object">MonetaryAmount</a> object</td><td>Net balance changed relatively to last month. A positive value corresponds to an increase in balance.</td></tr><tr><td><code>events</code></td><td>Array of <a href="#event-object">Event</a> objects</td><td>List of events.</td></tr><tr><td><code>transaction_types</code></td><td>Array of <a href="#transactiontypesummary-object">TransactionTypeSummary</a> objects</td><td>List of transaction type summaries.</td></tr><tr><td><code>transaction_categories</code></td><td>Array of <a href="#transactioncateogry-values">TransactionCategory</a> objects</td><td>List of transaction categories.</td></tr></tbody></table>

### _Event_ object

<table><thead><tr><th width="154.33333333333331">Property</th><th width="225">Type</th><th>Definition</th></tr></thead><tbody><tr><td><code>count</code></td><td>Integer</td><td>Number of occurrences.</td></tr><tr><td><code>event</code></td><td><a href="#transactionevent-value">TransactionEvent</a> string</td><td>Name of the detected event.</td></tr></tbody></table>

### _TransactionTypeSummary_ object

| Property         | Type                                                                                                                               | Definition                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| `type`           | [TransactionType](https://docs.powens.com/api-reference/products/data-aggregation/bank-transactions#transactiontype-values) string | Type of transaction.                                        |
| `count`          | Integer                                                                                                                            | Number of transactions of this type in the analyzed month.  |
| `expenses_count` | Integer                                                                                                                            | Number of expenses of this type in the analyzed month.      |
| `expenses_total` | [MonetaryAmount](#monetaryamout-object) object                                                                                     | Sum of expenses of this type in the analyzed month.         |
| `incomes_count`  | Integer                                                                                                                            | Number of incomes of this type in the analyzed month.       |
| `incomes_total`  | [MonetaryAmount](#monetaryamout-object) object                                                                                     | Sum of incomes of this type in the analyzed month.          |
| `total`          | [MonetaryAmount](#monetaryamout-object) object                                                                                     | Sum of transactions of this category in the analyzed month. |

### _TransactionCategory_ object

| Property   | Type                                                      | Definition                                                     |
| ---------- | --------------------------------------------------------- | -------------------------------------------------------------- |
| `category` | [TransactionCategory](#transactioncategory-object) string | Category of the transaction.                                   |
| `count`    | Integer                                                   | Number of transactions of this category in the analyzed month. |
| `total`    | [MonetaryAmount](#monetaryamout-object) object            | Sum of transactions of this category in the analyzed month.    |

### _TransactionCateogry_ Values

<table><thead><tr><th width="305">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>revenue</code></td><td>A recurring earning, such as salaries, pensions, and rental income. Only transactions with a positive value (e.g. inflows) can be categorized as revenue.</td></tr><tr><td><code>housing</code></td><td>Housing related recurring expenses. Includes energy and utility. Excludes rental income. Only transactions with a negative value can be categorized as housing.</td></tr><tr><td><code>loans</code></td><td>Payments towards the reimbursement of a loan, consumer credit or mortgage. Only transactions with a negative value can be categorized as loans.</td></tr><tr><td><code>household</code></td><td>Child raises expenses, includes child_care and child_support. Only transactions with a negative value can be categorized as household.</td></tr></tbody></table>



{% hint style="info" %}
Forward compatibility requirement: new value related to child category may be added in the future.
{% endhint %}

### _TransactionEvent_ Value

<table><thead><tr><th width="280">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>unauthorized-overdraft</code></td><td>User's overdraft exceeds the allowed amount.</td></tr></tbody></table>

### _MonetaryAmout object_

| Property   | Type   |                                                                                                                                                               |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `currency` | String | [Currency codes (ISO 4217) ](https://docs.1010data.com/1010dataReferenceManual/DataTypesAndFormats/currencyUnitCodes.html)of the analyzed accounts. EUR only. |
| `value`    | String | Amount value. Rounded to two decimal places.                                                                                                                  |

