Skip to content

Commit 122339f

Browse files
AAGW: Updated error codes and FIP APIs (#200)
* [AG-1534] - Updated error codes and FIP APIs * Minor fixes --------- Co-authored-by: Aditya Gannavarapu <adityagannavarapu.67@gmail.com>
1 parent 3102318 commit 122339f

File tree

4 files changed

+272
-8
lines changed

4 files changed

+272
-8
lines changed

api-references/data/account-aggregator.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,26 @@
8484
},
8585
"/v2/fips": {
8686
"get": {
87+
"parameters": [
88+
{
89+
"in": "query",
90+
"name": "status",
91+
"required": false,
92+
"description": "Status of the FIP by which the FIPs are to be filtered",
93+
"schema": {
94+
"type": "string",
95+
"enum": [
96+
"ACTIVE",
97+
"INACTIVE",
98+
"TEMPORARILY_INACTIVE"
99+
]
100+
}
101+
}
102+
],
87103
"responses": {
104+
"400": {
105+
"$ref": "#/components/responses/BAD_REQUEST"
106+
},
88107
"200": {
89108
"description": "OK",
90109
"content": {
@@ -103,6 +122,38 @@
103122
]
104123
}
105124
},
125+
"/v2/fips/{fip_id}": {
126+
"get": {
127+
"responses": {
128+
"200": {
129+
"description": "OK",
130+
"content": {
131+
"application/json": {
132+
"schema": {
133+
"$ref": "#/components/schemas/FIPResponse"
134+
}
135+
}
136+
}
137+
}
138+
},
139+
"summary": "Get FIP by ID",
140+
"description": "This API is used to get a FIP by its ID.",
141+
"tags": [
142+
"AA participants APIs"
143+
]
144+
},
145+
"parameters": [
146+
{
147+
"in": "path",
148+
"name": "fip_id",
149+
"required": true,
150+
"schema": {
151+
"type": "string",
152+
"minLength": 1
153+
}
154+
}
155+
]
156+
},
106157
"/v2/consents": {
107158
"post": {
108159
"parameters": [

content/data/account-aggregator/api-integration/fip-apis.mdx

Lines changed: 138 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
106106
</tr>
107107
<tr>
108108
<td>
109-
<code>TEMPORARILY INACTIVE</code>
109+
<code>TEMPORARILY_INACTIVE</code>
110110
</td>
111111
<td>
112112
This is an FIP that has been disabled for breaching SLIs on
@@ -115,7 +115,7 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
115115
However, this is a temporary status and will be moved to ACTIVE
116116
status once their performance has improved. Do not redirect your
117117
customers to the consent flow when an FIP status is INACTIVE or
118-
TEMPORARILY INACTIVE as that will mean their consents and/or data
118+
TEMPORARILY_INACTIVE as that will mean their consents and/or data
119119
fetches are likely to fail.
120120
</td>
121121
</tr>
@@ -148,6 +148,15 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
148148
"institutionType": "BANK",
149149
"status": "ACTIVE"
150150
},
151+
{
152+
"name": "Federal Bank",
153+
"fipId": "FDRLFIP",
154+
"fiTypes": [
155+
"DEPOSIT"
156+
],
157+
"institutionType": "BANK",
158+
"status": "ACTIVE"
159+
},
151160
{
152161
"name": "IndusInd Bank Ltd.",
153162
"fipId": "fiplive@indusind",
@@ -157,7 +166,7 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
157166
"RECURRING_DEPOSIT"
158167
],
159168
"institutionType": "BANK",
160-
"status": "ACTIVE"
169+
"status": "TEMPORARILY_INACTIVE"
161170
},
162171
{
163172
"name": "HDFC Bank",
@@ -195,7 +204,132 @@ Below is the list of statuses for FIPs that you will see in a typical GET FIP Li
195204
),
196205
},
197206
]}
198-
></Tabs>
207+
/>
208+
</Portion>
209+
</Row>
210+
211+
### Get FIP by ID API
212+
213+
###### Request
214+
215+
<CodeBlockWithCopy language="json">{` GET /v2/fips/:id `}</CodeBlockWithCopy>
216+
<Row>
217+
<Portion desktopSpan="whole">
218+
<Tabs
219+
tabs={[
220+
{
221+
key: "1",
222+
label: <Badge type="success">SUCCESS</Badge>,
223+
content: (
224+
<>
225+
<h5>Response</h5>
226+
<CodeBlockWithCopy language="json">
227+
{`{
228+
"data": [
229+
{
230+
"name": "HDFC Bank",
231+
"fipId": "HDFC-FIP",
232+
"fiTypes": [
233+
"DEPOSIT"
234+
],
235+
"institutionType": "BANK",
236+
"status": "INACTIVE"
237+
}
238+
],
239+
"traceId": "1-66ff79c7-46029a1f1aaa59083489fd46"
240+
}
241+
`}
242+
</CodeBlockWithCopy>
243+
</>
244+
),
245+
},
246+
{
247+
key: "2",
248+
label: <Badge type="failure">FAIL</Badge>,
249+
content: (
250+
<>
251+
<h5>Response</h5>
252+
<CodeBlockWithCopy language="json">
253+
{`{
254+
"errorMsg": "string",
255+
"errorCode": "string",
256+
"txnid": "string",
257+
"timestamp": "2023-03-30T08:20:31.367Z",
258+
"ver": "string"
259+
}`}
260+
</CodeBlockWithCopy>
261+
</>
262+
),
263+
},
264+
]}
265+
/>
266+
</Portion>
267+
</Row>
268+
269+
### Get FIPs by Status API
270+
271+
###### Request
272+
273+
<CodeBlockWithCopy language="json">{` GET /v2/fips?status=ACTIVE `}</CodeBlockWithCopy>
274+
<Row>
275+
<Portion desktopSpan="whole">
276+
<Tabs
277+
tabs={[
278+
{
279+
key: "1",
280+
label: <Badge type="success">SUCCESS</Badge>,
281+
content: (
282+
<>
283+
<h5>Response</h5>
284+
<CodeBlockWithCopy language="json">
285+
{`{
286+
"data": [
287+
{
288+
"name": "Axis Bank",
289+
"fipId": "AXIS001",
290+
"fiTypes": [
291+
"DEPOSIT"
292+
],
293+
"institutionType": "BANK",
294+
"status": "ACTIVE"
295+
},
296+
{
297+
"name": "Federal Bank",
298+
"fipId": "FDRLFIP",
299+
"fiTypes": [
300+
"DEPOSIT"
301+
],
302+
"institutionType": "BANK",
303+
"status": "ACTIVE"
304+
}
305+
],
306+
"traceId": "1-64313583-255e3a0705424652664584b2"
307+
}
308+
`}
309+
</CodeBlockWithCopy>
310+
</>
311+
),
312+
},
313+
{
314+
key: "2",
315+
label: <Badge type="failure">FAIL</Badge>,
316+
content: (
317+
<>
318+
<h5>Response</h5>
319+
<CodeBlockWithCopy language="json">
320+
{`{
321+
"errorMsg": "string",
322+
"errorCode": "string",
323+
"txnid": "string",
324+
"timestamp": "2023-03-30T08:20:31.367Z",
325+
"ver": "string"
326+
}`}
327+
</CodeBlockWithCopy>
328+
</>
329+
),
330+
},
331+
]}
332+
/>
199333
</Portion>
200334
</Row>
201335

content/data/account-aggregator/api-integration/notifications.mdx

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,19 @@ Setu will post this payload to your notification endpoint whenever there is a ch
6565

6666
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.
6767

68-
<CodeBlockWithCopy language="json">
69-
{`{
68+
69+
<Row>
70+
<Portion desktopSpan="whole">
71+
<Tabs
72+
tabs={[
73+
{
74+
key: "1",
75+
label: <Badge type="failure">UserCancelled</Badge>,
76+
content: (
77+
<>
78+
<h5>Response</h5>
79+
<CodeBlockWithCopy language="json">
80+
{`{
7081
"success": false,
7182
"error": {
7283
"code": "UserCancelled",
@@ -78,7 +89,61 @@ In cases where the user **cancels** the consent before login, or **rejects** the
7889
"timestamp": "2024-01-29T07:28:24.547Z",
7990
"type": "CONSENT_STATUS_UPDATE"
8091
}`}
81-
</CodeBlockWithCopy>
92+
</CodeBlockWithCopy>
93+
</>
94+
),
95+
},
96+
{
97+
key: "2",
98+
label: <Badge type="failure">UserRejected</Badge>,
99+
content: (
100+
<>
101+
<h5>Response</h5>
102+
<CodeBlockWithCopy language="json">
103+
{`{
104+
"success": false,
105+
"error": {
106+
"code": "UserRejected",
107+
"message": "reject_not_want_to_share"
108+
},
109+
"data": null,
110+
"consentId": "72cb6cb8-c248-4b88-9282-18262fbdfbc2",
111+
"notificationId": "66d5fef5-d5f3-48f6-afe7-1e82ac952ecb",
112+
"timestamp": "2024-01-29T07:28:24.547Z",
113+
"type": "CONSENT_STATUS_UPDATE"
114+
}`}
115+
</CodeBlockWithCopy>
116+
</>
117+
),
118+
},
119+
{
120+
key: "3",
121+
label: <Badge type="failure">Upstream AA</Badge>,
122+
content: (
123+
<>
124+
<h5>Response</h5>
125+
<CodeBlockWithCopy language="json">
126+
{`{
127+
"success": false,
128+
"error": {
129+
"code": "ConsentObjectCreationFailure",
130+
"message": "Internal server error occurred while fetching consent details from upstream AA"
131+
}
132+
"data": null,
133+
"consentId": "72cb6cb8-c248-4b88-9282-18262fbdfbc2",
134+
"notificationId": "66d5fef5-d5f3-48f6-afe7-1e82ac952ecb",
135+
"timestamp": "2024-01-29T07:28:24.547Z",
136+
"type": "CONSENT_STATUS_UPDATE"
137+
}`}
138+
</CodeBlockWithCopy>
139+
</>
140+
),
141+
},
142+
]}
143+
/>
144+
</Portion>
145+
</Row>
146+
82147

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

96164
<br />
97165

content/data/account-aggregator/fi-data-types.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ The schema across all FI types adheres to a set of defined components:
1616

1717
### Testing with Setu FIP
1818

19-
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.
19+
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:
20+
21+
| **Category** | **FI Types** |
22+
| ------------- | ------------ |
23+
| Bank | DEPOSIT, TERM_DEPOSIT, RECURRING_DEPOSIT |
24+
| Investment | MUTUAL_FUNDS, ETF, EQUITIES, NPS |
25+
| Insurance | INSURANCE_POLICIES |
26+
| GST | GSTR1_3B |
27+
28+
<br/>
29+
30+
More FI types will be available soon.
2031

2132
###### **How to test?**
2233

0 commit comments

Comments
 (0)