Integration using Simulator
Last updated
Last updated
This page outlines the usage of Response Simulator by AA, FIU or FIP with entity APIs for the integration of Router. This Response Simulator will simulate the behaviour of the actual entity APIs to facilitate Sahamati router usage and testing.
The Response Simulator is designed to simulate the behaviour of real Entity’s Protocol APIs. It provides a controlled environment for developers to test and verify router service without relying on an actual entity.
The sample workflow diagram below illustrates the usage of the Response Simulator by including a simulated response with the expected response.
The following two details are required in the request to use the APIs with Response Simulator:
recipient-id: This is specified in the x-request-meta header through which the router that will route the request to the respective response simulator. The available options are,
AA-SIMULATOR
FIU-SIMULATOR and
FIP-SIMULATOR.
x-simulate-res: This header should contain a hint for the expected response from the response simulator. It can be any of the options listed in the specific entity tables. If this is not included, the response simulator will default to returning a 200 OK response.
The FIP's Accounts/link/verify API is the only one that utilizes the OTP received from the customer. This API is responsible for submitting the token/OTP back to the FIP to complete the account linkage process. The Response Simulator is set up to accept a predefined list of OTPs for successful account linkage. If an OTP outside of this list is used, the account linkage will fail. This is the default behavior of the Response Simulator, functioning without the need for the x-simulate-res header.
The sample workflow diagram below illustrates the usage of the valid OTP
The sample workflow diagram below illustrates the usage of the invalid OTP
This AA response simulator will support all the APIs listed under this ReBIT Spec - https://api.rebit.org.in/viewSpec/AA_2_1_0.yaml
Sample FI/fetch workflow using AA-SIMULATOR:
The AA Response Simulator (AA-SIMULATOR) includes preloaded scenarios that can be accessed by sending the corresponding scenario ID in the x-scenario-id header. The table below lists the scenarios available from the AA Simulator.
This FIU response simulator will support all the APIs listed under this ReBIT Spec - https://api.rebit.org.in/viewSpec/FIU_2_0_0.yaml
The FIU Response Simulator (FIU-SIMULATOR) includes preloaded scenarios that can be accessed by sending the corresponding scenario ID in the x-scenario-id header. The table below lists the scenarios available from the FIU Simulator.
This FIP response simulator will support all the APIs listed under this ReBIT Spec - https://api.rebit.org.in/viewSpec/FIP_2_1_0.yaml
The FIP Response Simulator (FIP-SIMULATOR) includes preloaded scenarios that can be accessed by sending the corresponding scenario ID in the x-scenario-id header. The table below lists the scenarios available from the FIP Simulator.
API | Expected Response | x-simulate-res Header Options |
---|---|---|
API Requests | Scenario Id | Details |
---|---|---|
API | Expected Response | x-simulate-res Header Options |
---|---|---|
API Requests | Scenario Id | Details |
---|---|---|
API | Expected Response | x-simulate-res Header Options |
---|---|---|
API Requests | Scenario Id | Details |
---|---|---|
1234
123456
654321
999999
223344
567890
456789
234567
345678
555444
222333
All
200 OK
Ok
All
400 Bad Request
BadRequest
All
401 Unauthorized Access
Unauthorized
All
404 Not Found
NotFound
All
409 Conflict
Conflict
All
412 Precondition failed
PreconditionFail
All
501 Not Implemented
NotImplemented
All
503 Service Unavailable
ServiceUnavailable
FI/fetch
403 Forbidden
(DataFetchRequestInProgress)
Forbidden
FI/fetch
410 Data Gone
DataGone
All
Timeout Scenario
(delay in sending response)
TimeOut
/Consent
ConsentDeposit_Success
Successful consent request
/Consent/handle
ConsentHandleDeposit_Approved
Consent response with status as Approved
/Consent/handle
ConsentHandleDeposit_Ready
Consent response with status as Ready
/Consent/handle
ConsentHandleDeposit_Rejected
Consent response with status as Rejected
/Consent/handle
ConsentHandleDeposit_Expired
Consent response with status as Expired
/Consent/handle
ConsentHandleDeposit_Failed
Consent response with status as Failed
/Consent/handle
ConsentHandleDeposit_Pending
Consent response with status as Pending
/Consent/fetch
ConsentFetchDeposit_Active
Consent fetch with status as Active
/Consent/fetch
ConsentFetchDeposit_Paused
Consent fetch with status as Paused
/Consent/fetch
ConsentFetchDeposit_Revoked
Consent fetch with status as Revoked
/Consent/fetch
ConsentFetchDeposit_Expired
Consent fetch with status as Expired
/FI/request
FIRequestDeposit_Success
Successful FI request
/FI/request
FIRequestDeposit_Expired
FI request with expired consent
/FI/fetch
FIFetchDeposit_Success_1
Successful FI fetch from Bank 1
/FI/fetch
FIFetchDeposit_Success_2
Successful FI fetch from Bank 2
/Consent/Notification
ConsentNotificationDeposit_Success
Successful consent notification
/FI/Notification
FINotificationDeposit_Success
Successful FI notification
/Account/link/Notification
AccountLinkNotificationDeposit_Success
Successful Account Link notification
All
200 OK
Ok
All
400 Bad Request
BadRequest
All
401 Unauthorized Access
Unauthorized
All
404 Not Found
NotFound
All
409 Conflict
Conflict
All
412 Precondition failed
PreconditionFail
All
501 Not Implemented
NotImplemented
All
503 Service Unavailable
ServiceUnavailable
All
Timeout Scenario
(delay in sending response)
TimeOut
/Consent/Notification
ConsentNotificationDeposit_Success
Successful consent notification
/FI/Notification
FINotificationDeposit_Success
Successful FI notification
All
200 OK
Ok
All
400 Bad Request
BadRequest
All
401 Unauthorized Access
Unauthorized
All
404 Not Found
NotFound
All
409 Conflict
Conflict
All
412 Precondition failed
PreconditionFail
All
501 Not Implemented
NotImplemented
All
503 Service Unavailable
ServiceUnavailable
FI/fetch
403 Forbidden
(DataFetchRequestInProgress)
Forbidden
All
Timeout Scenario
(delay in sending response)
TimeOut
/Accounts/discover
DiscoveryFlowDeposit_Success
Successful account discovery
/Accounts/discover
DiscoveryFlowDeposit_NotFoundMatch
Not found any accounts
/Accounts/discover
DiscoveryFlowDeposit_Multiple
Successful account discovery with 2 accounts - Bank 1 & Bank 2
/Accounts/link
LinkFlowDeposit_Success_1
Successful account link for Bank 1
/Accounts/link
LinkFlowDeposit_Success_2
Successful account link for Bank 2
/Accounts/delink
DeLinkFlowDeposit_Success_1
Successful account de-link for Bank 1
/Accounts/delink
DeLinkFlowDeposit_Success_2
Successful account de-link for Bank 2
/Accounts/link/verify
LinkVerifyFlowDeposit_Success_1
Successful account verification for Bank 1
/Accounts/link/verify
LinkVerifyFlowDeposit_Success_2
Successful account verification for Bank 1
/Accounts/link/verify
LinkVerifyFlowDeposit_InvalidOTP
Invalid OTP for account verification
/Consent
ConsentDeposit_Success
Successful consent response
/FI/request
FIRequestDeposit_Success
Successful FI request
/FI/request
FIRequestDeposit_Expired
FI request with expired consent
/FI/fetch
FIFetchDeposit_Success_1
Successful FI fetch from Bank 1
/FI/fetch
FIFetchDeposit_Success_2
Successful FI fetch from Bank 2
/Consent/Notification
ConsentNotificationDeposit_Success
Successful consent notification