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.
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
+ |
+