#Create Consent API
Call this API to create a consent request. The details of the request will be presented to your customer on Setu’s screens, as part of the next step.
Request
Read up more about the the Detail object here.
POST /Consent{"ver" : "1.0","timestamp" : "2019-08-24T14:15:22Z","txnid" : "4a4adbbe-29ae-11e8-a8d7-0289437bf331","ConsentDetail" : {<Refer to “Consent object” for more information>}}
Response
Your will receive a consentHandle in the response, which is the unique identifier for the created consent request.
Redirect your customer to consent manager at this point to review the consent. Read more about review consent below.
{"ver" : "1.0","timestamp" : "2018-12-06T11:39:57.153Z","txnid" : "4a4adbbe-29ae-11e8-a8d7-0289437bf331","Customer" : {"id" : "customer_mobile_number@AA_identifier"},"ConsentHandle" : "39e108fe-9243-11e8-b9f2-0256d88baae8"}
#Consent Review by customer
Consent Manager screens are used by your customer to approve the consent request. They will be either asked to login, or register with Setu using their mobile number. Setu creates a unique account aggregator handle for every registered customer.
Consent Manager URL is always https://anumati.setu.co/(consentHandleInResponse)?redirect_url=(yourRedirectURL). Quick definitions—
- consentHandleInResponse—This is the ConsentHandle that was received in the response to Create consent request API.
- yourRedirectURL—This will be used to pass control back to your app from consent manager and will redirect your customer to this provided URL.
The following steps are handled by Setu's screens—
- Login with PIN or mobile number
- Setu authenticates customer and displays the data request
- Customer reviews the request and links data
- Setu validates and saves consent
- Setu sends notification to you to confirm consent approval
- Once the customer approves the consent request, Setu generates the digitally signed consent artefact that you can fetch.
Test this flow as FIU developer
Only for testing this flow, replace the placeholders in the consent manager URL—https://anumati.setu.co/(consentHandleInResponse)?redirect_url= (yourRedirectURL). Visit the URL to approve consent.
This URL is optional when testing as an FIU developer.
Example—If ConsentHandle in the response is XXX-YYY-XXX-ZZZ, your consent manager URL will be https://anumati.setu.co/XXX-YYY-XXX-ZZZ
Use 123456 as OTP in Setu Anumati wherever prompted.
#Get Consent Status API
#Check consent request status
Call this API to get the status of a consent request by passing its unique id.
If the consent is approved, the ConsentStatus in the response will be READY.
Once consent is approved, Setu AA will notify you on the same by sending a request to the notification endpoint you entered on the Bridge.
Request
GET /Consent/handle/{:id}
Response
{"ver" : "1.0","timestamp" : "2018-12-06T11:39:57.153Z","txnid" : "795038d3-86fb-4d3a-a681-2d39e8f4fc3c","ConsentHandle" : "a4adbbe-29ae-11e8-a8d7-0289437bf331","ConsentStatus" : {"id" : "654024c8-29c8-11e8-8868-0289437bf331","status" : "READY"}}
#Fetch signed consent
Call this API to get a signed consent request by passing its unique id.
Request
GET /Consent/{:id}
Response
{"ver" : "1.0","txnid" : "0b811819-9044-4856-b0ee-8c88035f8858","consentId" : "XXXX-XXXX-XXXX-XXXX","status" : "ACTIVE","createTimestamp" : "2018-12-06T11:39:57.153Z","signedConsent" : "longkey","ConsentUse" : {"logUri" : "string","count" : 1,"lastUseDateTime" : "2018-12-06T11:39:57.153Z"}}
Was this page helpful?
