Consent object

Consent object

The consent 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.

Consent object contains the 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.

⚠️

As specified in the table below, some parameters have to be passed mandatorily when creating a consent.


Consent request object

Property nameDescriptionMandatory?
consentDuration has 2 components—unit and valueThis defines the time period for which the consent is valid and can be used to fetch data. The start timestamp is assumed to be the timestamp at which the consent is created and the end timestamp is calculated based on the consentDuration provided. unit can be MONTH, YEAR, DAY.Yes, but can be skipped if consentDateRange is specified
consentDateRange has 2 components-startDate and endDateThese timestamps define the time period for which the consent is valid and can be used to fetch data. Provides the same functionality as consentDuration, hence use only one of these. If both consentDuration and consentDateRange are passed, then consentDuration takes precedence.Yes, but can be skipped if consentDuration is specified
consentModeEnum for the type of consent. Possible values are VIEW, STORE, QUERY, STREAMYes
fetchTypeEnum to specify either ONETIME or PERIODIC fetch of data.Yes
consentTypesSpecifies the type of data being requested for, from your user—
  • PROFILE—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.
  • Yes
    fiTypesSpecifies 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
    vuaVirtual user address (VUA) that identifies your customer when they login to the Account Aggregator. It should be sent in the format of [customer_mobile_number]@onemoney-aaYes
    purposeThis is used to indicate the purpose of requesting for data. As per the AA spec, the following codes are supported—
  • 101—Wealth management service
  • 102—Customer spending patterns, budget or other reportings
  • 103—Aggregated statement
  • 104—Explicit consent to monitor the accounts
  • 105—Explicit one-time consent for accessing data from the accounts
  • Yes
    dataRangeThis 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.Mandatory only if consentTypes array includes TRANSACTIONS
    dataLifeThis 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 Data life and Data Storage, please see Sahamati guidelines (opens in a new tab) (see SD001 in the table)
    Yes
    frequency has 2 components—unit and valueunit 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
    dataFilterAllows 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 like >, <, <=, >= and value like 5000 keys to set the filters.No
    redirectUrlRedirect your users back to your application once the consent is reviewed. By default, the redirectURL is https://setu.co/ (opens in a new tab).Yes
    contextAllows 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 NameDescription
    idUnique consent reference Id generated by Setu. Use this to poll consent status or initiate data session requests.
    urlRedirect your users to Setu AA screens to initiate consent review flow using this url
    statusConsent status of the consent request id. This will be PENDING for a newly created consent.
    UsageThis field specifies lastUsed and count which corresponds to data fetches against the consent id. It is also available in Get Consent Status response.