diff --git a/api-references/data/account-aggregator.json b/api-references/data/account-aggregator.json index 78a94342..db81cb22 100644 --- a/api-references/data/account-aggregator.json +++ b/api-references/data/account-aggregator.json @@ -2,10 +2,6 @@ "openapi": "3.0.2", "info": { "description": "API spec for Setu AA gateway", - "termsOfService": "", - "contact": { - "email": "aa@setu.co" - }, "title": "AA Gateway", "version": "v2" }, @@ -34,54 +30,6 @@ } ], "paths": { - "/users/login": { - "servers": [ - { - "url": "https://orgservice-prod.setu.co/v1" - } - ], - "post": { - "parameters": [ - { - "in": "header", - "name": "client", - "required": true, - "description": "", - "schema": { - "type": "string", - "enum": ["bridge"] - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenAPIResponse" - } - } - } - }, - "400": { - "$ref": "#/components/responses/BAD_REQUEST" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenAPIRequest" - } - } - } - }, - "summary": "Get Token", - "operationId": "getToken" - } - }, "/v2/fips": { "get": { "parameters": [ @@ -92,7 +40,11 @@ "description": "Status of the FIP by which the FIPs are to be filtered", "schema": { "type": "string", - "enum": ["ACTIVE", "INACTIVE", "TEMPORARILY_INACTIVE"] + "enum": [ + "ACTIVE", + "INACTIVE", + "TEMPORARILY_INACTIVE" + ] } } ], @@ -113,7 +65,9 @@ }, "summary": "Get FIP list", "description": "This API is used to get the list of FIPs.", - "tags": ["AA participants APIs"] + "tags": [ + "AA participants APIs" + ] } }, "/v2/fips/{fip_id}": { @@ -132,7 +86,9 @@ }, "summary": "Get FIP by ID", "description": "This API is used to get a FIP by its ID.", - "tags": ["AA participants APIs"], + "tags": [ + "AA participants APIs" + ], "parameters": [ { "in": "path", @@ -151,9 +107,18 @@ "parameters": [ { "in": "header", - "name": "Authorization", + "name": "x-client_id", "required": true, - "description": "Authorization Bearer token", + "description": "Client ID for authentication", + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-client-secret", + "required": true, + "description": "Client secret for authentication", "schema": { "type": "string" } @@ -203,7 +168,9 @@ }, "summary": "Create consent", "description": "This API is intended for AA Client to request generation of digitally signed consent artefacts. The customer has to use the AA application to select accounts and approve consent generation. Once the customer approves the consent request on the AA application, AA generates the digitally signed consent artefacts. Note - The AA Client never sees the account of the customer or directly participates in consent generation.\n\nNote: \u201cRequest Body Example Value\u201d and \u201cResponses Example Value\u201d given below is for illustrative purposes only.", - "tags": ["Consent V2 APIs"] + "tags": [ + "Consent V2 APIs" + ] } }, "/v2/consents/{request_id}": { @@ -263,7 +230,9 @@ }, "summary": "Get a consent", "description": "This API gets consent information using request ID.", - "tags": ["Consent V2 APIs"] + "tags": [ + "Consent V2 APIs" + ] }, "parameters": [ { @@ -324,7 +293,9 @@ }, "summary": "Revoke a consent", "description": "This API revokes a consent based on request ID.", - "tags": ["Consent V2 APIs"] + "tags": [ + "Consent V2 APIs" + ] }, "parameters": [ { @@ -394,7 +365,9 @@ } }, "summary": "Create multi consent", - "tags": ["Consent V2 APIs"] + "tags": [ + "Consent V2 APIs" + ] } }, "/v2/consents/collection/{id}": { @@ -436,7 +409,9 @@ } }, "summary": "Get multi consent", - "tags": ["Consent V2 APIs"] + "tags": [ + "Consent V2 APIs" + ] }, "parameters": [ { @@ -490,7 +465,9 @@ }, "summary": "Get last fetch status", "description": "This API gets the last data fetch status for a consent", - "tags": ["Consent V2 APIs"] + "tags": [ + "Consent V2 APIs" + ] }, "parameters": [ { @@ -561,7 +538,9 @@ }, "summary": "Create FI data fetch", "description": "This API is used to initiate a data fetch for FI data.", - "tags": ["FI data fetch V2 APIs"] + "tags": [ + "FI data fetch V2 APIs" + ] } }, "/v2/sessions/{session_id}": { @@ -611,7 +590,9 @@ }, "summary": "Get FI data", "description": "This API gets consent information using request ID.", - "tags": ["FI data fetch V2 APIs"] + "tags": [ + "FI data fetch V2 APIs" + ] }, "parameters": [ { @@ -624,41 +605,205 @@ } } ] + }, + "/v2/sessions/refresh/{session_id}": { + "get": { + "parameters": [ + { + "in": "path", + "name": "session_id", + "required": true, + "description": "The unique identifier of the session to be refreshed", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "restart", + "required": false, + "description": "Optional flag to indicate whether to restart the session. Defaults to `false` if not provided.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataRefreshSuccessResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataRefreshErrorResponse" + } + } + } + } + }, + "summary": "Refresh Data Pull", + "description": "This API refreshes an existing FI data session using the session ID. Optionally, the session can be restarted if the `restart` query parameter is provided.", + "tags": [ + "FI data fetch V2 APIs" + ] + }, + "post": { + "parameters": [ + { + "in": "path", + "name": "session_id", + "required": true, + "description": "The unique identifier of the session to be refreshed", + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshSessionRequest" + }, + "example": { + "dataRange": { + "from": "2023-07-01T00:00:00Z", + "to": "2024-11-02T00:00:00Z" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataRefreshSuccessResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataRefreshErrorResponse" + } + } + } + } + }, + "summary": "Data fetch for custom range", + "description": "This API refreshes an existing FI data session using the session ID and allows specifying a custom data range for the session.", + "tags": [ + "FI data fetch V2 APIs" + ] + } } }, "components": { "schemas": { - "TokenAPIResponse": { + "DataRefreshSuccessResponse": { "type": "object", "properties": { - "access_token": { + "message": { + "type": "string", + "description": "Confirmation message for data refresh initiation.", + "example": "Data refresh for the consent initiated successfully" + }, + "status": { "type": "string", - "description": "Bearer token" + "enum": [ + "pending", + "completed", + "failed" + ], + "description": "Current status of the data refresh request." }, - "refresh_token": { + "traceId": { "type": "string", - "description": "Bearer token" + "format": "uuid", + "description": "Unique identifier for the request trace." } }, - "required": ["access_token"] + "required": [ + "message", + "status", + "traceId" + ] }, - "TokenAPIRequest": { + "DataRefreshErrorResponse": { "type": "object", "properties": { - "clientID": { + "traceId": { "type": "string", - "description": "client_id obtained from bridge" + "format": "uuid", + "description": "Unique identifier for the request trace." }, - "grant_type": { + "errorCode": { "type": "string", - "enum": ["client_credentials"] + "description": "Error code describing the issue." }, - "secret": { + "errorMsg": { "type": "string", - "description": "client secret obtained from bridge" + "description": "Detailed error message explaining the reason for failure." } }, - "required": ["clientID", "grant_type", "secret"] + "required": [ + "traceId", + "errorCode", + "errorMsg" + ] + }, + "RefreshSessionRequest": { + "type": "object", + "properties": { + "dataRange": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "description": "The start of the data range for the refresh request." + }, + "to": { + "type": "string", + "format": "date-time", + "description": "The end of the data range for the refresh request." + } + }, + "required": [ + "from", + "to" + ], + "description": "Defines the data range for the session refresh." + } + }, + "required": [ + "dataRange" + ], + "example": { + "dataRange": { + "from": "2023-07-01T00:00:00Z", + "to": "2024-11-02T00:00:00Z" + } + } }, "FIDataFetchResponseV2": { "type": "object", @@ -703,11 +848,21 @@ }, "format": { "type": "string", - "enum": ["xml", "json"], + "enum": [ + "xml", + "json" + ], "description": "Format of decrypted data" } }, - "required": ["consentId", "dataRange", "fips", "format", "id", "status"] + "required": [ + "consentId", + "dataRange", + "fips", + "format", + "id", + "status" + ] }, "ConsentsRequestConsentDetailFIDataRange": { "type": "object", @@ -723,7 +878,10 @@ "description": "Selects the starting date-time from where the financial information is to be start. It is a mandatory field only if consentTypes includes ENUM TRANSACTIONS in consent parameters." } }, - "required": ["from", "to"] + "required": [ + "from", + "to" + ] }, "FIFetchDecrpytedResponseFIItem1": { "type": "object", @@ -738,7 +896,10 @@ } } }, - "required": ["accounts", "fipID"] + "required": [ + "accounts", + "fipID" + ] }, "FIFetchDecrpytedResponseFIItemDataItem1": { "type": "object", @@ -761,7 +922,12 @@ "type": "string" } }, - "required": ["FIstatus", "data", "linkRefNumber", "maskedAccNumber"] + "required": [ + "FIstatus", + "data", + "linkRefNumber", + "maskedAccNumber" + ] }, "FIFetchDecrpytedResponseFIItemDataItemData": { "type": "object", @@ -2963,7 +3129,13 @@ "description": "Trnsaction id of the request. Must be same value as sent in the request" } }, - "required": ["errorCode", "errorMsg", "timestamp", "txnid", "ver"], + "required": [ + "errorCode", + "errorMsg", + "timestamp", + "txnid", + "ver" + ], "additionalProperties": true }, "CreateFIDataFetchRequestV2": { @@ -2984,11 +3156,18 @@ }, "format": { "type": "string", - "enum": ["xml", "json"], + "enum": [ + "xml", + "json" + ], "description": "Format of decrypted data" } }, - "required": ["consentId", "dataRange", "format"] + "required": [ + "consentId", + "dataRange", + "format" + ] }, "MultiConsentResponse": { "type": "object", @@ -3004,7 +3183,11 @@ "type": "string" } }, - "required": ["consentCollectionId", "txnid", "url"] + "required": [ + "consentCollectionId", + "txnid", + "url" + ] }, "MultiConsentRequest": { "type": "object", @@ -3025,7 +3208,9 @@ } } }, - "required": ["mandatoryConsents"] + "required": [ + "mandatoryConsents" + ] }, "RevokeConsentResponse": { "type": "object", @@ -3043,7 +3228,9 @@ "description": "Surrogate status for this consent" } }, - "required": ["status"] + "required": [ + "status" + ] }, "ConsentResponseV2": { "type": "object", @@ -3113,7 +3300,12 @@ } } }, - "required": ["accountsLinked", "id", "status", "url"] + "required": [ + "accountsLinked", + "id", + "status", + "url" + ] }, "ConsentResponseConsentDetailAccountsItem": { "type": "object", @@ -3154,7 +3346,10 @@ "description": "Count of the number of times data has been fetched for this consent" } }, - "required": ["count", "lastUsed"] + "required": [ + "count", + "lastUsed" + ] }, "ConsentsRequestContext": { "type": "object", @@ -3179,14 +3374,20 @@ "description": "Value to key data" } }, - "required": ["key", "value"] + "required": [ + "key", + "value" + ] }, "ConsentResponseConsentDetailV2": { "type": "object", "properties": { "fetchType": { "type": "string", - "enum": ["ONETIME", "PERIODIC"], + "enum": [ + "ONETIME", + "PERIODIC" + ], "description": "FI Fetch type. Could be ONETIME or PERIODIC" }, "consentExpiry": { @@ -3227,7 +3428,11 @@ "x-minimum": 1, "items": { "type": "string", - "enum": ["PROFILE", "SUMMARY", "TRANSACTIONS"] + "enum": [ + "PROFILE", + "SUMMARY", + "TRANSACTIONS" + ] } }, "dataRange": { @@ -3281,18 +3486,31 @@ }, "consentMode": { "type": "string", - "enum": ["VIEW", "STORE", "QUERY", "STREAM"], + "enum": [ + "VIEW", + "STORE", + "QUERY", + "STREAM" + ], "description": "Consent Mode as defined in the AA Technical Specification" } }, - "required": ["consentExpiry", "consentStart"] + "required": [ + "consentExpiry", + "consentStart" + ] }, "ConsentsRequestConsentDetailDataLife": { "type": "object", "properties": { "unit": { "type": "string", - "enum": ["MONTH", "YEAR", "DAY", "INF"], + "enum": [ + "MONTH", + "YEAR", + "DAY", + "INF" + ], "description": "A unit of how long consumer can store the data" }, "value": { @@ -3300,7 +3518,10 @@ "description": "Define the value of unit of how long can consumer store the data" } }, - "required": ["unit", "value"] + "required": [ + "unit", + "value" + ] }, "ConsentsRequestConsentDetailFIDataRange1": { "type": "object", @@ -3316,14 +3537,24 @@ "description": "Start date for financial information" } }, - "required": ["from", "to"] + "required": [ + "from", + "to" + ] }, "ConsentResponseConsentDetailPurpose": { "type": "object", "properties": { "code": { "type": "string", - "enum": ["101", "102", "103", "104", "105", "106"], + "enum": [ + "101", + "102", + "103", + "104", + "105", + "106" + ], "description": "Purpose Code as defined in the AA Technical Specification " }, "text": { @@ -3338,7 +3569,9 @@ "description": "URL where the purpose is further defined" } }, - "required": ["code"] + "required": [ + "code" + ] }, "PurposeCategory1": { "type": "object", @@ -3354,12 +3587,22 @@ "properties": { "operator": { "type": "string", - "enum": ["=", "!=", ">", "<", ">=", "<="], + "enum": [ + "=", + "!=", + ">", + "<", + ">=", + "<=" + ], "description": "Operator to filter data by." }, "type": { "type": "string", - "enum": ["TRANSACTIONTYPE", "TRANSACTIONAMOUNT"], + "enum": [ + "TRANSACTIONTYPE", + "TRANSACTIONAMOUNT" + ], "description": "The condition to filter the data on." }, "value": { @@ -3367,14 +3610,24 @@ "description": "Value to filter data" } }, - "required": ["operator", "type", "value"] + "required": [ + "operator", + "type", + "value" + ] }, "ConsentsRequestConsentDetailFrequency": { "type": "object", "properties": { "unit": { "type": "string", - "enum": ["HOUR", "DAY", "MONTH", "YEAR", "INF"], + "enum": [ + "HOUR", + "DAY", + "MONTH", + "YEAR", + "INF" + ], "description": "Defines the time unit of the frequency to access the financial information." }, "value": { @@ -3382,7 +3635,10 @@ "description": "Define the number of times FI data can be fetched within the defined time unit." } }, - "required": ["unit", "value"] + "required": [ + "unit", + "value" + ] }, "CreateConsentRequestV2": { "type": "object", @@ -3401,7 +3657,10 @@ }, "fetchType": { "type": "string", - "enum": ["ONETIME", "PERIODIC"] + "enum": [ + "ONETIME", + "PERIODIC" + ] }, "context": { "type": "array", @@ -3442,7 +3701,11 @@ "x-minimum": 1, "items": { "type": "string", - "enum": ["PROFILE", "SUMMARY", "TRANSACTIONS"] + "enum": [ + "PROFILE", + "SUMMARY", + "TRANSACTIONS" + ] } }, "redirectUrl": { @@ -3497,11 +3760,19 @@ }, "consentMode": { "type": "string", - "enum": ["VIEW", "STORE", "QUERY", "STREAM"], + "enum": [ + "VIEW", + "STORE", + "QUERY", + "STREAM" + ], "description": "Consent Mode as defined in the AA Technical Specification" } }, - "required": ["dataRange", "vua"] + "required": [ + "dataRange", + "vua" + ] }, "ConsentDateRange": { "type": "object", @@ -3517,14 +3788,24 @@ "description": "Expiry date-time for the consent" } }, - "required": ["endDate", "startDate"] + "required": [ + "endDate", + "startDate" + ] }, "ConsentRequestPurpose": { "type": "object", "properties": { "code": { "type": "string", - "enum": ["101", "102", "103", "104", "105", "106"], + "enum": [ + "101", + "102", + "103", + "104", + "105", + "106" + ], "description": "Purpose Code as defined in the AA Technical Specification " }, "text": { @@ -3539,14 +3820,23 @@ "description": "URL where the purpose is further defined" } }, - "required": ["category", "code", "refUri", "text"] + "required": [ + "category", + "code", + "refUri", + "text" + ] }, "ConsentDurartion": { "type": "object", "properties": { "unit": { "type": "string", - "enum": ["MONTH", "YEAR", "DAY"], + "enum": [ + "MONTH", + "YEAR", + "DAY" + ], "description": "A unit of how long consumer can store the data" }, "value": { @@ -3554,7 +3844,10 @@ "description": "Define the value of unit of how long can consumer store the data" } }, - "required": ["unit", "value"] + "required": [ + "unit", + "value" + ] }, "FIPResponse": { "type": "object", @@ -3623,11 +3916,21 @@ "description": "Type of FIP" }, "status": { - "enum": ["ACTIVE", "INACTIVE", "TEMPORARILY_INACTIVE"], + "enum": [ + "ACTIVE", + "INACTIVE", + "TEMPORARILY_INACTIVE" + ], "description": "Current status of the FIP" } }, - "required": ["fiTypes", "fipId", "institutionType", "name", "status"] + "required": [ + "fiTypes", + "fipId", + "institutionType", + "name", + "status" + ] } }, "responses": { @@ -3643,4 +3946,4 @@ } } } -} +} \ No newline at end of file diff --git a/content/data/account-aggregator/api-integration/account-availability-apis.mdx b/content/data/account-aggregator/api-integration/account-availability-apis.mdx index a9b11929..b0cfa26a 100644 --- a/content/data/account-aggregator/api-integration/account-availability-apis.mdx +++ b/content/data/account-aggregator/api-integration/account-availability-apis.mdx @@ -13,7 +13,7 @@ The Account Availability Check API enables Financial Information Users (FIUs) to ### Authentication -FIUs must use [Auth Mechanism](/data/account-aggregator/api-reference#/operation~getToken) to obtain an access token for authentication. Include the access token in the Authorization header of each request. +FIUs must use [Auth Mechanism](/data/account-aggregator/api-reference#/operation~getToken) to obtain an access token for authentication. Include the access token in the Authorization header of some requests.
diff --git a/content/data/account-aggregator/api-integration/consent-flow.mdx b/content/data/account-aggregator/api-integration/consent-flow.mdx index 7f080bc6..80c29b05 100644 --- a/content/data/account-aggregator/api-integration/consent-flow.mdx +++ b/content/data/account-aggregator/api-integration/consent-flow.mdx @@ -619,4 +619,142 @@ To solve for these use cases, AA framework provides a way for FIUs to communicat +
+ +### Get Last Fetch Status + +This API retrieves the last data fetch status for a given consent ID. It provides details about the most recent data fetch operation associated with the consent, including the timestamp of the fetch, the data range covered, and the identifiers of the financial information providers (FIPs) involved. + +###### Request + + + + + + + + + + + + + + + + + + + + +
Base URL + Sandbox: https://fiu-sandbox.setu.co +
+ Production: https://fiu.setu.co +
Path + /v2/consents/:consent_request_id/fetch/status +
Method + GET +
Headers + Content-Type: application/json
+ Authorization: Bearer access_token
+ x-product-instance-id: product-instance-id
+ Params: consent_request_id +
+ +
+ +This is a GET API without any request body + +
+ +###### Sample Response + + + + SUCCESS, + content: ( + <> +
Response
+ + {`{ + "lastFetchedAt": "2024-11-21T07:48:16.404Z", + "dataRange": { + "from": "2022-01-01T00:00:00.000Z", + "to": "2024-06-01T00:00:00.000Z" + }, + "lastFetchedFips": [ + "setu-fip", + "setu-fip", + "setu-fip", + "setu-fip", + "setu-fip", + "setu-fip", + "setu-fip-2", + "setu-fip-2", + "setu-fip-2", + "setu-fip-2" + ], + "traceId": "1-673ee5c2-5e4e353d5d08c03372b26f6c" +}`} + + + ), + }, + { + key: "2", + label: FAIL - Wrong Product Instance ID, + content: ( + <> +
Response
+ + {`{ + "traceId": "1-673ee602-2e59a47b6fbdd39138066e6c", + "errorCode": "NotFound", + "errorMsg": "Config not found for provided product instance. Please check the product instance id" +}`} + + + ), + }, + { + key: "3", + label: FAIL - Consent not found, + content: ( + <> +
Response
+ + {`{ + "traceId": "1-673ee626-6e113df859cc8d1b4469957f", + "errorCode": "NotFound", + "errorMsg": "Consent not found" +}`} + + + ), + }, + { + key: "4", + label: FAIL - No Date Sessions Fetched yet, + content: ( + <> +
Response
+ + {`{ + "consentId": "4a2e2ba2-3285-4242-b05a-e4ccdd4679a1", + "dataSessions": [], + "traceId": "1-673ee63f-107b2a674068fc237a10d52c" +}`} + + + ), + }, + ]} + /> +
+
+ diff --git a/content/data/account-aggregator/consent-object.mdx b/content/data/account-aggregator/consent-object.mdx index 7cb3b581..8e45f407 100644 --- a/content/data/account-aggregator/consent-object.mdx +++ b/content/data/account-aggregator/consent-object.mdx @@ -12,37 +12,37 @@ The consent object is the core of the AA framework. When an FIU requires data ab 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. + As specified in the table below, some parameters have to be passed mandatorily + when creating a consent.
### Consent request object -| Property name | Description | Mandatory? | -| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | -| `consentDuration` has 2 components—`unit` and `value` | This 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 `endDate` | These 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 | -| `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. | Yes | -| `consentTypes` | Specifies 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 | -| `fiTypes` | Specifies 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 | -| `vua` | Virtual 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-aa** | 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 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 | -| `dataRange` | 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`. | Mandatory | -| `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 Data life and Data Storage, please see [Sahamati guidelines](https://sahamati.org.in/aa-community-guidelines-v1/storage-of-data/) (see SD001 in the table) | 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` like `>, <, <=, >=` and `value` like `5000` 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 | +| Property name | Description | Mandatory? | +| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | +| `consentDuration` has 2 components—`unit` and `value` | This 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 `endDate` | These 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 | +| `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. | Yes | +| `consentTypes` | Specifies 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 | +| `fiTypes` | Specifies 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 | +| `vua` | Virtual 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-aa** | 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 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 | +| `dataRange` | 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`. | Mandatory | +| `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 Data life and Data Storage, please see [Sahamati guidelines](https://sahamati.org.in/aa-community-guidelines-v1/storage-of-data/) (see SD001 in the table) | 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` like `>, <, <=, >=` and `value` like `5000` 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 | #### Context property examples **Filter by account type** - {`"context": [ + {`"context": [ { "key": "accounttype", "value": "CURRENT" @@ -53,7 +53,7 @@ Consent object contains the information about all the different types of data th **Filter by FIP ids** - {`"context": [ + {`"context": [ { "key": "fipId", "value": "setu-fip,icici-fip" @@ -64,7 +64,7 @@ Consent object contains the information about all the different types of data th **Filter by excluding FIP ids** - {`"context": [ + {`"context": [ { "key": "excludeFipIds", "value": "setu-fip,icici-fip" diff --git a/content/data/account-aggregator/v1/consent-object.mdx b/content/data/account-aggregator/v1/consent-object.mdx index 5a24a082..d2d0f78f 100644 --- a/content/data/account-aggregator/v1/consent-object.mdx +++ b/content/data/account-aggregator/v1/consent-object.mdx @@ -19,7 +19,7 @@ This consent object carries information about all the different types of data th | `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 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, 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 | +| `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 **@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 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(single option) |