Skip to main content

Python client library for Raiffeisen Bank Czech Republic Premium API

Project description

rbczpremiumapi

RBC Premium API Python Library Logo

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.1.0.tar.gz (118.1 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.1.0-py3-none-any.whl (371.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rbczpremiumapi-1.1.0.tar.gz
Algorithm Hash digest
SHA256 993199677379247e146aa0c06b38df28e8aee67cd814418ca6c344f8c6fc0770
MD5 075184b1c2b7bc04ae6e4c7b83477f4f
BLAKE2b-256 202756f9b0cb2310066c79e2a7710cccf9507a3cd1055d65c047b36408cb470f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rbczpremiumapi-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93feb256db3f37edc8dc6ff6f17bf71e7d0a75f452998fee6e4504ed1526bcac
MD5 fa28bc86814105957dfc448830fe420b
BLAKE2b-256 fe1861e1ca72b9f977e8a3112d8e40f10031e0722800a9af241584c501a591ca

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