1.117.0 • Published 3 years ago

fin_api_access v1.117.0

Weekly downloads
1
License
Unlicense
Repository
-
Last release
3 years ago

fin_api_access

FinApiAccess - JavaScript client for fin_api_access RESTful API for Account Information Services (AIS) and Payment Initiation Services (PIS) The following pages give you some general information on how to use our APIs. The actual API services documentation then follows further below. You can use the menu to jump between API sections. This page has a built-in HTTP(S) client, so you can test the services directly from within this page, by filling in the request parameters and/or body in the respective services, and then hitting the TRY button. Note that you need to be authorized to make a successful API call. To authorize, refer to the 'Authorization' section of the API, or just use the OAUTH button that can be found near the TRY button. You should also check out the <a href=\"https://finapi.zendesk.com/hc/en-us\" target=\"_blank\">Developer Portal for more information. If you need any help with the API, contact support@finapi.io. General information Error Responses When an API call returns with an error, then in general it has the structure shown in the following example: { \"errors\": { \"message\": \"Interface 'FINTS_SERVER' is not supported for this operation.\", \"code\": \"BAD_REQUEST\", \"type\": \"TECHNICAL\" } , \"date\": \"2020-11-19 16:54:06.854\", \"requestId\": \"selfgen-312042e7-df55-47e4-bffd-956a68ef37b5\", \"endpoint\": \"POST /api/v1/bankConnections/import\", \"authContext\": \"1/21\", \"bank\": \"DEMO0002 - finAPI Test Redirect Bank\" } If an API call requires an additional authentication by the user, HTTP code 510 is returned and the error response contains the additional \"multiStepAuthentication\" object, see the following example: { \"errors\": { \"message\": \"Es ist eine zusätzliche Authentifizierung erforderlich. Bitte geben Sie folgenden Code an: 123456\", \"code\": \"ADDITIONAL_AUTHENTICATION_REQUIRED\", \"type\": \"BUSINESS\", \"multiStepAuthentication\": { \"hash\": \"678b13f4be9ed7d981a840af8131223a\", \"status\": \"CHALLENGE_RESPONSE_REQUIRED\", \"challengeMessage\": \"Es ist eine zusätzliche Authentifizierung erforderlich. Bitte geben Sie folgenden Code an: 123456\", \"answerFieldLabel\": \"TAN\", \"redirectUrl\": null, \"redirectContext\": null, \"redirectContextField\": null, \"twoStepProcedures\": null, \"photoTanMimeType\": null, \"photoTanData\": null, \"opticalData\": null } } , \"date\": \"2019-11-29 09:51:55.931\", \"requestId\": \"selfgen-45059c99-1b14-4df7-9bd3-9d5f126df294\", \"endpoint\": \"POST /api/v1/bankConnections/import\", \"authContext\": \"1/18\", \"bank\": \"DEMO0001 - finAPI Test Bank\" } An exception to this error format are API authentication errors, where the following structure is returned: { \"error\": \"invalid_token\", \"error_description\": \"Invalid access token: cccbce46-xxxx-xxxx-xxxx-xxxxxxxxxx\" } Paging API services that may potentially return a lot of data implement paging. They return a limited number of entries within a \"page\". Further entries must be fetched with subsequent calls. Any API service that implements paging provides the following input parameters: \"page\": the number of the page to be retrieved (starting with 1). \"perPage\": the number of entries within a page. The default and maximum value is stated in the documentation of the respective services. A paged response contains an additional \"paging\" object with the following structure: { ... , \"paging\": { \"page\": 1, \"perPage\": 20, \"pageCount\": 234, \"totalCount\": 4662 } } Internationalization The finAPI services support internationalization which means you can define the language you prefer for API service responses. The following languages are available: German, English, Czech, Slovak. The preferred language can be defined by providing the official HTTP Accept-Language header. For web form request issued in a web browser, the Accept-Language header is automatically set by the browser based on the browser's or operation system's language settings. For direct API calls, the Accept-Language header must be set explicity. finAPI reacts on the official iso language codes "de", "en", "cs" and "sk" for the named languages. Additional subtags supported by the Accept-Language header may be provided, e.g. "en-US", but are ignored. If no Accept-Language header is given, German is used as the default language. Exceptions: Bank login hints and login fields are only available in the language of the bank and not being translated. Direct messages from the bank systems typically returned as BUSINESS errors will not be translated. BUSINESS errors created by finAPI directly are available in German and English. TECHNICAL errors messages meant for developers are mostly in English, but also may be translated. Request IDs With any API call, you can pass a request ID via a header with name \"X-REQUEST-ID\". The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name \"X-REQUEST-ID\". We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. Overriding HTTP methods Some HTTP clients do not support the HTTP methods PATCH or DELETE. If you are using such a client in your application, you can use a POST request instead with a special HTTP header indicating the originally intended HTTP method. The header's name is X-HTTP-Method-Override. Set its value to either PATCH or DELETE. POST Requests having this header set will be treated either as PATCH or DELETE by the finAPI servers. Example: X-HTTP-Method-Override: PATCH POST /api/v1/label/51 {\"name\": \"changed label\"} will be interpreted by finAPI as: PATCH /api/v1/label/51 {\"name\": \"changed label\"} User metadata With the migration to PSD2 APIs, a new term called \"User metadata\" (also known as \"PSU metadata\") has been introduced to the API. This user metadata aims to inform the banking API if there was a real end-user behind an HTTP request or if the request was triggered by a system (e.g. by an automatic batch update). In the latter case, the bank may apply some restrictions such as limiting the number of HTTP requests for a single consent. Also, some operations may be forbidden entirely by the banking API. For example, some banks do not allow issuing a new consent without the end-user being involved. Therefore, the PSU metadata must always be provided for such operations. As finAPI does not have direct interaction with the end-user, it is the client application's responsibility to provide all the necessary information about the end-user. This must be done by sending additional headers with every request triggered on behalf of the end-user. At the moment, the following headers are supported by the API: \"PSU-IP-Address\" - the IP address of the user's device. \"PSU-Device-OS\" - the user's device and/or operating system identification. \"PSU-User-Agent\" - the user's web browser or other client device identification. Web-form customers (or unlicensed customers) must send the PSU headers from their client application to finAPI. It will not take effect if web form is triggered for the workflow. In this case Values for the PSU-Device-OS and PSU-User-Agent headers are identified by the JS platform detection and the PSU-IP-Address is obtained from a public Cloudflare service: https://www.cloudflare.com/cdn-cgi/trace. But it is certainly necessary and obligatory to have the true PSU header data for API calls which don't trigger a web form (like \"Update a bank connection\"). FAQ Is there a finAPI SDK? Currently we do not offer a native SDK, but there is the option to generate a SDK for almost any target language via Swagger. Use the 'Download SDK' button on this page for SDK generation. How can I enable finAPI's automatic batch update? Currently there is no way to set up the batch update via the API. Please contact support@finapi.io for this. Why do I need to keep authorizing when calling services on this page? This page is a \"one-page-app\". Reloading the page resets the OAuth authorization context. There is generally no need to reload the page, so just don't do it and your authorization will persist. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.117.0
  • Package version: 1.117.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install fin_api_access --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your fin_api_access from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('fin_api_access') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/fin_api_access then install it via:

    npm install YOUR_USERNAME/fin_api_access --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var FinApiAccess = require('fin_api_access');

var defaultClient = FinApiAccess.ApiClient.instance;

// Configure OAuth2 access token for authorization: finapi_auth
var finapi_auth = defaultClient.authentications['finapi_auth'];
finapi_auth.accessToken = "YOUR ACCESS TOKEN"

var api = new FinApiAccess.AccountsApi()

var id = 789; // {Number} Identifier of the account to delete


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteAccount(id, callback);

Documentation for API Endpoints

All URIs are relative to https://localhost

ClassMethodHTTP requestDescription
FinApiAccess.AccountsApideleteAccountDELETE /api/v1/accounts/{id}Delete an account
FinApiAccess.AccountsApideleteAllAccountsDELETE /api/v1/accountsDelete all accounts
FinApiAccess.AccountsApieditAccountPATCH /api/v1/accounts/{id}Edit an account
FinApiAccess.AccountsApigetAccountGET /api/v1/accounts/{id}Get an account
FinApiAccess.AccountsApigetAndSearchAllAccountsGET /api/v1/accountsGet and search all accounts
FinApiAccess.AccountsApigetDailyBalancesGET /api/v1/accounts/dailyBalancesGet daily balances
FinApiAccess.AuthorizationApigetTokenPOST /oauth/tokenGet tokens
FinApiAccess.AuthorizationApirevokeTokenPOST /oauth/revokeRevoke a token
FinApiAccess.BankConnectionsApiconnectInterfacePOST /api/v1/bankConnections/connectInterfaceConnect a new interface
FinApiAccess.BankConnectionsApideleteAccessDataDELETE /api/v1/bankConnections/{id}/aisConsentDelete a consent
FinApiAccess.BankConnectionsApideleteAllBankConnectionsDELETE /api/v1/bankConnectionsDelete all bank connections
FinApiAccess.BankConnectionsApideleteBankConnectionDELETE /api/v1/bankConnections/{id}Delete a bank connection
FinApiAccess.BankConnectionsApieditBankConnectionPATCH /api/v1/bankConnections/{id}Edit a bank connection
FinApiAccess.BankConnectionsApigetAllBankConnectionsGET /api/v1/bankConnectionsGet all bank connections
FinApiAccess.BankConnectionsApigetBankConnectionGET /api/v1/bankConnections/{id}Get a bank connection
FinApiAccess.BankConnectionsApiimportBankConnectionPOST /api/v1/bankConnections/importImport a new bank connection
FinApiAccess.BankConnectionsApiremoveInterfacePOST /api/v1/bankConnections/removeInterfaceRemove an interface
FinApiAccess.BankConnectionsApiupdateBankConnectionPOST /api/v1/bankConnections/updateUpdate a bank connection
FinApiAccess.BanksApigetAndSearchAllBanksGET /api/v1/banksGet and search all banks
FinApiAccess.BanksApigetBankGET /api/v1/banks/{id}Get a bank
FinApiAccess.CategoriesApicreateCategoryPOST /api/v1/categoriesCreate a new category
FinApiAccess.CategoriesApideleteAllCategoriesDELETE /api/v1/categoriesDelete all categories
FinApiAccess.CategoriesApideleteCategoryDELETE /api/v1/categories/{id}Delete a category
FinApiAccess.CategoriesApieditCategoryPATCH /api/v1/categories/{id}Edit a category
FinApiAccess.CategoriesApigetAndSearchAllCategoriesGET /api/v1/categoriesGet and search all categories
FinApiAccess.CategoriesApigetCashFlowsGET /api/v1/categories/cashFlowsGet cash flows
FinApiAccess.CategoriesApigetCategoryGET /api/v1/categories/{id}Get a category
FinApiAccess.CategoriesApitrainCategorizationPOST /api/v1/categories/trainCategorizationTrain categorization
FinApiAccess.ClientConfigurationApieditClientConfigurationPATCH /api/v1/clientConfigurationEdit client configuration
FinApiAccess.ClientConfigurationApigetClientConfigurationGET /api/v1/clientConfigurationGet client configuration
FinApiAccess.LabelsApicreateLabelPOST /api/v1/labelsCreate a new label
FinApiAccess.LabelsApideleteAllLabelsDELETE /api/v1/labelsDelete all labels
FinApiAccess.LabelsApideleteLabelDELETE /api/v1/labels/{id}Delete a label
FinApiAccess.LabelsApieditLabelPATCH /api/v1/labels/{id}Edit a label
FinApiAccess.LabelsApigetAndSearchAllLabelsGET /api/v1/labelsGet and search all labels
FinApiAccess.LabelsApigetLabelGET /api/v1/labels/{id}Get a label
FinApiAccess.MandatorAdministrationApichangeClientCredentialsPOST /api/v1/mandatorAdmin/changeClientCredentialsChange client credentials
FinApiAccess.MandatorAdministrationApicreateIbanRulesPOST /api/v1/mandatorAdmin/ibanRulesCreate IBAN rules
FinApiAccess.MandatorAdministrationApicreateKeywordRulesPOST /api/v1/mandatorAdmin/keywordRulesCreate keyword rules
FinApiAccess.MandatorAdministrationApideleteIbanRulesPOST /api/v1/mandatorAdmin/ibanRules/deleteDelete IBAN rules
FinApiAccess.MandatorAdministrationApideleteKeywordRulesPOST /api/v1/mandatorAdmin/keywordRules/deleteDelete keyword rules
FinApiAccess.MandatorAdministrationApideleteUsersPOST /api/v1/mandatorAdmin/deleteUsersDelete users
FinApiAccess.MandatorAdministrationApigetIbanRuleListGET /api/v1/mandatorAdmin/ibanRulesGet IBAN rules
FinApiAccess.MandatorAdministrationApigetKeywordRuleListGET /api/v1/mandatorAdmin/keywordRulesGet keyword rules
FinApiAccess.MandatorAdministrationApigetUserListGET /api/v1/mandatorAdmin/getUserListGet user list
FinApiAccess.MocksAndTestsApicheckCategorizationPOST /api/v1/tests/checkCategorizationCheck categorization
FinApiAccess.MocksAndTestsApimockBatchUpdatePOST /api/v1/tests/mockBatchUpdateMock batch update
FinApiAccess.NotificationRulesApicreateNotificationRulePOST /api/v1/notificationRulesCreate a new notification rule
FinApiAccess.NotificationRulesApideleteAllNotificationRulesDELETE /api/v1/notificationRulesDelete all notification rules
FinApiAccess.NotificationRulesApideleteNotificationRuleDELETE /api/v1/notificationRules/{id}Delete a notification rule
FinApiAccess.NotificationRulesApigetAndSearchAllNotificationRulesGET /api/v1/notificationRulesGet and search all notification rules
FinApiAccess.NotificationRulesApigetNotificationRuleGET /api/v1/notificationRules/{id}Get a notification rule
FinApiAccess.PaymentsApicreateDirectDebitPOST /api/v1/payments/directDebitsCreate direct debit
FinApiAccess.PaymentsApicreateMoneyTransferPOST /api/v1/payments/moneyTransfersCreate money transfer
FinApiAccess.PaymentsApigetPaymentsGET /api/v1/paymentsGet payments
FinApiAccess.PaymentsApisubmitPaymentPOST /api/v1/payments/submitSubmit payment
FinApiAccess.SecuritiesApigetAndSearchAllSecuritiesGET /api/v1/securitiesGet and search all securities
FinApiAccess.SecuritiesApigetSecurityGET /api/v1/securities/{id}Get a security
FinApiAccess.TPPCertificatesApicreateNewCertificatePOST /api/v1/tppCertificatesCreate a new certificate
FinApiAccess.TPPCertificatesApideleteCertificateDELETE /api/v1/tppCertificates/{id}Delete a certificate
FinApiAccess.TPPCertificatesApigetAllCertificatesGET /api/v1/tppCertificatesGet all certificates
FinApiAccess.TPPCertificatesApigetCertificateGET /api/v1/tppCertificates/{id}Get a certificate
FinApiAccess.TPPCredentialsApicreateTppCredentialPOST /api/v1/tppCredentialsCreate new TPP credentials
FinApiAccess.TPPCredentialsApideleteTppCredentialDELETE /api/v1/tppCredentials/{id}Delete a set of TPP credentials
FinApiAccess.TPPCredentialsApieditTppCredentialPATCH /api/v1/tppCredentials/{id}Edit a set of TPP credentials
FinApiAccess.TPPCredentialsApigetAllTppCredentialsGET /api/v1/tppCredentialsGet all TPP credentials
FinApiAccess.TPPCredentialsApigetAndSearchTppAuthenticationGroupsGET /api/v1/tppCredentials/tppAuthenticationGroupsGet all TPP Authentication Groups
FinApiAccess.TPPCredentialsApigetTppCredentialGET /api/v1/tppCredentials/{id}Get a set of TPP credentials
FinApiAccess.TransactionsApideleteAllTransactionsDELETE /api/v1/transactionsDelete all transactions
FinApiAccess.TransactionsApideleteTransactionDELETE /api/v1/transactions/{id}Delete a transaction
FinApiAccess.TransactionsApieditMultipleTransactionsPATCH /api/v1/transactionsEdit multiple transactions
FinApiAccess.TransactionsApieditTransactionPATCH /api/v1/transactions/{id}Edit a transaction
FinApiAccess.TransactionsApigetAndSearchAllTransactionsGET /api/v1/transactionsGet and search all transactions
FinApiAccess.TransactionsApigetTransactionGET /api/v1/transactions/{id}Get a transaction
FinApiAccess.TransactionsApirestoreTransactionPOST /api/v1/transactions/{id}/restoreRestore a transaction
FinApiAccess.TransactionsApisplitTransactionPOST /api/v1/transactions/{id}/splitSplit a transaction
FinApiAccess.TransactionsApitriggerCategorizationPOST /api/v1/transactions/triggerCategorizationTrigger categorization
FinApiAccess.UsersApicreateUserPOST /api/v1/usersCreate a new user
FinApiAccess.UsersApideleteAuthorizedUserDELETE /api/v1/usersDelete the authorized user
FinApiAccess.UsersApideleteUnverifiedUserDELETE /api/v1/users/{userId}Delete an unverified user
FinApiAccess.UsersApieditAuthorizedUserPATCH /api/v1/usersEdit the authorized user
FinApiAccess.UsersApiexecutePasswordChangePOST /api/v1/users/executePasswordChangeExecute password change
FinApiAccess.UsersApigetAuthorizedUserGET /api/v1/usersGet the authorized user
FinApiAccess.UsersApigetVerificationStatusGET /api/v1/users/verificationStatusGet a user's verification status
FinApiAccess.UsersApirequestPasswordChangePOST /api/v1/users/requestPasswordChangeRequest password change
FinApiAccess.UsersApiverifyUserPOST /api/v1/users/verify/{userId}Verify a user
FinApiAccess.WebFormsApigetWebFormGET /api/v1/webForms/{id}Get a web form

Documentation for Models

Documentation for Authorization

finapi_auth

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: /oauth/authorize
  • Scopes:
    • all: modify any sources