> ## 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.

# FIP Health

> Retrieve FIP health metrics aggregated from multiple Account Aggregators

## Overview

The FIP Health API fetches real-time health metrics for Financial Information Providers (FIPs) from multiple Account Aggregators and returns a unified, aggregated response. This API is essential for monitoring FIP performance, making informed AA routing decisions, and providing transparency to users about expected service quality.

### Key Features

* **Multi-AA Aggregation**: Collects health data from all enabled AAs in a single API call
* **Unified Response Format**: Normalizes different AA response formats into a consistent structure
* **Three-Level Filtering**: Filter by AA, FIP, and event type
* **Comprehensive Metrics**: Includes latency percentiles, success rates, and error rates

### Use Cases

* **Smart AA Routing**: Choose the optimal AA based on FIP health metrics for specific operations
* **Service Monitoring**: Track FIP availability and performance across different AAs
* **User Experience**: Display expected wait times and success rates to users before consent/data fetch operations
* **Alerting**: Set up alerts for FIP degradation or outages

## Authentication

This API requires the following authentication headers with every request:

| Header           | Type   | Required | Description                                            |
| ---------------- | ------ | -------- | ------------------------------------------------------ |
| `client_id`      | string | Yes      | API key issued to your organisation for authentication |
| `client_secret`  | string | Yes      | Secret API key for secure server-side authentication   |
| `organisationId` | string | Yes      | Unique identifier assigned to your organisation        |
| `appIdentifier`  | string | Yes      | Unique identifier for your client application          |
| `Content-Type`   | string | Yes      | Must be set to `application/json`                      |

## Request Body

All request parameters are optional. An empty request body `{}` returns health data for all AAs, FIPs, and event types.

<ParamField body="aaId" type="string[]">
  Optional array of AA identifiers to filter results to specific Account Aggregators.

  **Format**: Array of alphanumeric strings (without `@` symbol)

  **Example**: `["onemoney", "anumati"]`
</ParamField>

<ParamField body="fipIds" type="string[]">
  Optional array of FIP identifiers to filter results to specific Financial Information Providers.

  **Format**: Array of FIP ID strings

  **Example**: `["HDFC-FIP", "ICICI-FIP"]`
</ParamField>

<ParamField body="eventTypes" type="string[]">
  Optional array of event types to filter results to specific operations.

  **Valid Values**:

  * `DISCOVERY` - Account discovery operations
  * `LINKING-INIT` - Account linking initialization
  * `LINKING-OTP` - Account linking OTP verification
  * `CONSENT` - Consent creation/approval
  * `FI-REQUEST` - Financial Information request initiation
  * `FI-FETCH` - Financial Information data fetch
  * `FI-NOTIFICATION` - FI notification callbacks
  * `DELINKING` - Account delinking operations

  **Example**: `["DISCOVERY", "CONSENT", "FI-FETCH"]`
</ParamField>

## Response

### Success Response

<ResponseField name="ver" type="string">
  API version number.

  **Example**: `"1.0.0"`
</ResponseField>

<ResponseField name="status" type="string">
  Request status.

  **Value**: `"success"`
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp of when the response was generated.

  **Example**: `"2025-11-25T10:30:00.000Z"`
</ResponseField>

<ResponseField name="data" type="array">
  Array of FIP health entries, grouped by FIP and event type.
</ResponseField>

<ResponseField name="data[].fipId" type="string">
  FIP identifier.

  **Example**: `"HDFC-FIP"`
</ResponseField>

<ResponseField name="data[].eventType" type="string">
  Type of operation this metric applies to.

  **Example**: `"DISCOVERY"`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics" type="array">
  Array of metrics from each AA for this FIP and event type combination.
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].aaId" type="string">
  Account Aggregator identifier.

  **Example**: `"onemoney"`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].refreshRateInSec" type="number">
  How frequently this AA refreshes its health metrics, in seconds.

  **Example**: `600` (10 minutes)
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].supported" type="boolean">
  Whether this AA supports interactions with this FIP.

  **Example**: `true`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].latencyP50" type="number | null">
  50th percentile (median) latency in milliseconds.

  **Example**: `650`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].latencyP90" type="number | null">
  90th percentile latency in milliseconds.

  **Example**: `720`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].latencyP95" type="number | null">
  95th percentile latency in milliseconds.

  **Example**: `740`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].latencyP99" type="number | null">
  99th percentile latency in milliseconds.

  **Example**: `800`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].latencyAvg" type="number | null">
  Average latency in milliseconds.

  **Example**: `680`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].latencyMax" type="number | null">
  Maximum observed latency in milliseconds.

  **Example**: `900`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].successRate" type="number | null">
  Percentage of successful operations.

  **Example**: `98.5`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].timeoutRate" type="number | null">
  Percentage of operations that timed out.

  **Example**: `0.5`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].accNotFoundRate" type="number | null">
  Percentage of operations where account was not found.

  **Example**: `0.8`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].serverErrorRate" type="number | null">
  Percentage of operations that resulted in server errors.

  **Example**: `0.1`
</ResponseField>

<ResponseField name="data[].aaWiseMetrics[].clientErrorRate" type="number | null">
  Percentage of operations that resulted in client errors.

  **Example**: `0.1`
</ResponseField>

## Example Requests

### Get All Health Data

Retrieve health metrics for all AAs, FIPs, and event types:

```json theme={null}
{}
```

### Filter by AA

Get health data only from specific Account Aggregators:

```json theme={null}
{
  "aaId": ["onemoney", "anumati"]
}
```

### Filter by FIP

Get health data for specific Financial Information Providers:

```json theme={null}
{
  "fipIds": ["HDFC-FIP", "ICICI-FIP"]
}
```

### Filter by Event Type

Get health data for specific operations:

```json theme={null}
{
  "eventTypes": ["DISCOVERY", "CONSENT"]
}
```

### Combined Filters

Apply multiple filters together:

```json theme={null}
{
  "aaId": ["onemoney"],
  "fipIds": ["HDFC-FIP"],
  "eventTypes": ["DISCOVERY", "FI-REQUEST"]
}
```

## Example Response

```json theme={null}
{
  "ver": "1.0.0",
  "status": "success",
  "timestamp": "2025-11-25T10:30:00.000Z",
  "data": [
    {
      "fipId": "HDFC-FIP",
      "eventType": "DISCOVERY",
      "aaWiseMetrics": [
        {
          "aaId": "onemoney",
          "refreshRateInSec": 600,
          "supported": true,
          "latencyP50": 650,
          "latencyP90": 720,
          "latencyP95": 740,
          "latencyP99": 800,
          "latencyAvg": 680,
          "latencyMax": 900,
          "successRate": 98.5,
          "timeoutRate": 0.5,
          "accNotFoundRate": 0.8,
          "serverErrorRate": 0.1,
          "clientErrorRate": 0.1
        },
        {
          "aaId": "finvu",
          "refreshRateInSec": 60,
          "supported": true,
          "latencyP50": 450,
          "latencyP90": 520,
          "latencyP95": 550,
          "latencyP99": 600,
          "latencyAvg": 480,
          "latencyMax": 750,
          "successRate": 99.2,
          "timeoutRate": 0.3,
          "accNotFoundRate": 0.4,
          "serverErrorRate": 0.05,
          "clientErrorRate": 0.05
        }
      ]
    },
    {
      "fipId": "HDFC-FIP",
      "eventType": "FI-FETCH",
      "aaWiseMetrics": [
        {
          "aaId": "onemoney",
          "refreshRateInSec": 600,
          "supported": true,
          "latencyP50": 2500,
          "latencyP90": 3200,
          "latencyP95": 3800,
          "latencyP99": 4500,
          "latencyAvg": 2800,
          "latencyMax": 5000,
          "successRate": 95.0,
          "timeoutRate": 2.0,
          "accNotFoundRate": 1.5,
          "serverErrorRate": 1.0,
          "clientErrorRate": 0.5
        }
      ]
    }
  ]
}
```

## Event Types Explained

| Event Type        | Description                                        | Typical Use                                      |
| ----------------- | -------------------------------------------------- | ------------------------------------------------ |
| `DISCOVERY`       | Account discovery - finding user accounts at a FIP | Initial consent flow, showing available accounts |
| `LINKING-INIT`    | Starting the account linking process               | One-time account setup                           |
| `LINKING-OTP`     | OTP verification during account linking            | Account verification                             |
| `CONSENT`         | Consent creation and approval                      | Core consent workflow                            |
| `FI-REQUEST`      | Initiating a financial information request         | Data pull initiation                             |
| `FI-FETCH`        | Fetching the actual financial data                 | Data retrieval                                   |
| `FI-NOTIFICATION` | Receiving notifications from FIP                   | Async data availability                          |
| `DELINKING`       | Removing linked accounts                           | Account management                               |

## Use Cases

### Smart AA Routing

Select the best AA based on health metrics for a specific FIP:

```javascript theme={null}
async function selectBestAA(fipId, eventType) {
  const response = await getFipHealth({
    fipIds: [fipId],
    eventTypes: [eventType]
  });

  const fipData = response.data.find(d =>
    d.fipId === fipId && d.eventType === eventType
  );

  if (!fipData || fipData.aaWiseMetrics.length === 0) {
    return null; // No data available
  }

  // Find AA with highest success rate among supported ones
  const bestAA = fipData.aaWiseMetrics
    .filter(m => m.supported && m.successRate !== null)
    .sort((a, b) => b.successRate - a.successRate)[0];

  return bestAA?.aaId;
}
```

### Performance Monitoring Dashboard

Display FIP health status for monitoring:

```javascript theme={null}
function categorizeFipHealth(metrics) {
  if (!metrics.supported) return 'unsupported';
  if (metrics.successRate >= 98) return 'healthy';
  if (metrics.successRate >= 90) return 'degraded';
  return 'critical';
}

async function buildHealthDashboard() {
  const response = await getFipHealth({});

  const dashboard = response.data.map(entry => ({
    fipId: entry.fipId,
    eventType: entry.eventType,
    aaStatus: entry.aaWiseMetrics.map(m => ({
      aaId: m.aaId,
      status: categorizeFipHealth(m),
      successRate: m.successRate,
      avgLatency: m.latencyAvg
    }))
  }));

  return dashboard;
}
```

### User Experience Enhancement

Show expected wait times before operations:

```javascript theme={null}
async function getExpectedLatency(fipId, aaId, eventType) {
  const response = await getFipHealth({
    fipIds: [fipId],
    aaId: [aaId],
    eventTypes: [eventType]
  });

  const metrics = response.data[0]?.aaWiseMetrics[0];

  if (!metrics) {
    return { available: false };
  }

  return {
    available: true,
    expectedLatencyMs: metrics.latencyP90, // Use P90 for conservative estimate
    successRate: metrics.successRate,
    lastUpdated: response.timestamp
  };
}

// Display to user
const latencyInfo = await getExpectedLatency('HDFC-FIP', 'onemoney', 'FI-FETCH');
if (latencyInfo.available) {
  console.log(`Expected wait time: ~${Math.ceil(latencyInfo.expectedLatencyMs / 1000)} seconds`);
  console.log(`Success rate: ${latencyInfo.successRate}%`);
}
```

## Usage Notes

### Understanding Metrics

* **Latency Percentiles**: P50 represents median experience, P99 represents worst-case experience for 1% of requests
* **Success Rate**: Percentage of requests that completed successfully (not timed out, not errored)
* **Null Values**: Metrics may be `null` if insufficient data is available from an AA

### Refresh Rates

Different AAs update their health metrics at different intervals:

| AA       | Typical Refresh Rate |
| -------- | -------------------- |
| OneMoney | 10 minutes (600s)    |
| Finvu    | 1 minute (60s)       |
| Anumati  | 10 minutes (600s)    |

The `refreshRateInSec` field indicates how frequently data is updated for each AA.

### Filtering Behavior

* **aaId filter**: Applied during AA request phase - only queries specified AAs
* **fipIds filter**: Applied post-aggregation - filters merged results by FIP
* **eventTypes filter**: Applied post-aggregation - filters merged results by event type

Note: Some AAs may return data for all FIPs regardless of filters. FinPro applies additional filtering to ensure consistent results.

### Best Practices

1. **Cache Results**: Health metrics don't change rapidly. Cache results based on the smallest `refreshRateInSec` value in the response
2. **Use Appropriate Percentiles**: Use P50 for typical experience, P90/P95 for SLA monitoring, P99 for worst-case planning
3. **Monitor Trends**: Compare current metrics with historical values to detect degradation
4. **Handle Missing Data**: Always check for `null` values before using metrics in calculations
5. **Combine with Profile Check**: Use FIP Health data together with Profile Check to make optimal AA routing decisions

## Rate Limiting

This API is subject to rate limiting:

| Metric    | Value                                      |
| --------- | ------------------------------------------ |
| Limit     | 1000 requests per time window              |
| Remaining | Returned in `X-RateLimit-Remaining` header |
| Reset     | Returned in `X-RateLimit-Reset` header     |

Given the caching potential of this API, you should rarely need to call it more than once per minute.

## Related APIs

* [AA List](/api-reference/misc/aa-list) - Get the list of integrated Account Aggregators
* [FIP List](/api-reference/misc/fip-list) - Get the list of Financial Information Providers
* [Check Profile](/api-reference/user/check-profile) - Check user registration status across AAs
* [Consent Request V4](/api-reference/consent/request-v4) - Create consent requests with optimal AA selection


## OpenAPI

````yaml POST /fiphealth
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:
  /fiphealth:
    post:
      tags:
        - Miscellaneous
      summary: FIP Health
      description: >-
        Retrieve FIP health metrics aggregated from multiple Account
        Aggregators. This API fetches real-time health metrics for Financial
        Information Providers (FIPs) from multiple AAs and returns a unified,
        aggregated response. Essential for monitoring FIP performance, making
        informed AA routing decisions, and providing transparency to users about
        expected service quality.
      operationId: getFipHealth
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FipHealthRequest'
            examples:
              getAllHealth:
                summary: Get all health data
                description: Retrieve health metrics for all AAs, FIPs, and event types
                value: {}
              filterByAA:
                summary: Filter by AA
                description: Get health data only from specific Account Aggregators
                value:
                  aaId:
                    - onemoney
                    - anumati
              filterByFIP:
                summary: Filter by FIP
                description: Get health data for specific Financial Information Providers
                value:
                  fipIds:
                    - HDFC-FIP
                    - ICICI-FIP
              filterByEventType:
                summary: Filter by event type
                description: Get health data for specific operations
                value:
                  eventTypes:
                    - DISCOVERY
                    - CONSENT
              combinedFilters:
                summary: Combined filters
                description: Apply multiple filters together
                value:
                  aaId:
                    - onemoney
                  fipIds:
                    - HDFC-FIP
                  eventTypes:
                    - DISCOVERY
                    - FI-REQUEST
      responses:
        '200':
          description: FIP health metrics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FipHealthResponse'
              example:
                ver: 1.0.0
                status: success
                timestamp: '2025-11-25T10:30:00.000Z'
                data:
                  - fipId: HDFC-FIP
                    eventType: DISCOVERY
                    aaWiseMetrics:
                      - aaId: onemoney
                        refreshRateInSec: 600
                        supported: true
                        latencyP50: 650
                        latencyP90: 720
                        latencyP95: 740
                        latencyP99: 800
                        latencyAvg: 680
                        latencyMax: 900
                        successRate: 98.5
                        timeoutRate: 0.5
                        accNotFoundRate: 0.8
                        serverErrorRate: 0.1
                        clientErrorRate: 0.1
                      - aaId: finvu
                        refreshRateInSec: 60
                        supported: true
                        latencyP50: 450
                        latencyP90: 520
                        latencyP95: 550
                        latencyP99: 600
                        latencyAvg: 480
                        latencyMax: 750
                        successRate: 99.2
                        timeoutRate: 0.3
                        accNotFoundRate: 0.4
                        serverErrorRate: 0.05
                        clientErrorRate: 0.05
                  - fipId: HDFC-FIP
                    eventType: FI-FETCH
                    aaWiseMetrics:
                      - aaId: onemoney
                        refreshRateInSec: 600
                        supported: true
                        latencyP50: 2500
                        latencyP90: 3200
                        latencyP95: 3800
                        latencyP99: 4500
                        latencyAvg: 2800
                        latencyMax: 5000
                        successRate: 95
                        timeoutRate: 2
                        accNotFoundRate: 1.5
                        serverErrorRate: 1
                        clientErrorRate: 0.5
        '400':
          description: Bad Request - Invalid filter parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                ver: 1.0.0
                timestamp: '2025-11-25T10:30:00.000Z'
                errorCode: InvalidRequest
                errorMsg: Invalid event type specified
        '401':
          description: Authentication Failed - Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Too Many Requests - Rate limit exceeded (1000 requests per time
            window)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - clientId: []
          clientSecret: []
          organisationId: []
          appIdentifier: []
components:
  schemas:
    FipHealthRequest:
      type: object
      description: >-
        Request body for FIP Health API. All parameters are optional - an empty
        request body returns health data for all AAs, FIPs, and event types.
      properties:
        aaId:
          type: array
          items:
            type: string
          description: >-
            Optional array of AA identifiers to filter results to specific
            Account Aggregators. Format: Array of alphanumeric strings (without
            @ symbol).
          example:
            - onemoney
            - anumati
        fipIds:
          type: array
          items:
            type: string
          description: >-
            Optional array of FIP identifiers to filter results to specific
            Financial Information Providers.
          example:
            - HDFC-FIP
            - ICICI-FIP
        eventTypes:
          type: array
          items:
            type: string
            enum:
              - DISCOVERY
              - LINKING-INIT
              - LINKING-OTP
              - CONSENT
              - FI-REQUEST
              - FI-FETCH
              - FI-NOTIFICATION
              - DELINKING
          description: >-
            Optional array of event types to filter results to specific
            operations.
          example:
            - DISCOVERY
            - CONSENT
            - FI-FETCH
    FipHealthResponse:
      type: object
      description: >-
        Response containing FIP health metrics aggregated from multiple Account
        Aggregators.
      properties:
        ver:
          type: string
          description: API version number.
          example: 1.0.0
        status:
          type: string
          description: Request status.
          example: success
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the response was generated.
          example: '2025-11-25T10:30:00.000Z'
        data:
          type: array
          description: Array of FIP health entries, grouped by FIP and event type.
          items:
            $ref: '#/components/schemas/FipHealthEntry'
    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)
    FipHealthEntry:
      type: object
      description: Health metrics for a specific FIP and event type combination.
      properties:
        fipId:
          type: string
          description: FIP identifier.
          example: HDFC-FIP
        eventType:
          type: string
          description: Type of operation this metric applies to.
          enum:
            - DISCOVERY
            - LINKING-INIT
            - LINKING-OTP
            - CONSENT
            - FI-REQUEST
            - FI-FETCH
            - FI-NOTIFICATION
            - DELINKING
          example: DISCOVERY
        aaWiseMetrics:
          type: array
          description: >-
            Array of metrics from each AA for this FIP and event type
            combination.
          items:
            $ref: '#/components/schemas/AAWiseMetrics'
    AAWiseMetrics:
      type: object
      description: Health metrics from a specific Account Aggregator for a FIP.
      properties:
        aaId:
          type: string
          description: Account Aggregator identifier.
          example: onemoney
        refreshRateInSec:
          type: number
          description: How frequently this AA refreshes its health metrics, in seconds.
          example: 600
        supported:
          type: boolean
          description: Whether this AA supports interactions with this FIP.
          example: true
        latencyP50:
          type: number
          nullable: true
          description: 50th percentile (median) latency in milliseconds.
          example: 650
        latencyP90:
          type: number
          nullable: true
          description: 90th percentile latency in milliseconds.
          example: 720
        latencyP95:
          type: number
          nullable: true
          description: 95th percentile latency in milliseconds.
          example: 740
        latencyP99:
          type: number
          nullable: true
          description: 99th percentile latency in milliseconds.
          example: 800
        latencyAvg:
          type: number
          nullable: true
          description: Average latency in milliseconds.
          example: 680
        latencyMax:
          type: number
          nullable: true
          description: Maximum observed latency in milliseconds.
          example: 900
        successRate:
          type: number
          nullable: true
          description: Percentage of successful operations.
          example: 98.5
        timeoutRate:
          type: number
          nullable: true
          description: Percentage of operations that timed out.
          example: 0.5
        accNotFoundRate:
          type: number
          nullable: true
          description: Percentage of operations where account was not found.
          example: 0.8
        serverErrorRate:
          type: number
          nullable: true
          description: Percentage of operations that resulted in server errors.
          example: 0.1
        clientErrorRate:
          type: number
          nullable: true
          description: Percentage of operations that resulted in client errors.
          example: 0.1
  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

````