Skip to main content

Python client library for Raiffeisen Bank Czech Republic Premium API

Project description

rbczpremiumapi

API Overview
  • Accounts list and balance
  • Transaction overview (also for saving accounts)
  • Payments import
  • Statement list and download
  • FX rates
Authentication

Before making a call to Premium API, you need to register your app at our Developer portal. This is where you get the ClientID that your application must send in the request as X-IBM-Client-Id. This is the key that grants your app access to the API.

However, this may not be enough. Your application needs to use mTLS to call most operations here. Thus, you not only need https but also a client certificate issued by us. The exception is two operations for FX rates that are accessible also without a client certificate.

Each bank client/user can issue several certificates. Each certificate can permit different sets of operations (http methods) on different bank accounts. All this must be configured in Internet Banking first by each bank client/user (bank clients need to look under Settings and do not forget to download the certificate at the last step). The certificate is downloaded in PKCS#12 format as \*.p12 file and protected by a password chosen by the bank client/user. Yes, your app needs the password as well to get use of the *\p12 file for establishing mTLS connection to the bank.

Client certificates issued in Internet Banking for bank clients/users have limited validity (e.g. 5 years). However, each year certificates are automatically blocked and bank client/user must unblock them in Internet Banking. It is possible to do it in advance and prolong the time before the certificate is blocked. Your app should be prepared for these scenarios and it should communicate such cases to your user in advance to provide seamless service and high user-experience of your app.

Rate Limiting

The number of requests in each API operation is limited to 10 per client per sliding second and 5000 per client per sliding day. The exception is the 'Download Statement' operation with the limits lowered to 5 per client per sliding second and 1500 per client per sliding day. This is because it transports potentially sizeable binary files. The consumer must be able to handle HTTP status 429 in case of exceeding these limits.

Response headers X-RateLimit-Limit-Second and X-RateLimit-Limit-Day show the actual limits configured for the specific operation. Response headers X-RateLimit-Remaining-Second and X-RateLimit-Remaining-Day are returned to help prevent the limits from being exceeded.

Notes

Be aware, that in certain error situations, API can return specific error structures along with 5xx status code, which is not explicitely defined below.

Quick Start Client

Feel free to download a <a href="assets/PremiumApiClient.java" download>simple Java client that gives you quick access to our API.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.1.20240910
  • Package version: 1.0.0
  • Generator version: 7.13.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/Vitexus/python-rbczpremiumapi.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/Vitexus/python-rbczpremiumapi.git)

Then import the package:

import rbczpremiumapi

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import rbczpremiumapi

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import rbczpremiumapi
from rbczpremiumapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.rb.cz
# See configuration.py for a list of all supported configuration parameters.
configuration = rbczpremiumapi.Configuration(
    host = "https://api.rb.cz"
)



# Enter a context with an instance of the API client
with rbczpremiumapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = rbczpremiumapi.DownloadStatementApi(api_client)
    x_ibm_client_id = 'x_ibm_client_id_example' # str | ClientID obtained from Developer Portal - when you registered your app with us.
    x_request_id = 'x_request_id_example' # str | Unique request id provided by consumer application for reference and auditing.
    accept_language = 'accept_language_example' # str | The Accept-Language request HTTP header is used to determine document  language. Supported languages are `cs` and `en`.
    request_body = rbczpremiumapi.DownloadStatementRequest() # DownloadStatementRequest | 
    psu_ip_address = 'psu_ip_address_example' # str | IP address of a client - the end IP address of the client application (no server) in IPv4 or IPv6 format. If the bank client (your user) uses a browser by which he accesses your server app, we need to know the IP address of his browser. Always provide the closest IP address to the real end-user possible. (optional)

    try:
        api_response = api_instance.download_statement(x_ibm_client_id, x_request_id, accept_language, request_body, psu_ip_address=psu_ip_address)
        print("The response of DownloadStatementApi->download_statement:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DownloadStatementApi->download_statement: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.rb.cz

Class Method HTTP request Description
DownloadStatementApi download_statement POST /rbcz/premium/api/accounts/statements/download
GetAccountBalanceApi get_balance GET /rbcz/premium/api/accounts/{accountNumber}/balance
GetAccountsApi get_accounts GET /rbcz/premium/api/accounts
GetBatchDetailApi get_batch_detail GET /rbcz/premium/api/payments/batches/{batchFileId}
GetFxRatesApi get_fx_rates GET /rbcz/premium/api/fxrates/{currencyCode}
GetFxRatesListApi get_fx_rates_list GET /rbcz/premium/api/fxrates
GetStatementListApi get_statements POST /rbcz/premium/api/accounts/statements
GetTransactionListApi get_transaction_list GET /rbcz/premium/api/accounts/{accountNumber}/{currencyCode}/transactions
UploadPaymentsApi import_payments POST /rbcz/premium/api/payments/batches

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

info@vitexsoftware.cz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rbczpremiumapi-1.0.2.tar.gz (103.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rbczpremiumapi-1.0.2-py3-none-any.whl (353.0 kB view details)

Uploaded Python 3

File details

Details for the file rbczpremiumapi-1.0.2.tar.gz.

File metadata

  • Download URL: rbczpremiumapi-1.0.2.tar.gz
  • Upload date:
  • Size: 103.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for rbczpremiumapi-1.0.2.tar.gz
Algorithm Hash digest
SHA256 709edb6f674b29d7760f00e4b55175b9fa7a964b2596deef4d114ddb17ec68ff
MD5 207c21da74bfdc2d6456686c3172a470
BLAKE2b-256 349f2a9efc433f71ec3478424ad3c55510fd727ec12c3ffdd9a21076ee7c3042

See more details on using hashes here.

File details

Details for the file rbczpremiumapi-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: rbczpremiumapi-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 353.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for rbczpremiumapi-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 02006a635b0a480a951ce24fa75a1f74a28c8e85954122d7b55dd8ab82fb04ca
MD5 0b8ed5b30317cc9223f24d40c21677c1
BLAKE2b-256 5e893752b3366290768418ba35566570a09ad216329422afce6090bf20955c9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page