> ## Documentation Index
> Fetch the complete documentation index at: https://developer.moneyone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics JSON

> Retrieve analytics data in JSON format for a completed consent journey.

## Overview

The Analytics JSON API allows you to retrieve analytics and insights data in JSON format for a specific consent journey. This API provides processed analytical data based on the financial information collected through the Account Aggregator framework.

### Key Use Cases

* **Journey Analytics**: Retrieve analytics data associated with a specific consent journey.
* **Consent-Level Insights**: Get analytical insights tied to a particular consent ID.
* **JSON Format**: Receive structured analytics data in JSON format for easy integration.

### Important Notes

* The consent journey must be completed before calling this API.
* Both `consentID` and `journeyID` are required to identify the specific analytics dataset.

## Authentication

This API requires authentication using the following headers:

<ParamField header="client_id" type="string" required>
  Your unique client identifier provided by FinPro during onboarding. This ID is used to authenticate your application.
</ParamField>

<ParamField header="client_secret" type="string" required>
  Your confidential client secret key provided by FinPro. This must be kept secure and never exposed in client-side code.
</ParamField>

<ParamField header="appIdentifier" type="string" required>
  The unique identifier for your application (e.g., your application's package name or bundle ID). This helps FinPro identify which application is making the request.
</ParamField>

<ParamField header="organisationId" type="string" required>
  Your organization's unique identifier assigned by FinPro. This identifies your organization in the FinPro system.
</ParamField>

<ParamField header="content-Type" type="string" required>
  Must be set to `application/json` to indicate that the request body contains JSON data and that the response will be in JSON format.
</ParamField>

## Request Body

<ParamField body="consentID" type="string" required>
  The unique consent identifier provided by the Account Aggregator after consent approval. This must be a valid consent ID.
</ParamField>

<ParamField body="journeyID" type="string" required>
  The unique journey identifier associated with the consent flow. This identifies the specific journey for which analytics data is requested.
</ParamField>

### Request Example

```json theme={null}
{
  "consentID": "84001bb6-b1d0-4443-aeff-dd482255a058",
  "journeyID": "journey-12345-abcde"
}
```

## Response

### Success Response Example

The response contains comprehensive banking analytics data. Below is a trimmed example showing the key structure — the actual response includes many more categories and analysis sections.

```json theme={null}
{
  "ver": "1.21.0",
  "status": "success",
  "data": {
    "status": "SUCCESS",
    "message": "Success",
    "status_code": "success",
    "transaction_id": "4aeb3514-ca16-4bfe-9233-ec165292b6c2",
    "journey_transaction_id": "EQ.GT.7af207ef-5b08-484e-a63f-045777ee322f#orchestration_complete_analytics_json_v1#363efd17e49b47f29847ba08c5413bd7",
    "journey_id": "orchestration_complete_analytics_json_v1",
    "data": {
      "bankingAnalysis": {
        "overallAnalysis": {
          "totalNetDebitTransactionAmount": 30175.44,
          "totalNetCreditTransactionAmount": 21918.66,
          "averageBalanceLast3Months": 43634.46,
          "maximumBalance": 11046.26,
          "minimumEodBalance": 39366.54,
          "volatilityOfBalance": 0.13,
          "monthlyAvgNetCreditAmount": 3131.24,
          "totalOutwardUpiAmount": 29698.38,
          "totalLoanCreditAmount": 0,
          "totalCashDepositAmount": 0,
          "totalEmiTxns": 0,
          "bankPenaltiesDetected": false,
          "weeklyAnalytics": [
            {
              "week": 4,
              "year": 2025,
              "month": 8,
              "totalCreditAmount": 116.64,
              "totalDebitAmount": 0,
              "totalCreditTxn": 6,
              "totalDebitTxn": 0,
              "avgBalance": 52064.52,
              "closingBalance": 52161.72,
              "surplusAmount": 116.64
            }
          ]
        },
        "completeCategoryWiseAnalysis": {
          "overallCategoryWiseAnalysis": {
            "Transfer in": {
              "categoryCode": "TRANSFER_IN",
              "totalTransactions": 60,
              "totalCreditAmount": 21918.66,
              "totalDebitAmount": 0,
              "avgCreditAmount": 365.31,
              "avgMonthlyCredit": 3131.24,
              "last6MonthAvgCreditAmount": 3131.24,
              "volatilityCredit": 1.04,
              "maximumCreditAmount": 979.46,
              "minimumCreditAmount": 6.28
            },
            "Transfer out": {
              "categoryCode": "TRANSFER_OUT",
              "totalTransactions": 4,
              "totalCreditAmount": 0,
              "totalDebitAmount": 477.06,
              "avgDebitAmount": 119.27,
              "avgMonthlyDebit": 68.15,
              "last6MonthAvgDebitAmount": 68.15,
              "volatilityDebit": 2.25,
              "maximumDebitAmount": 400,
              "minimumDebitAmount": 2.36
            }
          },
          "monthlyCategoryWiseAnalysis": {
            "Transfer in": [
              {
                "month": 9,
                "year": 2025,
                "totalCreditAmount": 2653.72,
                "totalDebitAmount": 0,
                "totalCreditTxn": 10,
                "totalDebitTxn": 0
              }
            ]
          }
        },
        "accountProfiles": [
          {
            "summary": {
              "Status": "ACTIVE",
              "CurrentBalance": 7272.41,
              "AccountType": "SAVINGS",
              "Currency": "INR",
              "ifsc": "FNSB0004920",
              "branch": "Jayanagar 4th Block",
              "openingDate": "2017-10-23",
              "accountVintageInMonths": 102,
              "transactionStartDate": "2025-08-23",
              "transactionEndDate": "2026-02-23"
            },
            "holders": {
              "holder": {
                "name": "John Doe",
                "dob": "1990-01-01",
                "pan": "ABCDE1234F",
                "mobile": "9876543210",
                "email": "john.doe@example.com"
              }
            }
          }
        ],
        "fcuIndicators": { },
        "bounceAnalysis": { },
        "accountWiseAnalysis": { },
        "investmentAnalysis": { },
        "loanCreditsAnalysis": { },
        "counterPartyAnalysis": { },
        "nudges": { },
        "abbTables": { },
        "top5FundTransfer": { },
        "frequentCredits": { },
        "frequentDebits": { },
        "paymentTypeAnalytics": { }
      },
      "rawData": { }
    }
  }
}
```

<Note>
  The actual response is significantly larger and includes detailed breakdowns across 50+ transaction categories, account-wise analysis, monthly trends, EMI analytics, fraud/FCU indicators, and more. The example above is trimmed to illustrate the key structure.
</Note>

### Response Structure

| Field                                                    | Type   | Description                                                                              |
| -------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| `ver`                                                    | string | API version                                                                              |
| `status`                                                 | string | Overall response status (`success` or `failure`)                                         |
| `data.status`                                            | string | Processing status (`SUCCESS`)                                                            |
| `data.transaction_id`                                    | string | Unique transaction identifier                                                            |
| `data.journey_id`                                        | string | Journey identifier used for the analytics                                                |
| `data.data.bankingAnalysis`                              | object | Contains all banking analytics sections                                                  |
| `data.data.bankingAnalysis.overallAnalysis`              | object | Aggregate metrics — balances, credit/debit totals, volatility, weekly analytics          |
| `data.data.bankingAnalysis.completeCategoryWiseAnalysis` | object | Transaction analysis broken down by 50+ categories (e.g., Transfer in, UPI, Salary, EMI) |
| `data.data.bankingAnalysis.accountProfiles`              | array  | Account holder details, balances, and account metadata                                   |
| `data.data.bankingAnalysis.fcuIndicators`                | object | Fraud and risk indicators                                                                |
| `data.data.bankingAnalysis.bounceAnalysis`               | object | Cheque and ECS bounce analysis                                                           |
| `data.data.bankingAnalysis.investmentAnalysis`           | object | Investment-related transaction analysis                                                  |
| `data.data.bankingAnalysis.loanCreditsAnalysis`          | object | Loan credit transaction analysis                                                         |
| `data.data.bankingAnalysis.nudges`                       | object | Behavioural insights and nudges                                                          |
| `data.data.bankingAnalysis.abbTables`                    | object | Average bank balance tables                                                              |
| `data.data.rawData`                                      | object | Raw financial data used to generate the analytics                                        |

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request POST '{{Base_URL}}/analytics/json' \
  --header 'client_id: {{Client_Id}}' \
  --header 'client_secret: {{Client_Secret}}' \
  --header 'organisationId: {{Organisation_Id}}' \
  --header 'appIdentifier: {{App_Identifier}}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "consentID": "84001bb6-b1d0-4443-aeff-dd482255a058",
      "journeyID": "journey-12345-abcde"
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('{{Base_URL}}/analytics/json', {
    method: 'POST',
    headers: {
      'client_id': '{{Client_Id}}',
      'client_secret': '{{Client_Secret}}',
      'organisationId': '{{Organisation_Id}}',
      'appIdentifier': '{{App_Identifier}}',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      consentID: '84001bb6-b1d0-4443-aeff-dd482255a058',
      journeyID: 'journey-12345-abcde'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "{{Base_URL}}/analytics/json"

  headers = {
      "client_id": "{{Client_Id}}",
      "client_secret": "{{Client_Secret}}",
      "organisationId": "{{Organisation_Id}}",
      "appIdentifier": "{{App_Identifier}}",
      "Content-Type": "application/json"
  }

  payload = {
      "consentID": "84001bb6-b1d0-4443-aeff-dd482255a058",
      "journeyID": "journey-12345-abcde"
  }

  response = requests.post(url, json=payload, headers=headers)
  print(response.json())
  ```
</CodeGroup>


## OpenAPI

````yaml POST /analytics/json
openapi: 3.0.3
info:
  title: FinPro API
  description: MoneyOne FinPro - Account Aggregator FIU Platform APIs
  version: 1.21.0
servers:
  - url: '{baseUrl}'
    description: FinPro API Server
    variables:
      baseUrl:
        default: https://scramblerpay-uat.moneyone.in
        description: API Base URL - change this to your environment
security:
  - clientId: []
    clientSecret: []
    organisationId: []
    appIdentifier: []
paths:
  /analytics/json:
    post:
      tags:
        - Analytics
      summary: Analytics JSON
      description: Retrieve analytics data in JSON format for a completed consent journey.
      operationId: getAnalyticsJson
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticsJsonRequest'
            example:
              consentID: 84001bb6-b1d0-4443-aeff-dd482255a058
              journeyID: journey-12345-abcde
      responses:
        '200':
          description: Analytics data retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsJsonResponse'
              example:
                ver: 1.21.0
                status: success
                data:
                  status: SUCCESS
                  message: Success
                  status_code: success
                  transaction_id: 4aeb3514-ca16-4bfe-9233-ec165292b6c2
                  journey_transaction_id: >-
                    EQ.GT.7af207ef-5b08-484e-a63f-045777ee322f#orchestration_complete_analytics_json_v1#363efd17e49b47f29847ba08c5413bd7
                  journey_id: orchestration_complete_analytics_json_v1
                  data:
                    bankingAnalysis:
                      overallAnalysis:
                        totalNetDebitTransactionAmount: 30175.44
                        totalNetCreditTransactionAmount: 21918.66
                        averageBalanceLast3Months: 43634.46
                        maximumBalance: 11046.26
                        minimumEodBalance: 39366.54
                        volatilityOfBalance: 0.13
                        monthlyAvgNetCreditAmount: 3131.24
                        totalOutwardUpiAmount: 29698.38
                        totalLoanCreditAmount: 0
                        totalCashDepositAmount: 0
                        totalEmiTxns: 0
                        bankPenaltiesDetected: false
                      completeCategoryWiseAnalysis: {}
                      accountProfiles: []
                      fcuIndicators: {}
                      bounceAnalysis: {}
                      investmentAnalysis: {}
                      loanCreditsAnalysis: {}
                      nudges: {}
                      abbTables: {}
                      paymentTypeAnalytics: {}
                    rawData: {}
        '400':
          description: Bad Request - Invalid data or validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                ver: 1.21.0
                timestamp: '2025-10-01T11:49:28.920Z'
                errorCode: InvalidRequest
                errorMsg: Invalid consent ID or journey ID
                status: FP0001
        '401':
          description: Authentication Failed - Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - clientId: []
          clientSecret: []
          organisationId: []
          appIdentifier: []
components:
  schemas:
    AnalyticsJsonRequest:
      type: object
      description: Request body for retrieving analytics data in JSON format.
      required:
        - consentID
        - journeyID
      properties:
        consentID:
          type: string
          description: >-
            The unique consent identifier provided by the Account Aggregator
            after consent approval.
          example: 84001bb6-b1d0-4443-aeff-dd482255a058
        journeyID:
          type: string
          description: The unique journey identifier associated with the consent flow.
          example: journey-12345-abcde
    AnalyticsJsonResponse:
      type: object
      description: Response containing analytics data for a consent journey.
      properties:
        ver:
          type: string
          description: API version that processed the request.
          example: 1.21.0
        status:
          type: string
          description: Overall API call status.
          example: success
        data:
          type: object
          description: Analytics response payload.
          properties:
            status:
              type: string
              description: Processing status.
              example: SUCCESS
            message:
              type: string
              description: Status message.
              example: Success
            status_code:
              type: string
              description: Status code.
              example: success
            transaction_id:
              type: string
              description: Unique transaction identifier.
              example: 4aeb3514-ca16-4bfe-9233-ec165292b6c2
            journey_transaction_id:
              type: string
              description: Journey-specific transaction identifier.
            journey_id:
              type: string
              description: Journey identifier used for the analytics.
              example: orchestration_complete_analytics_json_v1
            data:
              type: object
              description: >-
                Contains bankingAnalysis and rawData objects with detailed
                analytics.
              properties:
                bankingAnalysis:
                  type: object
                  description: >-
                    Comprehensive banking analytics including overallAnalysis,
                    categoryWiseAnalysis, accountProfiles, fcuIndicators,
                    bounceAnalysis, investmentAnalysis, loanCreditsAnalysis,
                    nudges, abbTables, and paymentTypeAnalytics.
                rawData:
                  type: object
                  description: Raw financial data used to generate the analytics.
    ErrorResponse:
      type: object
      properties:
        ver:
          type: string
          description: API version
        timestamp:
          type: string
          format: date-time
          description: When the error occurred
        errorCode:
          type: string
          description: Error category code
        errorMsg:
          type: string
          description: Detailed error message
        status:
          type: string
          description: FinPro-specific error code (FPxxxx format)
  securitySchemes:
    clientId:
      type: apiKey
      in: header
      name: client_id
      description: Your unique client identifier provided by MoneyOne during FIU onboarding
    clientSecret:
      type: apiKey
      in: header
      name: client_secret
      description: Your confidential client secret provided by MoneyOne
    organisationId:
      type: apiKey
      in: header
      name: organisationId
      description: Your organization's unique identifier in the FinPro system
    appIdentifier:
      type: apiKey
      in: header
      name: appIdentifier
      description: Application-specific identifier for tracking API calls

````