Skip to content

Instantly share code, notes, and snippets.

@itsbalamurali
Created September 25, 2019 11:00
Show Gist options
  • Save itsbalamurali/7f103d370483d82449ecf2c2cc8428d4 to your computer and use it in GitHub Desktop.
Save itsbalamurali/7f103d370483d82449ecf2c2cc8428d4 to your computer and use it in GitHub Desktop.
RBI AA Swagger
{
"swagger": "2.0",
"info": {
"title": "Account Aggregator API",
"x-custom-tags": {
"x-changelog": "<p>\n1. Updated /FI/Notification to support Partial Fetch Usecase<br>\n2. New Enums Added for FIStatus - READY / DENIED / PENDING / DELIVERED / TIMEOUT<br>\n3. Updated /FI/Fetch to support Query Params<br>\ni) /FI/Fetch/{SessionID} - All accounts & FIP in the session<br>\nii) /FI/Fetch/{SessionID}?fipid=fip1 - All Accounts with the FIP<br>\niii) /FI/Fetch/{SessionID}?fipid=fip1&linkRefNumber=123456985321 - Particular Account<br>\niv) /FI/Fetch/{SessionID}?fipid=fip1&linkRefNumber=123456985321&linkRefNumber=1236548972 - Multiple Accounts Same FIP<br>\nNote's: <br>\ni) fipid in Query Params is limited to only 1<br>\nii) All variations will give response containing accounts whose data has been delivered or not received. Such accounts would have encryptedFI and KeyMaterials empty<br>\n</p>",
"x-api-name": "Account Aggregator (AA) API"
},
"description": "# Summary\n The Account Aggregator (AA) serves as an intermediary between Financial Information Providers (such as banks, securities, insurance, pensions and other account/finance management service providers) and Financial Information Users. This Application Programming Interface enables AA to manage the lifecycle of consent artefacts, mediates the secure flow of financial information from FIPs to FIUs based on explicit user consent and exposes Notification method so that FIU and FIP can notify it about the events generated during consent flow and data flow. All consent necessarily have to be generated directly on application provided by AA. \n \n For further details please refer to:\n \n \n\n\n1. [Account Aggregator Ecosystem APIs ](https://api.rebit.org.in/group)\n2. NBFC Account Aggregator, Technical Standards (coming soon)\n3. Reserve Bank of India (RBI). Master Direction- Non-Banking Financial Company - Account Aggregator (Reserve Bank) Directions. RBI/DNBR/2016-17/46, Master Direction [DNBR.PD.009/03.10.119/2016-17. 2016 ](https://rbidocs.rbi.org.in/rdocs/notification/PDFs/MD46859213614C3046C1BF9B7CF563FF1346.PDF) (Updated 2017).\n4. ReBIT’s SDO Page [TODO]\n\n---",
"version": "1.1.1",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"contact": {
"email": "sdo@rebit.org.in"
}
},
"tags": [
{
"name": "Consent Flow",
"description": "Consent Management APIs"
},
{
"name": "Data Flow",
"description": "APIs for aggregation of FI"
},
{
"name": "Notifications",
"description": "This API is used by the FIPs and FIUs to submit notifications to the AA."
},
{
"name": "Monitoring",
"description": "Monitoring API Interface for checking availability of AA."
}
],
"schemes": [
"https"
],
"securityDefinitions": {
"Client_api_key": {
"type": "apiKey",
"name": "client_api_key",
"in": "header"
},
"FIP_api_key": {
"type": "apiKey",
"name": "fip_api_key",
"in": "header"
}
},
"security": [
{
"Client_api_key": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/Consent": {
"post": {
"tags": [
"Consent Flow"
],
"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.",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ConsentsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ConsentsResponse"
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/Consent/handle/{consentHandle}": {
"get": {
"tags": [
"Consent Flow"
],
"description": "This API is intended for checking the status of a previously submitted Consent Artefacts creation request",
"parameters": [
{
"name": "consentHandle",
"in": "path",
"required": true,
"description": "A handle provided to the AA client that is later used to obtain the consent once generated.",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"ConsentHandle"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "795038d3-86fb-4d3a-a681-2d39e8f4fc3c",
"xml": {
"attribute": true
}
},
"ConsentHandle": {
"type": "string",
"example": "39e108fe-9243-11e8-b9f2-0256d88baae8",
"description": "Generate the consent handle id on the request of customer"
},
"ConsentStatus": {
"$ref": "#/definitions/Consent"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/Consent/{id}": {
"get": {
"tags": [
"Consent Flow"
],
"security": [
{
"FIP_api_key": []
},
{
"Client_api_key": []
}
],
"description": "This API is intended for fetching the information associated with the specific consent.",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "The id of the Consent Artefact to retrieve",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ConsentArtefact"
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/FI/request": {
"post": {
"tags": [
"Data Flow"
],
"description": "The FIU or the User submits the Consent IDs of the consents required for fetching financial information from the FIP(s). A set of sessionIds are generated and returned. These SessionIDs enable the FIU or the User to fetch the information from the AA once available.",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/FIRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/FIResponse"
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/FI/fetch/{sessionId}": {
"get": {
"tags": [
"Data Flow"
],
"description": "Once FIU receives the notification <Data-Ready> from AA, using digitally signed consent request received from AA, this API can be used to fetch the financial information from the AA.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"required": true,
"type": "string",
"description": "Session ID for the FI Request Session"
},
{
"name": "fipId",
"in": "query",
"type": "string",
"required": false,
"description": "FIP ID as defined in the Account Aggregator Ecosystem. Maximum 1."
},
{
"name": "linkRefNumber",
"in": "query",
"type": "array",
"required": false,
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
},
"description": "linkRefNumber/s for the accounts to be fetched from particular FIP. Supports more than 1."
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/FIFetchResponse"
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/Consent/Notification": {
"post": {
"tags": [
"Notifications"
],
"description": "",
"security": [
{
"Client_api_key": []
},
{
"FIP_api_key": []
}
],
"parameters": [
{
"name": "body",
"required": true,
"in": "body",
"schema": {
"$ref": "#/definitions/ConsentStatusNotification"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/FI/Notification": {
"post": {
"tags": [
"Notifications"
],
"description": "",
"security": [
{
"Client_api_key": []
},
{
"FIP_api_key": []
}
],
"parameters": [
{
"name": "body",
"required": true,
"in": "body",
"schema": {
"$ref": "#/definitions/FIStatusNotification"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/Account/link/Notification": {
"post": {
"tags": [
"Notifications"
],
"description": "",
"security": [
{
"Client_api_key": []
},
{
"FIP_api_key": []
}
],
"parameters": [
{
"name": "body",
"required": true,
"in": "body",
"schema": {
"$ref": "#/definitions/AccountLinkStatusNotification"
}
}
],
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/Heartbeat": {
"get": {
"tags": [
"Monitoring"
],
"description": "This API is used by FIUs to check availability of AAs",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/HeartbeatResponse"
}
},
"401": {
"description": "Unauthorized"
},
"500": {
"description": "Internal Server Error"
}
}
}
}
},
"definitions": {
"ConsentsRequest": {
"type": "object",
"xml": {
"name": "Consent",
"namespace": "http://standards.rebit.org.in/aa"
},
"description": "This call generated via AA client.",
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"example": "4a4adbbe-29ae-11e8-a8d7-0289437bf331",
"description": "The transaction identifier generated by the requester for providing an end to end traceability. The AA should use this transaction identifier in the responses and notifications for FIU to correlate response with the request. The transaction identifier will be a UUID generated string.",
"xml": {
"attribute": true
}
},
"ConsentDetail": {
"type": "object",
"description": "Specify the financial information types that customer wants to access",
"required": [
"consentStart",
"consentExpiry",
"consentMode",
"fetchType",
"consentTypes",
"fiTypes",
"DataConsumer",
"Customer",
"Purpose",
"FIDataRange",
"DataLife",
"Frequency",
"DataFilter"
],
"properties": {
"consentStart": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T11:39:57.153Z",
"description": "Start date-time of the consent. This field would allow for Post-Dated consent.",
"xml": {
"attribute": true
}
},
"consentExpiry": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T11:39:57.153Z",
"description": "Expiry date-time for the consent",
"xml": {
"attribute": true
}
},
"consentMode": {
"type": "string",
"description": "Consent Mode as defined in the AA technical Standards",
"enum": [
"VIEW",
"STORE",
"QUERY",
"STREAM"
],
"xml": {
"attribute": true
}
},
"fetchType": {
"type": "string",
"description": "FI Fetch type. Could be ONETIME or PERIODIC",
"enum": [
"ONETIME",
"PERIODIC"
],
"xml": {
"attribute": true
}
},
"consentTypes": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": [
"TRANSACTIONS",
"PROFILE",
"BALANCE"
],
"example": "BALANCE"
},
"xml": {
"attribute": true
}
},
"fiTypes": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"description": "List of FITypes used in the Consent. FITypes names should be as defined in the AA Technical Standards",
"example": "DEPOSIT",
"enum": [
"DEPOSIT",
"TERM-DEPOSIT",
"RECURRING_DEPOSIT",
"SIP",
"CP",
"GOVT_SECURITIES",
"EQUITIES",
"BONDS",
"DEBENTURES",
"MUTUAL_FUNDS",
"ETF",
"IDR",
"CIS",
"AIF",
"INSURANCE_POLICIES",
"NPS",
"INVIT",
"REIT",
"OTHER"
]
}
},
"DataConsumer": {
"type": "object",
"required": [
"id"
],
"description": "Contains the FIU id",
"properties": {
"id": {
"type": "string",
"example": "fiu7465374537id",
"description": "The identifier of the FIU",
"xml": {
"attribute": true
}
}
}
},
"Customer": {
"type": "object",
"required": [
"id"
],
"description": "Contains the customer address",
"properties": {
"id": {
"type": "string",
"example": "customer_identifier@AA_identifier",
"description": "The identifier of the Customer can be generated during the registration with AA",
"xml": {
"attribute": true
}
}
}
},
"Purpose": {
"$ref": "#/definitions/Purpose"
},
"FIDataRange": {
"type": "object",
"required": [
"from",
"to"
],
"description": "Specify the datetime range for querying the financial information",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Selects the starting date-time from where the financial information is to be start",
"xml": {
"attribute": true
}
},
"to": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T11:39:57.153Z",
"description": "Selects the ending date-time from where the financial information is to be end",
"xml": {
"attribute": true
}
}
}
},
"DataLife": {
"description": "How long consumer is allowed to store data",
"type": "object",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"type": "string",
"description": "A unit of how long consumer can store the data",
"xml": {
"attribute": true
},
"enum": [
"MONTH",
"YEAR",
"DATE",
"INF"
]
},
"value": {
"type": "string",
"description": "Define the value of unit of how long can consumer store the data",
"xml": {
"attribute": true
}
}
}
},
"Frequency": {
"description": "Frequency information for periodic information access",
"type": "object",
"required": [
"unit"
],
"properties": {
"unit": {
"type": "string",
"description": "A unit of the frequency to access the financial information",
"xml": {
"attribute": true
},
"enum": [
"MONTH",
"YEAR",
"DATE",
"INF"
]
},
"value": {
"type": "integer",
"description": "Define how many time consumer can access the financial information",
"xml": {
"attribute": true
}
}
}
},
"DataFilter": {
"type": "array",
"description": "rules that will be utilized by FIP to filter the data",
"items": {
"type": "object",
"required": [
"type",
"operator",
"value"
],
"properties": {
"type": {
"type": "string",
"description": "The condition to filter the data on.",
"enum": [
"TRANSACTIONTYPE",
"TRANSACTIONAMOUNT"
],
"example": "TRANSACTIONAMOUNT",
"xml": {
"attribute": true
}
},
"operator": {
"type": "string",
"description": "Operator to filter data by.",
"enum": [
"=",
"!=",
">",
"<",
">=",
"<="
],
"example": ">=",
"xml": {
"attribute": true
}
},
"value": {
"type": "string",
"description": "Value to filter data",
"example": 20000,
"xml": {
"attribute": true
}
}
}
},
"xml": {
"name": "DataFilter"
}
}
}
}
},
"required": [
"ver",
"timestamp",
"txnid",
"ConsentDetail"
]
},
"ConsentsResponse": {
"type": "object",
"required": [
"ver",
"txnid",
"timestamp",
"Customer",
"ConsentHandle"
],
"xml": {
"name": "ConsentsResponse",
"namespace": "http://standards.rebit.org.in/aa"
},
"description": "This is a response to the RequestConsent API call",
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "Version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"example": "4a4adbbe-29ae-11e8-a8d7-0289437bf331",
"description": "The transaction identifier that was sent in the request is echoed back to the client for providing an end to end traceability.",
"xml": {
"attribute": true
}
},
"Customer": {
"type": "object",
"required": [
"id"
],
"description": "Contains the customer address",
"properties": {
"id": {
"type": "string",
"example": "customer_identifier@AA_identifier",
"description": "The identifier of the Customer can be generated during the registration with AA",
"xml": {
"attribute": true
}
}
}
},
"ConsentHandle": {
"type": "string",
"format": "byte",
"example": "39e108fe-9243-11e8-b9f2-0256d88baae8",
"description": "Generate the consent handle id on the request of customer"
}
}
},
"FIRequest": {
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"FIDataRange",
"Consent",
"KeyMaterial"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"xml": {
"attribute": true
}
},
"FIDataRange": {
"type": "object",
"required": [
"from",
"to"
],
"description": "Specify the datetime range for querying the financial information",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Selects the starting date-time from where the financial information is to be start",
"xml": {
"attribute": true
}
},
"to": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T11:39:57.153Z",
"description": "Selects the ending date-time from where the financial information is to be end",
"xml": {
"attribute": true
}
}
}
},
"Consent": {
"type": "object",
"required": [
"id",
"digitalSignature"
],
"properties": {
"id": {
"type": "string",
"description": "Contains consent id which is base-64 encoded unique string",
"example": "654024c8-29c8-11e8-8868-0289437bf331",
"xml": {
"attribute": true
}
},
"digitalSignature": {
"type": "string",
"format": "byte",
"description": "Digital Signature of the ConsentDetail Section after generation. The receiver has to verify the given signature by generating signature from the received ConsentDetail section. 'https://www.w3.org/TR/xmldsig-core1/'",
"example": "Digital signature of the consentDetail section in the consent Artefact"
}
}
},
"KeyMaterial": {
"$ref": "#/definitions/KeyMaterial",
"description": "A key material for session",
"xml": {
"name": "KeyMaterial"
}
}
},
"xml": {
"name": "FIRequest"
}
},
"FIResponse": {
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"consentId",
"sessionId"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "e8cc6822-d4bb-4eb1-9e1b-4996fbff8acb",
"xml": {
"attribute": true
}
},
"consentId": {
"type": "string",
"description": "Consent ID of the consent artefact for which the session has been created.",
"example": "654024c8-29c8-11e8-8868-0289437bf331",
"xml": {
"attribute": true
}
},
"sessionId": {
"type": "string",
"format": "byte",
"description": "A session ID is a base-64 encoded UUID number that an AA assigns to a specific user for reuesting the financial information access. It is also used for logging and tracking an end-to-end financial information sharing with customer",
"example": "caa2f259-2dc2-4075-87aa-6d81018b6183",
"xml": {
"attribute": true
}
}
}
},
"Account": {
"type": "object",
"description": "Defined the kind of FI data for which consent is being sought.",
"xml": {
"wrapped": true,
"name": "Data"
},
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "An unique sequence number allows to mapping requested customer's data with the data access properties in the data items",
"xml": {
"attribute": true
}
},
"type": {
"type": "string",
"description": "Define which types of customer's financial information need to be access",
"enum": [
"TRANSACTIONAL",
"PROFILE",
"BALANCE"
],
"xml": {
"attribute": true
}
},
"Access": {
"type": "object",
"description": "Define the accessing types on the customer's finanical inforamtion",
"required": [
"mode"
],
"properties": {
"mode": {
"type": "string",
"enum": [
"VIEW",
"STORE",
"QUERY",
"STREAM"
],
"xml": {
"attribute": true
}
}
},
"xml": {
"name": "Access"
}
},
"DateTimeRange": {
"description": "Define the period for the customer's finanical inforamtion is to be requested",
"type": "object",
"required": [
"from",
"to"
],
"properties": {
"from": {
"type": "string",
"format": "date-time",
"description": "Start date for financial statements beginning",
"xml": {
"attribute": true
},
"example": "2017-07-13T11:33:34.509Z"
},
"to": {
"type": "string",
"format": "date-time",
"description": "End date for financial statements ending",
"xml": {
"attribute": true
},
"example": "2018-07-13T11:33:34.509Z"
}
}
},
"DataLife": {
"description": "How long consumer is allowed to store data",
"type": "object",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"type": "string",
"description": "A unit of how long consumer can stored the data",
"xml": {
"attribute": true
},
"enum": [
"MONTH",
"YEAR",
"DATE",
"INF"
]
},
"value": {
"type": "string",
"description": "Define the value of unit of how long can consumer is stored the data",
"xml": {
"attribute": true
}
}
}
},
"Frequency": {
"description": "Frequency information for periodic information access",
"type": "object",
"required": [
"unit"
],
"properties": {
"unit": {
"type": "string",
"description": "Define the frequency for repeating access of the financial information",
"enum": [
"DAILY",
"MONTHLY",
"YEARLY"
],
"xml": {
"attribute": true
}
},
"value": {
"type": "string",
"description": "Define the value of unit on how many can consumer can make a request within defined unit of frequency",
"xml": {
"attribute": true
}
}
},
"xml": {
"name": "Frequency"
}
},
"Datafilter": {
"type": "object",
"description": "Data access filter, any encoded query string as per financial information provider API needs"
}
}
},
"Error": {
"type": "object",
"description": "The error code is a unique string that identifies the error.",
"required": [
"errCode",
"errMsg"
],
"properties": {
"code": {
"type": "integer",
"description": "Unique error response code",
"xml": {
"attribute": true
}
},
"msg": {
"type": "string",
"description": "Error Message",
"xml": {
"attribute": true
}
},
"detail": {
"type": "string",
"description": "Description of the specific error",
"xml": {
"attribute": true
}
}
}
},
"Consent": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"description": "Consent ID of the generated consent",
"example": "654024c8-29c8-11e8-8868-0289437bf331",
"xml": {
"attribute": true
}
},
"status": {
"type": "string",
"description": "Specifiy the status of consent artefact",
"enum": [
"READY",
"FAILED",
"PENDING"
],
"xml": {
"attribute": true
}
}
},
"xml": {
"name": "Consent"
},
"description": "Contains the consent artefact related information"
},
"ConsentArtefact": {
"type": "object",
"required": [
"ver",
"txnid",
"consentId",
"createTimestamp",
"ConsentDetail",
"consentDetailDigitalSignature",
"ConsentUse",
"status"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "Version of the AA Ecosystem API's",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "0b811819-9044-4856-b0ee-8c88035f8858",
"xml": {
"attribute": true
}
},
"consentId": {
"type": "string",
"description": "The unique ID of the consent artefact",
"example": "XXXX-XXXX-XXXX-XXXX",
"xml": {
"attribute": true
}
},
"status": {
"type": "string",
"description": "Current Status of the Consent",
"enum": [
"ACTIVE",
"PAUSED",
"REVOKED",
"EXPIRED"
]
},
"createTimestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation time of the consent artefact",
"xml": {
"attribute": true
}
},
"ConsentDetail": {
"type": "object",
"description": "This Section defines the consent and should be digitally signed. CAN NOT CHANGE after generation, for any change a new consent has to be generated.",
"required": [
"consentStart",
"consentExpiry",
"consentMode",
"fetchType",
"consentTypes",
"fiTypes",
"DataConsumer",
"DataProvider",
"Customer",
"Purpose",
"FIDataRange",
"DataLife",
"Frequency",
"Accounts",
"DataFilter"
],
"properties": {
"consentStart": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T11:39:57.153Z",
"description": "Start date-time of the consent. This field would allow for Post-Dated consent.",
"xml": {
"attribute": true
}
},
"consentExpiry": {
"type": "string",
"format": "date-time",
"example": "2019-12-06T11:39:57.153Z",
"description": "Expiry date-time for the consent",
"xml": {
"attribute": true
}
},
"consentMode": {
"type": "string",
"description": "Consent Mode as defined in the AA technical Standards",
"enum": [
"VIEW",
"STORE",
"QUERY",
"STREAM"
],
"xml": {
"attribute": true
}
},
"fetchType": {
"type": "string",
"description": "FI Fetch type. Could be ONETIME or PERIODIC",
"enum": [
"ONETIME",
"PERIODIC"
],
"xml": {
"attribute": true
}
},
"consentTypes": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"enum": [
"TRANSACTIONS",
"PROFILE",
"BALANCE"
],
"example": "BALANCE"
}
},
"fiTypes": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"description": "List of FITypes used in the Consent. FITypes names should be as defined in the AA Technical Standards",
"example": "DEPOSIT"
}
},
"DataConsumer": {
"type": "object",
"description": "Dataconsumer ID. For a consent between FIP & AA, Dataconsumer would be AA whereas for a consent between FIU/AA Application & AA, Dataconsumer would be FIU/AA Application.",
"properties": {
"id": {
"type": "string",
"description": "DataConsumer ID",
"example": "DC1",
"xml": {
"attribute": true
}
},
"type": {
"type": "string",
"description": "Type of DataConsumer",
"enum": [
"FIU",
"AA"
],
"example": "AA"
}
}
},
"DataProvider": {
"type": "object",
"description": "DataProvider ID. For a consent between FIP & AA, DataProvider would be FIP whereas for a consent between FIU/AA Application & AA, DataProvider would be AA.",
"properties": {
"id": {
"type": "string",
"description": "DataProvider ID",
"example": "DP1",
"xml": {
"attribute": true
}
},
"type": {
"type": "string",
"description": "Type of DataConsumer",
"enum": [
"FIP",
"AA"
],
"example": "FIP"
}
}
},
"Customer": {
"type": "object",
"description": "Address of the end customer",
"properties": {
"id": {
"type": "string",
"description": "Customer Address",
"example": "customer_identifier@AA_identifier",
"xml": {
"attribute": true
}
}
}
},
"Accounts": {
"type": "array",
"description": "List of accounts which the consent would fetch FI from. For a consent between FIU & AA, this list could have accounts from multiple FIP. For a consent between FIP & AA, only accounts from particular FIP must be present in this section.",
"items": {
"type": "object",
"properties": {
"fiType": {
"type": "string",
"description": "Type of Financial Information",
"example": "DEPOSIT",
"xml": {
"attribute": true
}
},
"fipId": {
"type": "string",
"description": "FIP ID",
"example": "FIP1",
"xml": {
"attribute": true
}
},
"accType": {
"type": "string",
"description": "Type of Account",
"example": "SAVINGS",
"xml": {
"attribute": true
}
},
"linkRefNumber": {
"type": "string",
"description": "FIP's linkRefNumber as shared by the FIP after linking",
"example": "XXXX-XXXX-XXXX",
"xml": {
"attribute": true
}
},
"maskedAccNumber": {
"type": "string",
"description": "Masked account number",
"example": "XXXXXXXX4020",
"xml": {
"attribute": true
}
}
}
},
"xml": {
"name": "Accounts"
}
},
"Purpose": {
"$ref": "#/definitions/Purpose"
},
"FIDataRange": {
"description": "Data Range (Datetime) for the Financial Information Requested",
"type": "object",
"required": [
"from",
"to"
],
"properties": {
"from": {
"type": "string",
"format": "date-time",
"description": "Start date for financial information",
"xml": {
"attribute": true
},
"example": "2017-07-13T11:33:34.509Z"
},
"to": {
"type": "string",
"format": "date-time",
"description": "End date for financial information",
"xml": {
"attribute": true
},
"example": "2018-07-13T11:33:34.509Z"
}
}
},
"DataLife": {
"description": "Datalife defines for how long can the FIU/AA Application store the data",
"type": "object",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"type": "string",
"description": "A unit of how long consumer can store the data.",
"xml": {
"attribute": true
},
"enum": [
"DAY",
"MONTH",
"YEAR",
"INF"
]
},
"value": {
"type": "number",
"description": "Value for the Datalife Unit. If INF, value must be set to 0.",
"xml": {
"attribute": true
}
}
}
},
"Frequency": {
"description": "Frequency of data request. Could be defined in HOUR/DAY/MONTH/YEAR.",
"type": "object",
"required": [
"unit",
"value"
],
"properties": {
"unit": {
"type": "string",
"description": "Define the frequency for repeating access of the financial information",
"enum": [
"HOUR",
"DAY",
"MONTH",
"YEAR"
],
"xml": {
"attribute": true
}
},
"value": {
"type": "number",
"description": "Define the value of unit on how many can consumer can make a request within defined unit of frequency",
"xml": {
"attribute": true
}
}
},
"xml": {
"name": "Frequency"
}
},
"DataFilter": {
"type": "array",
"description": "rules that will be utilized by FIP to filter the data",
"items": {
"type": "object",
"required": [
"type",
"operator",
"value"
],
"properties": {
"type": {
"type": "string",
"description": "The condition to filter the data on.",
"enum": [
"TRANSACTIONTYPE",
"TRANSACTIONAMOUNT"
],
"example": "TRANSACTIONAMOUNT",
"xml": {
"attribute": true
}
},
"operator": {
"type": "string",
"description": "Operator to filter data by.",
"enum": [
"=",
"!=",
">",
"<",
">=",
"<="
],
"example": ">=",
"xml": {
"attribute": true
}
},
"value": {
"type": "string",
"description": "Value to filter data",
"example": 20000,
"xml": {
"attribute": true
}
}
}
},
"xml": {
"name": "DataFilter"
}
}
}
},
"consentDetailDigitalSignature": {
"type": "string",
"format": "byte",
"description": "Digital Signature of the ConsentDetail Section after generation. The receiver has to verify the given signature by generating signature from the received ConsentDetail section. 'https://www.w3.org/TR/xmldsig-core1/'",
"example": "Signature of AA as defined in W3C standards; Base64 encoded"
},
"ConsentUse": {
"type": "object",
"description": "Section defining the parameters for consent tracking",
"required": [
"logUri",
"count",
"lastUseDateTime"
],
"properties": {
"logUri": {
"type": "string",
"description": "Logging; logUri can be any valid URI including an email address",
"xml": {
"attribute": true
}
},
"count": {
"type": "number",
"description": "Number of times the consent has been used",
"example": 1,
"xml": {
"attribute": true
}
},
"lastUseDateTime": {
"type": "string",
"format": "date-time",
"description": "Consent Last Used Datetime",
"example": "2018-12-06T11:39:57.153Z",
"xml": {
"attribute": true
}
}
}
}
},
"xml": {
"name": "ConsentArtefact",
"namespace": "http://standards.rebit.org.in/aa"
}
},
"KeyMaterial": {
"type": "object",
"required": [
"cryptoAlg",
"Nonce",
"Signature"
],
"description": "Contains the cryptographic parameters that are required to perfrom End-to-End encryption for sharing the financial information between the producer and the consumer in a secure manner. Please refere this link for more information: https://tools.ietf.org/html/rfc4492",
"properties": {
"cryptoAlg": {
"type": "string",
"xml": {
"attribute": true
},
"example": "ECDHE",
"description": "The encryption algorithms supported by this service. Currently ECDHE is a crypto algorithm that is supported."
},
"curve": {
"type": "string",
"xml": {
"attribute": true
},
"example": "Curve25519",
"description": "Describes a secure elliptic curve standard that is used to perform ECDHE. Currently Curve25519 is supported"
},
"params": {
"type": "string",
"xml": {
"attribute": true
},
"description": " Specifies the elliptic curve domain parameters associated with the ECDH public key. Use Key-Value pair separated by a semicolon. For example: hashing function, encoding techniques, ECDH public parameters etc."
},
"DHPublicKey": {
"type": "object",
"required": [
"expiry"
],
"description": "Contains the public information for perfomring the key exchange. For example: Diffie–Hellman key exchange (DH)",
"properties": {
"expiry": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Specify an expiry date of the public key.",
"xml": {
"attribute": true
}
},
"Parameters": {
"type": "string",
"description": "Defines the public paramters used to calculate session (data encryption) key. For exapmle: Ephemeral public key"
},
"KeyValue": {
"type": "string",
"description": "Contains the value of emphemeral public key"
}
}
},
"Nonce": {
"type": "integer",
"description": "Nonce is a random or pseudo-random numbers generated every time during the publishing of Ephemeral public key to ensure that old communications cannot be reused in replay attacks"
},
"Signature": {
"type": "string",
"format": "byte",
"description": "Refers the signature standard for more information: https://www.w3.org/TR/xmldsig-core1/",
"example": "Signature as defined in W3C standards; Base64 encoded"
}
},
"xml": {
"name": "KeyMaterial"
}
},
"ConsentStatusNotification": {
"description": "",
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"Notifier",
"ConsentStatusNotification"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "0b811819-9044-4856-b0ee-8c88035f8858",
"xml": {
"attribute": true
}
},
"Notifier": {
"type": "object",
"description": "Information about the notifier",
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"description": "",
"example": "FIP",
"xml": {
"attribute": true
}
},
"id": {
"type": "string",
"description": "Value of the destination address for locating the resource to maintain the logs",
"example": "FIP-1",
"xml": {
"attribute": true
}
}
}
},
"ConsentStatusNotification": {
"type": "object",
"description": "Selects a type of Data-flow events , Consent-flow events, and Account discovery flow events",
"required": [
"consentId",
"consentStatus"
],
"properties": {
"consentId": {
"type": "string",
"example": "XXXX0-XXXX-XXXX",
"xml": {
"attribute": true
}
},
"consentStatus": {
"type": "string",
"enum": [
"ACTIVE",
"REVOKED",
"PAUSED",
"REJECTED"
],
"example": "REJECTED",
"xml": {
"attribute": true
}
}
},
"xml": {
"name": "ConsentStatusNotification"
}
}
}
},
"FIStatusNotification": {
"description": "",
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"Notifier",
"FIStatusNotification"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "0b811819-9044-4856-b0ee-8c88035f8858",
"xml": {
"attribute": true
}
},
"Notifier": {
"type": "object",
"description": "Information about the notifier",
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"description": "",
"example": "FIP",
"xml": {
"attribute": true
}
},
"id": {
"type": "string",
"description": "Value of the destination address for locating the resource to maintain the logs",
"example": "FIP-1",
"xml": {
"attribute": true
}
}
}
},
"FIStatusNotification": {
"type": "object",
"description": "Selects a type of Data-flow events , Consent-flow events, and Account discovery flow events",
"required": [
"sessionId",
"sessionStatus",
"FIStatusResponse"
],
"properties": {
"sessionId": {
"type": "string",
"example": "XXXX0-XXXX-XXXX",
"xml": {
"attribute": true
}
},
"sessionStatus": {
"type": "string",
"example": "ACTIVE",
"enum": [
"ACTIVE",
"COMPLETED",
"EXPIRED",
"FAILED"
]
},
"FIStatusResponse": {
"type": "array",
"items": {
"type": "object",
"required": [
"fipID",
"Accounts"
],
"properties": {
"fipID": {
"type": "string",
"example": "FIP-1"
},
"Accounts": {
"type": "array",
"items": {
"type": "object",
"required": [
"linkRefNumber",
"FIStatus",
"description"
],
"properties": {
"linkRefNumber": {
"type": "string",
"example": "XXXX-XXXX-XXXX"
},
"FIStatus": {
"type": "string",
"enum": [
"READY",
"DENIED",
"PENDING",
"DELIVERED",
"TIMEOUT"
],
"example": "READY",
"xml": {
"attribute": true
}
},
"description": {
"type": "string",
"example": ""
}
}
}
}
}
}
}
}
}
}
},
"AccountLinkStatusNotification": {
"description": "",
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"Notifier",
"AccountLinkStatusNotification"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "0b811819-9044-4856-b0ee-8c88035f8858",
"xml": {
"attribute": true
}
},
"Notifier": {
"type": "object",
"description": "Information about the notifier",
"required": [
"type",
"id"
],
"properties": {
"type": {
"type": "string",
"description": "",
"example": "FIP",
"xml": {
"attribute": true
}
},
"id": {
"type": "string",
"description": "Value of the destination address for locating the resource to maintain the logs",
"example": "FIP-1",
"xml": {
"attribute": true
}
}
}
},
"AccountLinkStatusNotification": {
"type": "object",
"description": "Selects a type of Data-flow events , Consent-flow events, and Account discovery flow events",
"required": [
"accRefNumber",
"customerAddress",
"linkRefNumber",
"linkStatus"
],
"properties": {
"accRefNumber": {
"type": "string",
"example": "XXXX0-XXXX-XXXX",
"xml": {
"attribute": true
}
},
"customerAddress": {
"type": "string",
"example": "customer_identifier@aa_identifier"
},
"linkRefNumber": {
"type": "string",
"example": "XXXX-XXXX-XXXX"
},
"linkStatus": {
"type": "string",
"enum": [
"LINKED"
],
"example": "LINKED",
"xml": {
"attribute": true
}
}
},
"xml": {
"name": "AccountLinkStatusNotification"
}
}
}
},
"Purpose": {
"description": "Purpose of the consent (Defined in AA Technical Standards)",
"type": "object",
"required": [
"code",
"refUri"
],
"properties": {
"code": {
"type": "string",
"description": "Purpose Code as defined in the AA Technical Standards",
"example": "101",
"xml": {
"attribute": true
}
},
"refUri": {
"type": "string",
"description": "URL where the purpose is further defined",
"example": "https://api.rebit.org.in/aa/purpose/101.xml",
"xml": {
"attribute": true
}
},
"text": {
"type": "string",
"description": "Textual Description",
"example": "Wealth management service",
"xml": {
"attribute": true
}
},
"Category": {
"properties": {
"type": {
"type": "string",
"description": "Category name of the Purpose code",
"xml": {
"attribute": true
}
}
}
}
}
},
"HeartbeatResponse": {
"type": "object",
"required": [
"ver",
"timestamp",
"Status"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp of the message which will be updated at each leg",
"example": "2018-12-06T11:39:57.153Z",
"xml": {
"attribute": true
}
},
"Status": {
"type": "string",
"description": "Status of the AA Server ",
"enum": [
"UP",
"DOWN"
]
},
"Error": {
"$ref": "#/definitions/Error"
}
},
"xml": {
"name": "HeartbeatResponse",
"namespace": "https://standards.rebit.org.in/aa"
}
},
"FIFetchResponse": {
"type": "object",
"required": [
"ver",
"timestamp",
"txnid",
"FI"
],
"properties": {
"ver": {
"type": "string",
"example": "1.0",
"description": "The version of the API",
"xml": {
"attribute": true
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2018-12-06T11:39:57.153Z",
"description": "Creation timestamp of the message which will be updated at each leg",
"xml": {
"attribute": true
}
},
"txnid": {
"type": "string",
"description": "The unique transaction identifier used for providing an end to end traceability.",
"example": "3dd436f8-0747-4a8f-9001-375e419430be",
"xml": {
"attribute": true
}
},
"FI": {
"type": "array",
"description": "Contains the account-specific metadata with corresponding encrypted data for accessing the finanical information",
"items": {
"type": "object",
"required": [
"fipID",
"data",
"KeyMaterial"
],
"properties": {
"fipID": {
"type": "string",
"example": "FIP-1"
},
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"linkRefNumber",
"maskedAccNumber",
"encryptedFI"
],
"properties": {
"linkRefNumber": {
"type": "string",
"example": "XXXX-XXXX-XXXX"
},
"maskedAccNumber": {
"type": "string",
"example": "XXXXXXXX4020"
},
"encryptedFI": {
"type": "string",
"format": "binary",
"description": "Contains the encrypted financial information based on the key material defined corresponding to the user's Account"
}
}
}
},
"KeyMaterial": {
"$ref": "#/definitions/KeyMaterial"
}
}
}
}
},
"xml": {
"name": "FIFetchResponse",
"namespace": "https://standards.rebit.org.in/aa"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment