> For the complete documentation index, see [llms.txt](https://docs.powens.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powens.com/api-reference/products/data-aggregation/advisory-obsolete.md).

# Advisory (obsolete)

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

## 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="/api-reference/products/payments/payments.md#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.                                                                                                                  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.powens.com/api-reference/products/data-aggregation/advisory-obsolete.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
