Provide Bank Data

This endpoint will store consumer data, which is needed to generate reports later. Most reports need a transaction history to work with. This endpoint must be used in case a report should be generated from sources other than Open banking. by Klarna. Any existing list of transactions can be provided and will be used by the report engine.

URL and Request Body Structure of a Provide Bank Data call

POST /insights/v1/bankdata/save HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Bearer <Token>
Host: <Host>
{
    "insights_consumer_id": ?string,
    "data_retention_minutes": ?int,
    "account": ?ProvideTransactionAccount,
    "transactions": Array<ProvidedTransactions>,
    "from_date": ?string,
    "to_date": ?string,
    "data_refresh_at": ?string
}

insights_consumer_id String, optional

Data provided with this call will be stored with this insights_consumer_id, so later reports can be generated using only data for this consumer. If left empty, a new identifier will be generated and returned in the response to this call.

data_retention_minutes int, optional

Depending on the use-case, it might be helpful to store transactions (maybe consolidate transactions for a single consumer from different sources) for some minutes. With the data_retention_minutes this can be determined. If left empty, the default value of 10 minutes will be used.

account ProvideTransactionAccount, optional

The account parameter limits the report to include data from this account.

transactions ProvidedTransactions[], required

The list of transactions to be used for report-generation.

from_date Date (String: "YYYY-MM-DD"), optional

The from_date property (in combination with the to_date property) marks the start date of the range of provided transactions. It has to be in the YYYY-MM-DD format according to ISO 8601.

to_date Date (String: "YYYY-MM-DD"), optional

The to_date property (in combination with the from_date property) marks the end date of the range of provided transactions. It has to be in the YYYY-MM-DD format according to ISO 8601.

data_refresh_at DateTime, optional

With the data_refresh_at property the date and time (like age or as-of) of the provided account & transactions can be set. If left empty the current time will be set. Helpful for back-tracking or comparison of recurring reports. The data_refresh_at property has to be provided with an offset from UTC/Greenwich in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00.

ProvideTransactionAccount

{
    "insights_account_id" : ?string,
    "account_number": ?string,
    "iban": ?string,
    "bank_code": ?string,
    "bic": ?string,
    "holder_name": ?string,
    "transfer_type": ?enum<'NONE', 'DOMESTIC', 'FULL', 'REFERENCE', 'RESTRICTED'>,
    "account_type": ?enum<'DEFAULT', 'SAVING', 'CREDITCARD', 'DEPOT'>,
    "holder_address" : ?ProvidedTransactionAddressData,
    "balance": ?Amount
}

insights_account_id String, optional

The UUID generated by Account Insights which represents this account.

account_number String, optional

The account number of the consumer account.

iban String, optional

The IBAN of the consumer account.

bank_code String, optional

The bank code of the consumer's bank.

bic String, optional

The BIC of the consumer's bank.

holder_name String, optional

The account holder's name.

transfer_type Enum, optional

Indicates if the account can be used for a transaction or not.

  • NONE - It is not possible to use the account for transfers.
  • DOMESTIC - The account can only be used for domestic transfers.
  • FULL - The account is fully usable.
  • REFERENCE - The account can only be used for transfers to one specific account.
  • RESTRICTED - The account might be under protection from execution or something similar. Transfers are possible, but with restricted functionality (e.g. limited transfer amount).

account_type Enum, optional

Indicates the type of the account.

  • DEFAULT - A regular account.
  • SAVING - A savings account.
  • CREDITCARD - A credit card account.
  • DEPOT - A depot for broking or similar.

holder_address ProvidedTransactionAddressData, optional

The account holder's address, for details see here.

balance Amount, optional

The account balance which is saved for the provided account with the date provided in the data_refresh_at parameter.

ProvidedTransactionAddressData

{
    "country": ?string
}

country String, optional

The country code in the ISO 3166-1 alpha-2 format, e.g. DE, GB, SE.

ProvidedTransaction

{
    "reference": ?string,
    "date": ?Date,
    "amount" : ?Amount,
    "booking_date": ?Date,
    "value_date": ?Date,
    "counter_party": ?ProvidedTransactionCounterPartyAccount
}

reference String, optional

The reference for the transaction.

date Date (String: "YYYY-MM-DD"), optional

The date on which the transaction was booked or the value date if it is a pending transaction.

amount Amount, optional

The amount of the transaction.

booking_date Date (String: "YYYY-MM-DD"), optional

The booking date of the transaction: the date when the transfer was booked.

value_date Date (String: "YYYY-MM-DD"), optional

The value date of the transaction: when funds transferred to an account become available for immediate use.

counter_party ProvidedTransactionCounterPartyAccount, optional

The account info of the other party involved in the transaction.

ProvidedTransactionCounterPartyAccount

{
    "account_number": ?string,
    "iban": ?string,
    "bank_code": ?string,
    "bic": ?string,
    "holder_name": ?string,
    "holder_address" : ?ProvidedTransactionAddressData
}

account_number String, optional

The account number of the consumer account.

iban String, optional

The IBAN of the consumer account.

bank_code String, optional

The bank code of the consumer's bank.

bic String, optional

The BIC of the consumer's bank.

holder_name String, optional

The account holder's name.

holder_address ProvidedTransactionAddressData, optional

The account holder's address, for details see here.

Response Structure of ProvideTransactions

{
    "data": {
        "insights_consumer_id" : string,
        "insights_account_id" : string
        }
    }
}

data.insights_consumer_id String, always present

The retrieved data was stored with this insights_consumer_id. It can be used to identified this consumer when generating a report later.

data.insights_account_id String, always present

Since consumers could have multiple accounts, using this insights_account_id makes it possible to identify a specific account when generating any insight report.

results matching ""

    No results matching ""