This package provides a finAPI SDK for Go. It was created via OpenAPI Generator as described in the finAPI documentation. Additionally some wrapper code was added to improve the usability.
- API version: 1.151.1
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
- OpenAPI Generator Version 5.0.1
For more information, please visit https://www.finapi.io/impressumrechtlicher-hinweis
- Usage
- Documentation for API Endpoints
- Documentation For Models
- Documentation for Utility Methods
- How to Update This SDK
import (
"github.com/fastbill/go-finapi/v6"
)
config := finapi.ClientConfig{
Endpoint: "",
ClientID: "",
ClientSecret: "",
}
client := finapi.NewClient(config)
// Use a client context to perform actions like creating new users.
ctx, err := client.NewClientContext()
// handle error
newUser := finapimodel.UserCreateParams{
Email: "",
Password: "",
IsAutoUpdateEnabled: true,
}
user, res, err := client.UsersApi.CreateUser(ctx, newUser)
// Use a user context for user based actions like connection banks etc.
userCtx, err := client.NewUserContext("put finapi user id here", "put user password here")
// handle error
All URIs are relative to https://sandbox.finapi.io
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsApi | DeleteAccount | Delete /api/v1/accounts/{id} | Delete an account |
AccountsApi | DeleteAllAccounts | Delete /api/v1/accounts | Delete all accounts |
AccountsApi | EditAccount | Patch /api/v1/accounts/{id} | Edit an account |
AccountsApi | ExecuteSepaDirectDebit | Post /api/v1/accounts/executeSepaDirectDebit | Execute SEPA Direct Debit |
AccountsApi | ExecuteSepaMoneyTransfer | Post /api/v1/accounts/executeSepaMoneyTransfer | Execute SEPA Money Transfer |
AccountsApi | GetAccount | Get /api/v1/accounts/{id} | Get an account |
AccountsApi | GetAndSearchAllAccounts | Get /api/v1/accounts | Get and search all accounts |
AccountsApi | GetDailyBalances | Get /api/v1/accounts/dailyBalances | Get daily balances |
AccountsApi | GetMultipleAccounts | Get /api/v1/accounts/{ids} | Get multiple accounts |
AccountsApi | RequestSepaDirectDebit | Post /api/v1/accounts/requestSepaDirectDebit | Request SEPA Direct Debit |
AccountsApi | RequestSepaMoneyTransfer | Post /api/v1/accounts/requestSepaMoneyTransfer | Request SEPA Money Transfer |
AuthorizationApi | GetToken | Post /oauth/token | Get tokens |
AuthorizationApi | RevokeToken | Post /oauth/revoke | Revoke a token |
BankConnectionsApi | ConnectInterface | Post /api/v1/bankConnections/connectInterface | Connect a new interface |
BankConnectionsApi | DeleteAccessData | Delete /api/v1/bankConnections/{id}/aisConsent | Delete a consent |
BankConnectionsApi | DeleteAllBankConnections | Delete /api/v1/bankConnections | Delete all bank connections |
BankConnectionsApi | DeleteBankConnection | Delete /api/v1/bankConnections/{id} | Delete a bank connection |
BankConnectionsApi | EditBankConnection | Patch /api/v1/bankConnections/{id} | Edit a bank connection |
BankConnectionsApi | GetAllBankConnections | Get /api/v1/bankConnections | Get all bank connections |
BankConnectionsApi | GetBankConnection | Get /api/v1/bankConnections/{id} | Get a bank connection |
BankConnectionsApi | GetMultipleBankConnections | Get /api/v1/bankConnections/{ids} | Get multiple bank connections |
BankConnectionsApi | ImportBankConnection | Post /api/v1/bankConnections/import | Import a new bank connection |
BankConnectionsApi | RemoveInterface | Post /api/v1/bankConnections/removeInterface | Remove an interface |
BankConnectionsApi | UpdateBankConnection | Post /api/v1/bankConnections/update | Update a bank connection |
BanksApi | GetAndSearchAllBanks | Get /api/v1/banks | Get and search all banks |
BanksApi | GetBank | Get /api/v1/banks/{id} | Get a bank |
BanksApi | GetMultipleBanks | Get /api/v1/banks/{ids} | Get multiple banks |
CategoriesApi | CreateCategory | Post /api/v1/categories | Create a new category |
CategoriesApi | DeleteAllCategories | Delete /api/v1/categories | Delete all categories |
CategoriesApi | DeleteCategory | Delete /api/v1/categories/{id} | Delete a category |
CategoriesApi | EditCategory | Patch /api/v1/categories/{id} | Edit a category |
CategoriesApi | GetAndSearchAllCategories | Get /api/v1/categories | Get and search all categories |
CategoriesApi | GetCashFlows | Get /api/v1/categories/cashFlows | Get cash flows |
CategoriesApi | GetCategory | Get /api/v1/categories/{id} | Get a category |
CategoriesApi | GetMultipleCategories | Get /api/v1/categories/{ids} | Get multiple categories |
CategoriesApi | TrainCategorization | Post /api/v1/categories/trainCategorization | Train categorization |
ClientConfigurationApi | EditClientConfiguration | Patch /api/v1/clientConfiguration | Edit client configuration |
ClientConfigurationApi | GetClientConfiguration | Get /api/v1/clientConfiguration | Get client configuration |
LabelsApi | CreateLabel | Post /api/v1/labels | Create a new label |
LabelsApi | DeleteAllLabels | Delete /api/v1/labels | Delete all labels |
LabelsApi | DeleteLabel | Delete /api/v1/labels/{id} | Delete a label |
LabelsApi | EditLabel | Patch /api/v1/labels/{id} | Edit a label |
LabelsApi | GetAndSearchAllLabels | Get /api/v1/labels | Get and search all labels |
LabelsApi | GetLabel | Get /api/v1/labels/{id} | Get a label |
LabelsApi | GetMultipleLabels | Get /api/v1/labels/{ids} | Get multiple labels |
MandatorAdministrationApi | ChangeClientCredentials | Post /api/v1/mandatorAdmin/changeClientCredentials | Change client credentials |
MandatorAdministrationApi | CreateIbanRules | Post /api/v1/mandatorAdmin/ibanRules | Create IBAN rules |
MandatorAdministrationApi | CreateKeywordRules | Post /api/v1/mandatorAdmin/keywordRules | Create keyword rules |
MandatorAdministrationApi | DeleteIbanRules | Post /api/v1/mandatorAdmin/ibanRules/delete | Delete IBAN rules |
MandatorAdministrationApi | DeleteKeywordRules | Post /api/v1/mandatorAdmin/keywordRules/delete | Delete keyword rules |
MandatorAdministrationApi | DeleteUsers | Post /api/v1/mandatorAdmin/deleteUsers | Delete users |
MandatorAdministrationApi | GetIbanRuleList | Get /api/v1/mandatorAdmin/ibanRules | Get IBAN rules |
MandatorAdministrationApi | GetKeywordRuleList | Get /api/v1/mandatorAdmin/keywordRules | Get keyword rules |
MandatorAdministrationApi | GetUserList | Get /api/v1/mandatorAdmin/getUserList | Get user list |
MocksAndTestsApi | CheckCategorization | Post /api/v1/tests/checkCategorization | Check categorization |
MocksAndTestsApi | MockBatchUpdate | Post /api/v1/tests/mockBatchUpdate | Mock batch update |
NotificationRulesApi | CreateNotificationRule | Post /api/v1/notificationRules | Create a new notification rule |
NotificationRulesApi | DeleteAllNotificationRules | Delete /api/v1/notificationRules | Delete all notification rules |
NotificationRulesApi | DeleteNotificationRule | Delete /api/v1/notificationRules/{id} | Delete a notification rule |
NotificationRulesApi | GetAndSearchAllNotificationRules | Get /api/v1/notificationRules | Get and search all notification rules |
NotificationRulesApi | GetNotificationRule | Get /api/v1/notificationRules/{id} | Get a notification rule |
PaymentsApi | CreateDirectDebit | Post /api/v1/payments/directDebits | Create direct debit |
PaymentsApi | CreateMoneyTransfer | Post /api/v1/payments/moneyTransfers | Create money transfer |
PaymentsApi | GetPayments | Get /api/v1/payments | Get payments |
PaymentsApi | SubmitPayment | Post /api/v1/payments/submit | Submit payment |
SecuritiesApi | GetAndSearchAllSecurities | Get /api/v1/securities | Get and search all securities |
SecuritiesApi | GetMultipleSecurities | Get /api/v1/securities/{ids} | Get multiple securities |
SecuritiesApi | GetSecurity | Get /api/v1/securities/{id} | Get a security |
StandingOrdersApi | CreateStandingOrder | Post /api/v1/standingOrders | Create a standing order |
StandingOrdersApi | GetStandingOrders | Get /api/v1/standingOrders | Get standing orders |
StandingOrdersApi | SubmitStandingOrder | Post /api/v1/standingOrders/submit | Submit standing order |
TPPCertificatesApi | CreateNewCertificate | Post /api/v1/tppCertificates | Upload TPP certificate |
TPPCertificatesApi | DeleteCertificate | Delete /api/v1/tppCertificates/{id} | Delete a TPP certificate |
TPPCertificatesApi | GetAllCertificates | Get /api/v1/tppCertificates | Get all TPP certificates |
TPPCertificatesApi | GetCertificate | Get /api/v1/tppCertificates/{id} | Get a TPP certificate |
TPPCredentialsApi | CreateTppCredential | Post /api/v1/tppCredentials | Upload TPP credentials |
TPPCredentialsApi | DeleteTppCredential | Delete /api/v1/tppCredentials/{id} | Delete a set of TPP credentials |
TPPCredentialsApi | EditTppCredential | Patch /api/v1/tppCredentials/{id} | Edit a set of TPP credentials |
TPPCredentialsApi | GetAllTppCredentials | Get /api/v1/tppCredentials | Get all TPP credentials |
TPPCredentialsApi | GetAndSearchTppAuthenticationGroups | Get /api/v1/tppCredentials/tppAuthenticationGroups | Get all TPP Authentication Groups |
TPPCredentialsApi | GetTppCredential | Get /api/v1/tppCredentials/{id} | Get a set of TPP credentials |
TransactionsApi | DeleteAllTransactions | Delete /api/v1/transactions | Delete all transactions |
TransactionsApi | DeleteTransaction | Delete /api/v1/transactions/{id} | Delete a transaction |
TransactionsApi | EditMultipleTransactions | Patch /api/v1/transactions | Edit multiple transactions |
TransactionsApi | EditMultipleTransactionsDeprecated | Patch /api/v1/transactions/{ids} | Edit multiple transactions (DEPRECATED) |
TransactionsApi | EditTransaction | Patch /api/v1/transactions/{id} | Edit a transaction |
TransactionsApi | GetAndSearchAllTransactions | Get /api/v1/transactions | Get and search all transactions |
TransactionsApi | GetMultipleTransactions | Get /api/v1/transactions/{ids} | Get multiple transactions |
TransactionsApi | GetTransaction | Get /api/v1/transactions/{id} | Get a transaction |
TransactionsApi | RestoreTransaction | Post /api/v1/transactions/{id}/restore | Restore a transaction |
TransactionsApi | SplitTransaction | Post /api/v1/transactions/{id}/split | Split a transaction |
TransactionsApi | TriggerCategorization | Post /api/v1/transactions/triggerCategorization | Trigger categorization |
UsersApi | CreateUser | Post /api/v1/users | Create a new user |
UsersApi | DeleteAuthorizedUser | Delete /api/v1/users | Delete the authorized user |
UsersApi | DeleteUnverifiedUser | Delete /api/v1/users/{userId} | Delete an unverified user |
UsersApi | EditAuthorizedUser | Patch /api/v1/users | Edit the authorized user |
UsersApi | ExecutePasswordChange | Post /api/v1/users/executePasswordChange | Execute password change |
UsersApi | GetAuthorizedUser | Get /api/v1/users | Get the authorized user |
UsersApi | GetVerificationStatus | Get /api/v1/users/verificationStatus | Get a user's verification status |
UsersApi | RequestPasswordChange | Post /api/v1/users/requestPasswordChange | Request password change |
UsersApi | VerifyUser | Post /api/v1/users/verify/{userId} | Verify a user |
WebFormsApi | GetWebForm | Get /api/v1/webForms/{id} | Get a Web Form |
- AccessToken
- Account
- AccountCapability
- AccountInterface
- AccountInterfacePaymentCapabilities
- AccountList
- AccountParams
- AccountReference
- AccountStatus
- AccountType
- BadCredentialsError
- Bank
- BankConnection
- BankConnectionInterface
- BankConnectionList
- BankConnectionOwner
- BankConsent
- BankConsentStatus
- BankGroup
- BankInterface
- BankInterfaceLoginField
- BankInterfacePaymentCapabilities
- BankInterfaceProperty
- BankList
- BankingInterface
- CashFlow
- CashFlowList
- CategorizationCheckResult
- CategorizationCheckResults
- CategorizationRuleDirection
- CategorizationStatus
- Category
- CategoryList
- CategoryParams
- ChangeClientCredentialsParams
- CheckCategorizationData
- CheckCategorizationTransactionData
- ClearingAccountData
- ClientConfiguration
- ClientConfigurationParams
- ConnectInterfaceParams
- CreateDirectDebitParams
- CreateMoneyTransferParams
- CreateStandingOrderParams
- Currency
- DailyBalance
- DailyBalanceList
- DeleteConsent
- DeleteConsentResult
- DirectDebitOrderParams
- DirectDebitOrderingResponse
- DirectDebitSequenceType
- DirectDebitType
- EditBankConnectionParams
- EditCategoryParams
- EditTppCredentialParams
- ErrorCode
- ErrorDetails
- ErrorMessage
- ErrorType
- ExecutePasswordChangeParams
- ExecuteSepaDirectDebitParams
- ExecuteSepaMoneyTransferParams
- ISO3166Alpha2Codes
- IbanRule
- IbanRuleIdentifiersParams
- IbanRuleList
- IbanRuleParams
- IbanRulesParams
- IdentifierList
- ImportBankConnectionParams
- KeywordRule
- KeywordRuleIdentifiersParams
- KeywordRuleList
- KeywordRuleParams
- KeywordRulesParams
- Label
- LabelList
- LabelParams
- LoginCredential
- LoginCredentialResource
- MandatorLicense
- MockAccountData
- MockBankConnectionUpdate
- MockBatchUpdateParams
- MoneyTransferOrderParams
- MoneyTransferOrderingResponse
- MonthlyUserStats
- MsaStatus
- MultiStepAuthenticationCallback
- MultiStepAuthenticationChallenge
- NewTransaction
- NotificationRule
- NotificationRuleList
- NotificationRuleParams
- OrderInitiationStatus
- PageableBankList
- PageableCategoryList
- PageableIbanRuleList
- PageableKeywordRuleList
- PageableLabelList
- PageablePaymentResources
- PageableSecurityList
- PageableStandingOrderResources
- PageableTppAuthenticationGroupResources
- PageableTppCertificateList
- PageableTppCredentialResources
- PageableTransactionList
- PageableUserInfoList
- Paging
- PasswordChangingResource
- Payment
- PaymentExecutionResponse
- PaymentType
- PaypalTransactionData
- PreferredConsentType
- Product
- RemoveInterfaceParams
- RequestPasswordChangeParams
- RequestSepaDirectDebitParams
- RequestSepaMoneyTransferParams
- Security
- SecurityList
- SecurityPositionQuantityNominalType
- SecurityPositionQuoteType
- SingleDirectDebitData
- SingleMoneyTransferRecipientData
- SplitTransactionsParams
- StandingOrder
- StandingOrderFrequency
- SubTransactionParams
- SubmitPaymentParams
- SubmitStandingOrderParams
- SupportedDataSource
- SupportedOrder
- TppAuthenticationGroup
- TppCertificate
- TppCertificateParams
- TppCertificateType
- TppCredentials
- TppCredentialsParams
- TrainCategorizationData
- TrainCategorizationTransactionData
- Transaction
- TransactionDirection
- TransactionList
- TriggerCategorizationParams
- TwoStepProcedure
- UpdateBankConnectionParams
- UpdateMultipleTransactionsParams
- UpdateResult
- UpdateResultStatus
- UpdateTransactionsParams
- User
- UserCreateParams
- UserIdentifiersList
- UserIdentifiersParams
- UserInfo
- UserUpdateParams
- VerificationStatusResource
- WebForm
- WebFormMode
- WebFormStatus
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat64
PtrFloat64
PtrString
PtrTime
- Download the newest version of the official SDK from docs.finapi.io. Select "finAPI Access (with deprecation)" from the product selection. Than click the download button on the top of the page and select "go" as language.
- Save the zip file you get there to some place on your PC and extract it. Open the folder
go-client
. - In the current SDK folder, delete everything besides
README.md
,LICENSE
andfinapi.go
. Then copy everything besidesgitpush.sh
and dot files from the new SDK that you downloaded into your existing repository. - Replace all occurances of
package io.finapi.access
withpackage finapi
besides the one in this README file. - Revert the module name in the
go.mod
file to the one you had before. Consider increasing the major version in case you expect breaking changes from the update. - Fix compiliation errors if there are some (e.g. the
NewTransaction
struct might need to be renamed toExtendedTransaction
to avoid a naming collision). In case you see a lot of compilation errors of the type... redeclared in the block
for enum equivalents, it is best to genereate the SDK yourself (see instructions below) and start again at step 3 afterwards. - In the file
client.go
make sure to keep the following change for the serialization of the OpenAPI error (either revert the change from copying the file or just paste in the old version again):func (e GenericOpenAPIError) Error() string { return e.error + ", body: " + string(e.body) }
- From the
README.md
file in the downloaded SDK copy the sectionsDocumentation for API Endpoints
andDocumentation For Models
and use them to replace those sections in the repositoryREADME.md
file.' Also update the API version mentioned at the top of the readme. - Replace all
float32
withfloat64
andFloat32
withFloat64
in the entire SDK with the exception of this README file and theutils.go
file. This is needed because otherwise we get rounding errors for large transaction amounts. Float64 only garantees 6 correct digits, not enought for amounts like123456.78
. - Review the changes in the Git diff before commiting them. Files in
docs
folder can be commited without thourough checking since they only contain text changes.
- In some folder, create a file
config.json
with the following content.
{
"packageName": "finapi",
"enumClassPrefix": true
}
- Download the openapi.yml file (not the SDK) from docs.finapi.io and place it in the same folder as the config.json file.
- Install the generator via
npm install @openapitools/openapi-generator-cli -g
. - Run the generator by executing
openapi-generator-cli generate -i ./openapi.yaml -g go -o ./sdk -c ./config.json
in the folder that contains the config and openapi file. - In case the result contains a lot of compilation errors, delete the generated folder and use
openapi-generator-cli version-manager set 5.0.1
to go back to a more stable version of the generator. Then run the command in step 4 again. - Now you can follow the update process described above (skipping steps 1, 2 and 4) by treating the generated SDK like the downloaded one from above.