#The consent object
The consent Detail
object is the core of the AA framework. When an FIU requires data about the user, the request is packaged in the form of a consent object.
This consent object carries information about all the different types of data the FIU needs, the purpose of the data, and how the FIU plans to use the data and so on. All params described below are required, except for DataFilter
.
#Consent Request Object
Property name | Description | Mandatory? |
---|---|---|
consentStart and consentExpiry | Date time fields that define the time period for which the consent is valid and can be use for data fetch.consentStart will always be present date and time or a future date. consentExpiry will always be a future date. | Yes |
consentMode | Enum for the type of consent. Possible values are VIEW , STORE , QUERY , STREAM | Yes |
fetchType | Enum to specify either ONETIME or PERIODIC fetch of data. Periodic fetches allow you to fetch a users data in the future, at a defined frequency. | Yes |
consentTypes | An array to specify the type of data being requested for, from your userPROFILE —Personal details such as mobile number, date of birth, PAN etc.SUMMARY —Information like mutual fund summary for total amount invested, current value, number of MFs and more.TRANSACTIONS —List of records against some financial data—e.g., a bank statement, buy/sell orders in a equities account, etc. | Yes |
fiTypes | An array specifying the type of financial information being requested for. Possible enums—DEPOSIT , MUTUAL_FUNDS , INSURANCE_POLICIES , TERM_DEPOSIT , RECURRING_DEPOSIT , SIP , GOVT_SECURITIES , EQUITIES , BONDS , DEBENTURES , ETF , and more. Click here to learn more about the data types. | Yes |
DataConsumer.id | This is the identifier for the entity that’s requesting for the data. On UAT, it is a static value – “setu-fiu-id” On production, it will be a unique “FIU ID” assigned to your organizaiton. | Yes |
Customer.id | What your customer would use to login to Setu’s AA. It should be sent in the format of <customer_mobile_number>@onemoney Use this to pass on the customer's phone number and auto-fill their number when they login. | Yes |
Purpose | This is used to indicate the purpose of requesting for data. As per the AA spec, the following codes are supported—101 —Wealth management service102 —Customer spending patterns, budget or other reportings103 —Aggregated statement104 —Explicit consent to monitor the accounts105 —Explicit one-time consent for accessing data from the accounts | Yes(single option) |
FIDataRange | This is used to specify the from and to date-time range for querying financial information. It is mandatory only when the consentTypes array includes TRANSACTIONS .The from and to date-time can be both - past dates & future dates. Future dates, typically correspond to PERIODIC fetches, while a from and to date-time in the past corresponds to ONETIME fetches. | Only when consentTypes array includes TRANSACTIONS |
DataLife | This is the time period for which you are allowed to process the data. Choose between MONTH , YEAR , DAY , INF as the unit and define a numeric value alongside. For more details on the difference between ‘DataLife’ & “Data Storage” please click here (check SD001 from the list of guidelines) | Yes |
Frequency has 2 components—unit and value | unit can be HOURLY , DAILY , MONTHLY , YEARLY . value has to be greater than 0.Additionally the maximum frequency value is defined is 1 request per HOUR. So, no more than 24 requests are allowed per DAY | Yes |
DataFilter | Allows you to specify conditions for filtering the data being fetched. For example, fetch transactions where the TRANSACTIONAMOUNT is greater than or equal to INR 20,000. You can use the type , operator and value keys to set the filters. | No |
redirectUrl | Redirect your users back to your application once the consent is reviewed. By default, the redirectURL is https://setu.co/ | Yes |
context | Allows you to specify an FIP OR Account type (Current, Savings, Insurance, etc) as a key value pair for you to be able to customise the accounts fetched on the consent flow. We support the context filters accounttype which takes the Key as accounttype where values can be CURRENT or SAVINGS and fipid with the FIP ID as the value(s). | No |
#Consent Response object
Property Name | Description |
---|---|
id | Unique consent reference Id generated by Setu. Use this to poll consent status or initiate data session requests. |
url | Redirect your users to Setu AA screens to initiate consent review flow using this url |
status | Consent status of the consent request id . This will be PENDING for a newly created consent. |
Usage | This field specifies lastUsed and count which corresponds to data fetches against the consent id. It is also available in Get Consent Status response. |
Was this page helpful?