Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAGW: Updated error codes and FIP APIs #199

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion api-references/data/account-aggregator.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,26 @@
},
"/v2/fips": {
"get": {
"parameters": [
{
"in": "query",
"name": "status",
"required": false,
"description": "Status of the FIP by which the FIPs are to be filtered",
"schema": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"TEMPORARILY_INACTIVE"
]
}
}
],
"responses": {
"400": {
"$ref": "#/components/responses/BAD_REQUEST"
},
"200": {
"description": "OK",
"content": {
Expand All @@ -98,9 +117,43 @@
},
"summary": "Get FIP list",
"description": "This API is used to get the list of FIPs.",
"tags": ["AA participants APIs"]
"tags": [
"AA participants APIs"
]
}
},
"/v2/fips/{fip_id}": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FIPResponse"
}
}
}
}
},
"summary": "Get FIP by ID",
"description": "This API is used to get a FIP by its ID.",
"tags": [
"AA participants APIs"
]
},
"parameters": [
{
"in": "path",
"name": "fip_id",
"required": true,
"schema": {
"type": "string",
"minLength": 1
}
}
]
},
"/v2/consents": {
"post": {
"parameters": [
Expand Down
142 changes: 138 additions & 4 deletions content/data/account-aggregator/api-integration/fip-apis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
</tr>
<tr>
<td>
<code>TEMPORARILY INACTIVE</code>
<code>TEMPORARILY_INACTIVE</code>
</td>
<td>
This is an FIP that has been disabled for breaching SLIs on
Expand All @@ -115,7 +115,7 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
However, this is a temporary status and will be moved to ACTIVE
status once their performance has improved. Do not redirect your
customers to the consent flow when an FIP status is INACTIVE or
TEMPORARILY INACTIVE as that will mean their consents and/or data
TEMPORARILY_INACTIVE as that will mean their consents and/or data
fetches are likely to fail.
</td>
</tr>
Expand Down Expand Up @@ -148,6 +148,15 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
"institutionType": "BANK",
"status": "ACTIVE"
},
{
"name": "Federal Bank",
"fipId": "FDRLFIP",
"fiTypes": [
"DEPOSIT"
],
"institutionType": "BANK",
"status": "ACTIVE"
},
{
"name": "IndusInd Bank Ltd.",
"fipId": "fiplive@indusind",
Expand All @@ -157,7 +166,7 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
"RECURRING_DEPOSIT"
],
"institutionType": "BANK",
"status": "ACTIVE"
"status": "TEMPORARILY_INACTIVE"
},
{
"name": "HDFC Bank",
Expand Down Expand Up @@ -195,7 +204,132 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
),
},
]}
></Tabs>
/>
</Portion>
</Row>

### Get FIP by ID API

###### Request

<CodeBlockWithCopy language="json">{` GET /v2/fips/:id `}</CodeBlockWithCopy>
<Row>
<Portion desktopSpan="whole">
<Tabs
tabs={[
{
key: "1",
label: <Badge type="success">SUCCESS</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"data": [
{
"name": "HDFC Bank",
"fipId": "HDFC-FIP",
"fiTypes": [
"DEPOSIT"
],
"institutionType": "BANK",
"status": "INACTIVE"
}
],
"traceId": "1-66ff79c7-46029a1f1aaa59083489fd46"
}
`}
</CodeBlockWithCopy>
</>
),
},
{
key: "2",
label: <Badge type="failure">FAIL</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"errorMsg": "string",
"errorCode": "string",
"txnid": "string",
"timestamp": "2023-03-30T08:20:31.367Z",
"ver": "string"
}`}
</CodeBlockWithCopy>
</>
),
},
]}
/>
</Portion>
</Row>

### Get FIPs by Status API

###### Request

<CodeBlockWithCopy language="json">{` GET /v2/fips?status=ACTIVE `}</CodeBlockWithCopy>
<Row>
<Portion desktopSpan="whole">
<Tabs
tabs={[
{
key: "1",
label: <Badge type="success">SUCCESS</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"data": [
{
"name": "Axis Bank",
"fipId": "AXIS001",
"fiTypes": [
"DEPOSIT"
],
"institutionType": "BANK",
"status": "ACTIVE"
},
{
"name": "Federal Bank",
"fipId": "FDRLFIP",
"fiTypes": [
"DEPOSIT"
],
"institutionType": "BANK",
"status": "ACTIVE"
}
],
"traceId": "1-64313583-255e3a0705424652664584b2"
}
`}
</CodeBlockWithCopy>
</>
),
},
{
key: "2",
label: <Badge type="failure">FAIL</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"errorMsg": "string",
"errorCode": "string",
"txnid": "string",
"timestamp": "2023-03-30T08:20:31.367Z",
"ver": "string"
}`}
</CodeBlockWithCopy>
</>
),
},
]}
/>
</Portion>
</Row>

Expand Down
74 changes: 71 additions & 3 deletions content/data/account-aggregator/api-integration/notifications.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,19 @@ Setu will post this payload to your notification endpoint whenever there is a ch

In cases where the user **cancels** the consent before login, or **rejects** the consent after login, an error code and error message will be included in the notification payload.

<CodeBlockWithCopy language="json">
{`{

<Row>
<Portion desktopSpan="whole">
<Tabs
tabs={[
{
key: "1",
label: <Badge>UserCancelled</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"success": false,
"error": {
"code": "UserCancelled",
Expand All @@ -78,7 +89,61 @@ In cases where the user **cancels** the consent before login, or **rejects** the
"timestamp": "2024-01-29T07:28:24.547Z",
"type": "CONSENT_STATUS_UPDATE"
}`}
</CodeBlockWithCopy>
</CodeBlockWithCopy>
</>
),
},
{
key: "2",
label: <Badge>UserRejected</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"success": false,
"error": {
"code": "UserRejected",
"message": "reject_not_want_to_share"
},
"data": null,
"consentId": "72cb6cb8-c248-4b88-9282-18262fbdfbc2",
"notificationId": "66d5fef5-d5f3-48f6-afe7-1e82ac952ecb",
"timestamp": "2024-01-29T07:28:24.547Z",
"type": "CONSENT_STATUS_UPDATE"
}`}
</CodeBlockWithCopy>
</>
),
},
{
key: "3",
label: <Badge>Error while fetching consent from upstream AA</Badge>,
content: (
<>
<h5>Response</h5>
<CodeBlockWithCopy language="json">
{`{
"success": false,
"error": {
"code": "ConsentObjectCreationFailure",
"message": "Internal server error occurred while fetching consent details from upstream AA"
}
"data": null,
"consentId": "72cb6cb8-c248-4b88-9282-18262fbdfbc2",
"notificationId": "66d5fef5-d5f3-48f6-afe7-1e82ac952ecb",
"timestamp": "2024-01-29T07:28:24.547Z",
"type": "CONSENT_STATUS_UPDATE"
}`}
</CodeBlockWithCopy>
</>
),
},
]}
/>
</Portion>
</Row>


###### Consent error codes
Mapping of error code, error message and it's meaning:
Expand All @@ -92,6 +157,9 @@ Mapping of error code, error message and it's meaning:
| `UserRejected` | `reject_not_want_to_share` | I do not want to share my data with FIU |
| `UserRejected` | `reject_accounts_not_found` | I could not find my accounts |
| `UserRejected` | `reject_other` | For other reasons |
| `NoFIPAccountsDiscovered` | `no_fip_accounts_found` |No fip accounts discovered |
| `FIPDenied` | `FIP_DENIED_CONSENT` | FIP denied your consent |


<br />

Expand Down
11 changes: 10 additions & 1 deletion content/data/account-aggregator/fi-data-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ The schema across all FI types adheres to a set of defined components:

### Testing with Setu FIP

Setu FIP to help you get access to rich mock data for FI type **Deposit** as per the Account Aggregator specifications. More FI types will be available soon.
Setu FIP helps you get access to rich mock data for various FI types as per the Account Aggregator specifications. The currently supported FI types are:

| **Category** | **FI Types** |
| ------------- | ------------ |
| Bank | DEPOSIT, TERM_DEPOSIT, RECURRING_DEPOSIT |
| Investment | MUTUAL_FUNDS, ETF, EQUITIES, NPS |
| Insurance | INSURANCE_POLICIES |
| GST | GSTR1_3B |

More FI types will be available soon.

###### **How to test?**

Expand Down
Loading