|
2 | 2 | sidebar_title: API Integration
|
3 | 3 | page_title: Aadhaar OKYC Redundancy API Integration
|
4 | 4 | order: 1
|
5 |
| -visible_in_sidebar: true |
| 5 | +visible_in_sidebar: false |
6 | 6 | ---
|
7 | 7 |
|
8 | 8 | ## Aadhaar OKYC Redundancy API Integration
|
9 | 9 |
|
10 |
| -The following guide describes the redundancy implementation of our Aadhaar OKYC APIs. Due to intermittent issues on our supply partner's end, we have introduced an Aadhaar Redundancy |
11 |
| -API, which uses either supply partner to perform Aadhaar Verification and fetch a user's Aadhaar details, depending on uptimes. |
| 10 | +The following guide describes the redundancy implementation of our Aadhaar OKYC APIs. Due to intermittent issues on our supply partner's end, we have introduced an Aadhaar Redundancy |
| 11 | +API, which uses either supply partner to perform Aadhaar Verification and fetch a user's Aadhaar details, depending on uptimes. |
12 | 12 | You will need the following 2 APIs—
|
13 | 13 |
|
14 |
| -- **Create Aadhaar Verification Request**—This lets you initiate a verification request. |
15 |
| -- **GET Aadhaar Verification Details**—This lets you check the status associated with the verification request, and if complete, fetch the verification details. |
| 14 | +- **Create Aadhaar Verification Request**—This lets you initiate a verification request. |
| 15 | +- **GET Aadhaar Verification Details**—This lets you check the status associated with the verification request, and if complete, fetch the verification details. |
16 | 16 |
|
17 | 17 | Here are the URLs you would need for this integration—
|
18 | 18 |
|
19 |
| -- Sandbox—`https://dg-sandbox.setu.co` |
20 |
| -- Production—`https://dg.setu.co` |
21 |
| -- Headers—Contact Setu for providing the credentials required to successfully call Setu APIs. This contains: |
22 |
| - - `x-client-id` |
23 |
| - - `x-client-secret` |
24 |
| - - `x-product-instance-id` |
| 19 | +- Sandbox—`https://dg-sandbox.setu.co` |
| 20 | +- Production—`https://dg.setu.co` |
| 21 | +- Headers—Contact Setu for providing the credentials required to successfully call Setu APIs. This contains: |
| 22 | + - `x-client-id` |
| 23 | + - `x-client-secret` |
| 24 | + - `x-product-instance-id` |
25 | 25 |
|
26 | 26 | <hr class="primary" />
|
27 | 27 |
|
28 | 28 | ### Create Aadhaar verification request
|
29 | 29 |
|
30 | 30 | Call this API to initiate Aadhaar Verification for your end customer. A quick explanation of the request params—
|
31 | 31 |
|
32 |
| -- `redirectUrl` Endpoint to which your end customer will be redirected to, post completion of verification flow. |
| 32 | +- `redirectUrl` Endpoint to which your end customer will be redirected to, post completion of verification flow. |
33 | 33 |
|
34 | 34 | <br />
|
35 | 35 |
|
36 | 36 | <Row>
|
37 |
| - <Portion desktopSpan="whole"> |
38 |
| - <Tabs |
39 |
| - tabs={[ |
40 |
| - { |
41 |
| - key: "1", |
42 |
| - label: "200", |
43 |
| - content: ( |
44 |
| - <> |
45 |
| - <p> |
46 |
| - <Badge type="success">SUCCESS</Badge> Your |
47 |
| - Aadhaar Verification request was created successfully |
48 |
| - </p> |
49 |
| - <hr className="tertiary" /> |
50 |
| - <h5>Request</h5> |
51 |
| - <CodeBlockWithCopy language="json"> |
52 |
| - {`POST /api/aadhaar/verify |
| 37 | + <Portion desktopSpan="whole"> |
| 38 | + <Tabs |
| 39 | + tabs={[ |
| 40 | + { |
| 41 | + key: "1", |
| 42 | + label: "200", |
| 43 | + content: ( |
| 44 | + <> |
| 45 | + <p> |
| 46 | + <Badge type="success">SUCCESS</Badge> Your Aadhaar Verification |
| 47 | + request was created successfully |
| 48 | + </p> |
| 49 | + <hr className="tertiary" /> |
| 50 | + <h5>Request</h5> |
| 51 | + <CodeBlockWithCopy language="json"> |
| 52 | + {`POST /api/aadhaar/verify |
53 | 53 |
|
54 | 54 | {
|
55 | 55 | "redirectUrl": "https://setu.co"
|
56 | 56 | } `}
|
57 |
| - </CodeBlockWithCopy> |
58 |
| - <hr className="tertiary" /> |
59 |
| - <h5>Response</h5> |
60 |
| - <p> |
61 |
| - You get an <code>id</code> associated with the |
62 |
| - Aadhaar verification request, which you can use to check |
63 |
| - verification status in the <code>Get Aadhaar Verification Details</code> API. |
64 |
| - </p> |
65 |
| - <CodeBlockWithCopy language="json"> |
66 |
| - {`{ |
| 57 | + </CodeBlockWithCopy> |
| 58 | + <hr className="tertiary" /> |
| 59 | + <h5>Response</h5> |
| 60 | + <p> |
| 61 | + You get an <code>id</code> associated with the Aadhaar |
| 62 | + verification request, which you can use to check verification |
| 63 | + status in the <code>Get Aadhaar Verification Details</code> API. |
| 64 | + </p> |
| 65 | + <CodeBlockWithCopy language="json"> |
| 66 | + {`{ |
67 | 67 | "id": "be896113-6ad1-4741-80e3-56e67e794959",
|
68 | 68 | "status": "pending",
|
69 | 69 | "url": "https://dg.setu.co/digilocker/login/be896113-6ad1-4741-80e3-56e67e794959?path=L2Y3ZDdjOTk2LWEzNmQtNDQ0Mi1iMTliLTY3MDQ5NTE5Mjc0Yy8=",
|
70 | 70 | "validUpto": "2023-11-15T06:52:01+05:30",
|
71 | 71 | "traceId": "1-6540a411-48c3a26c1442b1580f6e6bf9"
|
72 | 72 | }`}
|
73 |
| - </CodeBlockWithCopy> |
74 |
| - </> |
75 |
| - ), |
76 |
| - }, |
77 |
| - ]} |
78 |
| - ></Tabs> |
79 |
| - </Portion> |
| 73 | + </CodeBlockWithCopy> |
| 74 | + </> |
| 75 | + ), |
| 76 | + }, |
| 77 | + ]} |
| 78 | + ></Tabs> |
| 79 | + </Portion> |
80 | 80 | </Row>
|
81 | 81 |
|
82 |
| - |
83 | 82 | ### Get Aadhaar Verification Details
|
84 | 83 |
|
85 | 84 | Call this API to fetch the details and status of the Aadhaar Verification request. A quick explanation of the query params—
|
86 | 85 |
|
87 |
| -- `request_id` The `id` returned in the `Create Aadhaar Verification request` response |
| 86 | +- `request_id` The `id` returned in the `Create Aadhaar Verification request` response |
88 | 87 |
|
89 | 88 | <br />
|
90 | 89 |
|
91 | 90 | <Row>
|
92 |
| - <Portion desktopSpan="whole"> |
93 |
| - <Tabs |
94 |
| - tabs={[ |
95 |
| - { |
96 |
| - key: "1", |
97 |
| - label: "200", |
98 |
| - content: ( |
99 |
| - <> |
100 |
| - <hr className="tertiary" /> |
101 |
| - <h5>Request</h5> |
102 |
| - <CodeBlockWithCopy language="json"> |
103 |
| - {`GET /api/aadhaar/verify/:request_id`} |
104 |
| - </CodeBlockWithCopy> |
105 |
| - <hr className="tertiary" /> |
106 |
| - <h5>Response</h5> |
107 |
| - <p> |
108 |
| - If <code>status</code> is pending. |
109 |
| - </p> |
110 |
| - <CodeBlockWithCopy language="json"> |
111 |
| - {`{ |
| 91 | + <Portion desktopSpan="whole"> |
| 92 | + <Tabs |
| 93 | + tabs={[ |
| 94 | + { |
| 95 | + key: "1", |
| 96 | + label: "200", |
| 97 | + content: ( |
| 98 | + <> |
| 99 | + <hr className="tertiary" /> |
| 100 | + <h5>Request</h5> |
| 101 | + <CodeBlockWithCopy language="json"> |
| 102 | + {`GET /api/aadhaar/verify/:request_id`} |
| 103 | + </CodeBlockWithCopy> |
| 104 | + <hr className="tertiary" /> |
| 105 | + <h5>Response</h5> |
| 106 | + <p> |
| 107 | + If <code>status</code> is pending. |
| 108 | + </p> |
| 109 | + <CodeBlockWithCopy language="json"> |
| 110 | + {`{ |
112 | 111 | "id": "be896113-6ad1-4741-80e3-56e67e794959",
|
113 | 112 | "status": "pending",
|
114 | 113 | "url": "https://dg.setu.co/digilocker/login/be896113-6ad1-4741-80e3-56e67e794959?path=L2Y3ZDdjOTk2LWEzNmQtNDQ0Mi1iMTliLTY3MDQ5NTE5Mjc0Yy8=",
|
115 | 114 | "validUpto": "2023-11-15T06:52:01+05:30",
|
116 | 115 | "traceId": "1-6540a411-48c3a26c1442b1580f6e6bf9"
|
117 | 116 | }`}
|
118 |
| - </CodeBlockWithCopy> |
119 |
| - </> |
120 |
| - ), |
121 |
| - }, |
122 |
| - { |
123 |
| - key: "2", |
124 |
| - label: "200", |
125 |
| - content: ( |
126 |
| - <> |
127 |
| - <hr className="tertiary" /> |
128 |
| - <h5>Request</h5> |
129 |
| - <CodeBlockWithCopy language="json"> |
130 |
| - {`GET /api/aadhaar/verify/:request_id`} |
131 |
| - </CodeBlockWithCopy> |
132 |
| - <hr className="tertiary" /> |
133 |
| - <h5>Response</h5> |
134 |
| - <p> |
135 |
| - If <code>status</code> is complete. |
136 |
| - </p> |
137 |
| - <CodeBlockWithCopy language="json"> |
138 |
| - {` |
| 117 | + </CodeBlockWithCopy> |
| 118 | + </> |
| 119 | + ), |
| 120 | + }, |
| 121 | + { |
| 122 | + key: "2", |
| 123 | + label: "200", |
| 124 | + content: ( |
| 125 | + <> |
| 126 | + <hr className="tertiary" /> |
| 127 | + <h5>Request</h5> |
| 128 | + <CodeBlockWithCopy language="json"> |
| 129 | + {`GET /api/aadhaar/verify/:request_id`} |
| 130 | + </CodeBlockWithCopy> |
| 131 | + <hr className="tertiary" /> |
| 132 | + <h5>Response</h5> |
| 133 | + <p> |
| 134 | + If <code>status</code> is complete. |
| 135 | + </p> |
| 136 | + <CodeBlockWithCopy language="json"> |
| 137 | + {` |
139 | 138 | {
|
140 | 139 | "aadhaar_data": {
|
141 | 140 | "address": {
|
@@ -176,67 +175,63 @@ Call this API to fetch the details and status of the Aadhaar Verification reques
|
176 | 175 | "id": "be896113-6ad1-4741-80e3-56e67e794959"
|
177 | 176 | }
|
178 | 177 | `}
|
179 |
| - </CodeBlockWithCopy> |
180 |
| - </> |
181 |
| - ), |
182 |
| - }, |
183 |
| - { |
184 |
| - key: "3", |
185 |
| - label: "500", |
186 |
| - content: ( |
187 |
| - <> |
188 |
| - <hr className="tertiary" /> |
189 |
| - <h5>Request</h5> |
190 |
| - <CodeBlockWithCopy language="json"> |
191 |
| - {`GET /api/aadhaar/verify/:request_id`} |
192 |
| - </CodeBlockWithCopy> |
193 |
| - <hr className="tertiary" /> |
194 |
| - <h5>Response</h5> |
195 |
| - <p> |
196 |
| - Internal Server Error. |
197 |
| - </p> |
198 |
| - <CodeBlockWithCopy language="json"> |
199 |
| -{`{ |
| 178 | + </CodeBlockWithCopy> |
| 179 | + </> |
| 180 | + ), |
| 181 | + }, |
| 182 | + { |
| 183 | + key: "3", |
| 184 | + label: "500", |
| 185 | + content: ( |
| 186 | + <> |
| 187 | + <hr className="tertiary" /> |
| 188 | + <h5>Request</h5> |
| 189 | + <CodeBlockWithCopy language="json"> |
| 190 | + {`GET /api/aadhaar/verify/:request_id`} |
| 191 | + </CodeBlockWithCopy> |
| 192 | + <hr className="tertiary" /> |
| 193 | + <h5>Response</h5> |
| 194 | + <p>Internal Server Error.</p> |
| 195 | + <CodeBlockWithCopy language="json"> |
| 196 | + {`{ |
200 | 197 | "error":
|
201 | 198 | {
|
202 | 199 | "code": "internal_server_error",
|
203 | 200 | "detail": "Something went wrong, please try again.",
|
204 | 201 | "traceId": "1-6540b2f5-7576e9986b0b59ac02f4f831"
|
205 | 202 | }
|
206 | 203 | }`}
|
207 |
| - </CodeBlockWithCopy> |
208 |
| - </> |
209 |
| - ), |
210 |
| - }, |
211 |
| - { |
212 |
| - key: "4", |
213 |
| - label: "500", |
214 |
| - content: ( |
215 |
| - <> |
216 |
| - <hr className="tertiary" /> |
217 |
| - <h5>Request</h5> |
218 |
| - <CodeBlockWithCopy language="json"> |
219 |
| - {`GET /api/aadhaar/verify/:request_id`} |
220 |
| - </CodeBlockWithCopy> |
221 |
| - <hr className="tertiary" /> |
222 |
| - <h5>Response</h5> |
223 |
| - <p> |
224 |
| - Upstream Service Error. |
225 |
| - </p> |
226 |
| - <CodeBlockWithCopy language="json"> |
227 |
| -{`{ |
| 204 | + </CodeBlockWithCopy> |
| 205 | + </> |
| 206 | + ), |
| 207 | + }, |
| 208 | + { |
| 209 | + key: "4", |
| 210 | + label: "500", |
| 211 | + content: ( |
| 212 | + <> |
| 213 | + <hr className="tertiary" /> |
| 214 | + <h5>Request</h5> |
| 215 | + <CodeBlockWithCopy language="json"> |
| 216 | + {`GET /api/aadhaar/verify/:request_id`} |
| 217 | + </CodeBlockWithCopy> |
| 218 | + <hr className="tertiary" /> |
| 219 | + <h5>Response</h5> |
| 220 | + <p>Upstream Service Error.</p> |
| 221 | + <CodeBlockWithCopy language="json"> |
| 222 | + {`{ |
228 | 223 | "error":
|
229 | 224 | {
|
230 | 225 | "code": "upstream_server_error",
|
231 | 226 | "detail": "Upstream service failure",
|
232 | 227 | "traceId": "1-6540b2f5-7576e9986b0b59ac02f4f831"
|
233 | 228 | }
|
234 | 229 | }`}
|
235 |
| - </CodeBlockWithCopy> |
236 |
| - </> |
237 |
| - ), |
238 |
| - } |
239 |
| - ]} |
240 |
| - ></Tabs> |
241 |
| - </Portion> |
| 230 | + </CodeBlockWithCopy> |
| 231 | + </> |
| 232 | + ), |
| 233 | + }, |
| 234 | + ]} |
| 235 | + ></Tabs> |
| 236 | + </Portion> |
242 | 237 | </Row>
|
0 commit comments