---
title: User-level report
slug: connect/vDAe-user-level-report
docTags: 
createdAt: 2023-11-28T16:43:08.802Z
---

:::ApiMethodV2
```json
{
  "name": "user-data",
  "method": "POST",
  "url": "https://api-sandbox.klavi.ai/data/v1/personal/user-data",
  "description": "Get user level data by end-user's taxId.\nThis endpoint is a notification API. After the end user completes authorization on the bank side, the Klavi backend will return the user's authorization information through webhook. Then, partners can send the data products required by the partners based on the authorization information through this notification endpoint.\nWhen Klavi receives this request from partner, Klavi backend immediately retrieves the data through open finance and processes it into specific data products, which is then sent to the partner through webhook.\nProducts may be requested by different applications, disregarding the original application to which the user gave consent.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "xjR7WyIiQrxJBzO_jTlAC",
        "language": "curl",
        "code": "curl --location 'https://api-sandbox.klavi.ai/data/v1/personal/user-data' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\"taxId\":\"string\",\"linkId\":\"string\",\"consentIds\":[\"Array\"],\"products\":[\"Array\"],\"productsCallbackURL\":\"string\",\"externalInfo\":\"Object\"}'",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "xjR7WyIiQrxJBzO_jTlAC"
  },
  "results": {
    "languages": [
      {
        "id": "PzUg6EX_zKaDhcxPvoRYd",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"requestId\": \"xxxsssaa\",\n    \"message\": \"ok\"\n}"
      }
    ],
    "selectedLanguageId": "PzUg6EX_zKaDhcxPvoRYd"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "Bearer access token, it returned by the /auth",
        "children": []
      }
    ],
    "bodyDataParameters": [
      {
        "name": "taxId",
        "kind": "required",
        "type": "string",
        "description": "The CPF of the end-user, for Personal Accounts only",
        "children": []
      },
      {
        "name": "linkId",
        "kind": "optional",
        "type": "string",
        "description": "linkid, it returned by the /links",
        "children": []
      },
      {
        "name": "consentIds",
        "kind": "optional",
        "type": "Array",
        "description": "consentId list, it returned by the /consents",
        "children": []
      },
      {
        "name": "products",
        "kind": "required",
        "type": "Array",
        "description": "Product list"
      },
      {
        "name": "productsCallbackURL",
        "kind": "optional",
        "type": "string",
        "description": "Report product callback URL,\nPriority highest",
        "children": []
      },
      {
        "name": "externalInfo",
        "kind": "optional",
        "type": "Object",
        "description": "Used for partner to transmit information, which will be carried in reports sent to partner",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "user-data",
  "legacyHash": "Nn45WihE1EjpqE2blHmVX"
}
```
:::

## Parameter

### products

- `all`: All [user level products](docId\:xkr8lrggFj7YFng1vaYdD) selected by partners during onboarding;
- product list: One or more [user level products](docId\:xkr8lrggFj7YFng1vaYdD)(can only be products within the product range selected by the partner during onboarding).

### productsCallbackURL

With this parameter, you can submit specific or all reports generated sending addresses to Klavi backend.

**1.Specific reports example**

```json
{
    "productsCallbackURL":{
        "pf_checking_account":"https://www.yourdomain.com/checking/yourpath",
        "pf_credit_card":"https://www.yourdomain.com/creditcard/yourpath"
    }
}
```

After the report is generated, the Klavi backend will send the report `pf_checking_account` to  `https://www.yourdomain.com/checking/yourendpoint` and send the report `pf_credit_card` to `https://www.yourdomain.com/creditcard/yourpath`.

**2.Specific and other reports example**

```json
{
    "productsCallbackURL":{
        "pf_checking_account":"https://www.yourdomain.com/checking/yourpath",
        "other":"https://www.yourdomain.com/yourpath"
    }
}
```

In this case, the Klavi backend will send the report `pf_checking_account` to  `https://www.yourdomain.com/checking/yourendpoint` and send the other report to `https://www.yourdomain.com/yourpath`.

**3.All reports example**

```json
{
    "productsCallbackURL":{
        "all":"https://www.yourdomain.com/yourpath"
    }
}
```

After the report is generated, the Klavi backend will send all reports(You selected it when you onborading) to `https://www.yourdomain.com/yourpath`.

:::hint{type="info"}
Please note that:

The parameter `all` is mutually exclusive with the parameters `other` and specific and cannot exist simultaneously. If it exists, the system will return an error.
:::

:::hint{type="info"}
**Report generation logic**

The Klavi backend will determine the data range for generating reports based on the parameters you submit.

- `taxId`: If you only submit this parameter, the Klavi backend system will aggregate all consents data ranges of all links around the `taxId` for report calculation and generation.
- `linkId`: If you submit this parameter and `taxId`(Required),  the Klavi backend system will aggregate this `linkId` data ranges of `taxId` for report calculation and generation.
- `consentId`: If you submit this parameter and `taxId`(Required), the Klavi backend system will aggregate this `consentId` data ranges of the `taxId` for report calculation and generation.
:::

### externalInfo

You can submit any content you want with this parameter, and Klavi will temporarily save it. After the report is generated, it will be returned to you in the externalInfo data node of the report.

For example:

```json
{
    "externalInfo":{
        "myTraceId":"yourtraceid",
        "myUUID":"youruuid"
    }
}
```

