curl --request POST \
--url https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"accountNumber": "LT601010012345678901",
"accountNumberType": "IBAN",
"balance": 15320.44,
"currency": "EUR",
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "REPORTABLE_PERSON",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"payments": [
{
"type": "INTEREST",
"amount": 142.75,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT121000011101001000",
"accountNumberType": "IBAN",
"balance": 248900,
"currency": "EUR",
"accountType": "CUSTODIAL_ACCOUNT",
"openingType": "NEW_ACCOUNT",
"jointAccountHolders": 2,
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"controllingPersons": [
{
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Alberta st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
},
"roles": [
"LEGAL_PERSON_CONTROL_BY_OWNERSHIP"
],
"selfCertification": "PROVIDED"
}
],
"payments": [
{
"type": "DIVIDENDS",
"amount": 5400,
"currency": "EUR"
},
{
"type": "GROSS_PROCEEDS_OR_REDEMPTIONS",
"amount": 122000,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT407300010002061111",
"accountNumberType": "IBAN",
"balance": 0,
"currency": "EUR",
"closed": true,
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "NOT_PROVIDED",
"individual": {
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
}
}
}
}
]
'import requests
url = "https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts"
payload = [
{
"accountNumber": "LT601010012345678901",
"accountNumberType": "IBAN",
"balance": 15320.44,
"currency": "EUR",
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "REPORTABLE_PERSON",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"payments": [
{
"type": "INTEREST",
"amount": 142.75,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT121000011101001000",
"accountNumberType": "IBAN",
"balance": 248900,
"currency": "EUR",
"accountType": "CUSTODIAL_ACCOUNT",
"openingType": "NEW_ACCOUNT",
"jointAccountHolders": 2,
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"controllingPersons": [
{
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Alberta st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
},
"roles": ["LEGAL_PERSON_CONTROL_BY_OWNERSHIP"],
"selfCertification": "PROVIDED"
}
],
"payments": [
{
"type": "DIVIDENDS",
"amount": 5400,
"currency": "EUR"
},
{
"type": "GROSS_PROCEEDS_OR_REDEMPTIONS",
"amount": 122000,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT407300010002061111",
"accountNumberType": "IBAN",
"balance": 0,
"currency": "EUR",
"closed": True,
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "NOT_PROVIDED",
"individual": {
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
}
}
}
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
accountNumber: 'LT601010012345678901',
accountNumberType: 'IBAN',
balance: 15320.44,
currency: 'EUR',
accountType: 'DEPOSITORY_ACCOUNT',
openingType: 'PREEXISTING_ACCOUNT',
accountHolder: {
selfCertification: 'PROVIDED',
organisation: {
type: 'REPORTABLE_PERSON',
name: 'UAB Inventi',
nameType: 'LEGAL',
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [{addressFree: 'Riga, Riga st. 1', countryCode: 'LV', type: 'REGISTRATION'}]
}
},
payments: [{type: 'INTEREST', amount: 142.75, currency: 'EUR'}]
},
{
accountNumber: 'LT121000011101001000',
accountNumberType: 'IBAN',
balance: 248900,
currency: 'EUR',
accountType: 'CUSTODIAL_ACCOUNT',
openingType: 'NEW_ACCOUNT',
jointAccountHolders: 2,
accountHolder: {
selfCertification: 'PROVIDED',
organisation: {
type: 'PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS',
name: 'UAB Inventi',
nameType: 'LEGAL',
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [{addressFree: 'Riga, Riga st. 1', countryCode: 'LV', type: 'REGISTRATION'}]
}
},
controllingPersons: [
{
names: [{firstName: 'Jonas', lastName: 'Jonaitis'}],
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [
{
addressFree: 'Riga, Alberta st. 1',
countryCode: 'LV',
type: 'RESIDENTAL_OR_HABITATION'
}
],
birthInfo: {birthDate: '1990-05-15', city: 'Riga', countryCode: 'LV'},
roles: ['LEGAL_PERSON_CONTROL_BY_OWNERSHIP'],
selfCertification: 'PROVIDED'
}
],
payments: [
{type: 'DIVIDENDS', amount: 5400, currency: 'EUR'},
{type: 'GROSS_PROCEEDS_OR_REDEMPTIONS', amount: 122000, currency: 'EUR'}
]
},
{
accountNumber: 'LT407300010002061111',
accountNumberType: 'IBAN',
balance: 0,
currency: 'EUR',
closed: true,
accountType: 'DEPOSITORY_ACCOUNT',
openingType: 'PREEXISTING_ACCOUNT',
accountHolder: {
selfCertification: 'NOT_PROVIDED',
individual: {
names: [{firstName: 'Jonas', lastName: 'Jonaitis'}],
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [
{
addressFree: 'Riga, Riga st. 1',
countryCode: 'LV',
type: 'RESIDENTAL_OR_HABITATION'
}
],
birthInfo: {birthDate: '1990-05-15', city: 'Riga', countryCode: 'LV'}
}
}
}
])
};
fetch('https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'accountNumber' => 'LT601010012345678901',
'accountNumberType' => 'IBAN',
'balance' => 15320.44,
'currency' => 'EUR',
'accountType' => 'DEPOSITORY_ACCOUNT',
'openingType' => 'PREEXISTING_ACCOUNT',
'accountHolder' => [
'selfCertification' => 'PROVIDED',
'organisation' => [
'type' => 'REPORTABLE_PERSON',
'name' => 'UAB Inventi',
'nameType' => 'LEGAL',
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Riga st. 1',
'countryCode' => 'LV',
'type' => 'REGISTRATION'
]
]
]
],
'payments' => [
[
'type' => 'INTEREST',
'amount' => 142.75,
'currency' => 'EUR'
]
]
],
[
'accountNumber' => 'LT121000011101001000',
'accountNumberType' => 'IBAN',
'balance' => 248900,
'currency' => 'EUR',
'accountType' => 'CUSTODIAL_ACCOUNT',
'openingType' => 'NEW_ACCOUNT',
'jointAccountHolders' => 2,
'accountHolder' => [
'selfCertification' => 'PROVIDED',
'organisation' => [
'type' => 'PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS',
'name' => 'UAB Inventi',
'nameType' => 'LEGAL',
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Riga st. 1',
'countryCode' => 'LV',
'type' => 'REGISTRATION'
]
]
]
],
'controllingPersons' => [
[
'names' => [
[
'firstName' => 'Jonas',
'lastName' => 'Jonaitis'
]
],
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Alberta st. 1',
'countryCode' => 'LV',
'type' => 'RESIDENTAL_OR_HABITATION'
]
],
'birthInfo' => [
'birthDate' => '1990-05-15',
'city' => 'Riga',
'countryCode' => 'LV'
],
'roles' => [
'LEGAL_PERSON_CONTROL_BY_OWNERSHIP'
],
'selfCertification' => 'PROVIDED'
]
],
'payments' => [
[
'type' => 'DIVIDENDS',
'amount' => 5400,
'currency' => 'EUR'
],
[
'type' => 'GROSS_PROCEEDS_OR_REDEMPTIONS',
'amount' => 122000,
'currency' => 'EUR'
]
]
],
[
'accountNumber' => 'LT407300010002061111',
'accountNumberType' => 'IBAN',
'balance' => 0,
'currency' => 'EUR',
'closed' => true,
'accountType' => 'DEPOSITORY_ACCOUNT',
'openingType' => 'PREEXISTING_ACCOUNT',
'accountHolder' => [
'selfCertification' => 'NOT_PROVIDED',
'individual' => [
'names' => [
[
'firstName' => 'Jonas',
'lastName' => 'Jonaitis'
]
],
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Riga st. 1',
'countryCode' => 'LV',
'type' => 'RESIDENTAL_OR_HABITATION'
]
],
'birthInfo' => [
'birthDate' => '1990-05-15',
'city' => 'Riga',
'countryCode' => 'LV'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts"
payload := strings.NewReader("[\n {\n \"accountNumber\": \"LT601010012345678901\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 15320.44,\n \"currency\": \"EUR\",\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"REPORTABLE_PERSON\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"payments\": [\n {\n \"type\": \"INTEREST\",\n \"amount\": 142.75,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT121000011101001000\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 248900,\n \"currency\": \"EUR\",\n \"accountType\": \"CUSTODIAL_ACCOUNT\",\n \"openingType\": \"NEW_ACCOUNT\",\n \"jointAccountHolders\": 2,\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"controllingPersons\": [\n {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Alberta st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n },\n \"roles\": [\n \"LEGAL_PERSON_CONTROL_BY_OWNERSHIP\"\n ],\n \"selfCertification\": \"PROVIDED\"\n }\n ],\n \"payments\": [\n {\n \"type\": \"DIVIDENDS\",\n \"amount\": 5400,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"GROSS_PROCEEDS_OR_REDEMPTIONS\",\n \"amount\": 122000,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT407300010002061111\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 0,\n \"currency\": \"EUR\",\n \"closed\": true,\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"NOT_PROVIDED\",\n \"individual\": {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n }\n }\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"accountNumber\": \"LT601010012345678901\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 15320.44,\n \"currency\": \"EUR\",\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"REPORTABLE_PERSON\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"payments\": [\n {\n \"type\": \"INTEREST\",\n \"amount\": 142.75,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT121000011101001000\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 248900,\n \"currency\": \"EUR\",\n \"accountType\": \"CUSTODIAL_ACCOUNT\",\n \"openingType\": \"NEW_ACCOUNT\",\n \"jointAccountHolders\": 2,\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"controllingPersons\": [\n {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Alberta st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n },\n \"roles\": [\n \"LEGAL_PERSON_CONTROL_BY_OWNERSHIP\"\n ],\n \"selfCertification\": \"PROVIDED\"\n }\n ],\n \"payments\": [\n {\n \"type\": \"DIVIDENDS\",\n \"amount\": 5400,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"GROSS_PROCEEDS_OR_REDEMPTIONS\",\n \"amount\": 122000,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT407300010002061111\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 0,\n \"currency\": \"EUR\",\n \"closed\": true,\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"NOT_PROVIDED\",\n \"individual\": {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n }\n }\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"accountNumber\": \"LT601010012345678901\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 15320.44,\n \"currency\": \"EUR\",\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"REPORTABLE_PERSON\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"payments\": [\n {\n \"type\": \"INTEREST\",\n \"amount\": 142.75,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT121000011101001000\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 248900,\n \"currency\": \"EUR\",\n \"accountType\": \"CUSTODIAL_ACCOUNT\",\n \"openingType\": \"NEW_ACCOUNT\",\n \"jointAccountHolders\": 2,\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"controllingPersons\": [\n {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Alberta st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n },\n \"roles\": [\n \"LEGAL_PERSON_CONTROL_BY_OWNERSHIP\"\n ],\n \"selfCertification\": \"PROVIDED\"\n }\n ],\n \"payments\": [\n {\n \"type\": \"DIVIDENDS\",\n \"amount\": 5400,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"GROSS_PROCEEDS_OR_REDEMPTIONS\",\n \"amount\": 122000,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT407300010002061111\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 0,\n \"currency\": \"EUR\",\n \"closed\": true,\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"NOT_PROVIDED\",\n \"individual\": {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n }\n }\n }\n }\n]"
response = http.request(request)
puts response.read_body[
{
"status": "SUCCESS",
"accountNumber": "LT601010012345678901"
},
{
"status": "SUCCESS",
"accountNumber": "LT121000011101001000"
},
{
"status": "SUCCESS",
"accountNumber": "LT407300010002061111"
}
][
{
"status": "SUCCESS",
"accountNumber": "LT601010012345678901"
},
{
"status": "FAILED",
"accountNumber": "LT121000011101001000",
"errors": [
{
"fields": [
"accountNumber"
],
"message": "Duplicate account number 'LT121000011101001000'"
}
]
}
][
{
"status": "FAILED",
"accountNumber": "LT601010012345678901",
"errors": [
{
"message": "Account holder address is missing"
},
{
"message": "Account holder name is missing or invalid"
}
]
},
{
"status": "FAILED",
"accountNumber": "LT121000011101001000",
"errors": [
{
"message": "Organisation whose account holder type is not PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS cannot have controlling person"
}
]
}
]Push accounts
Add a batch of reportable accounts to a submission.
curl --request POST \
--url https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"accountNumber": "LT601010012345678901",
"accountNumberType": "IBAN",
"balance": 15320.44,
"currency": "EUR",
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "REPORTABLE_PERSON",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"payments": [
{
"type": "INTEREST",
"amount": 142.75,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT121000011101001000",
"accountNumberType": "IBAN",
"balance": 248900,
"currency": "EUR",
"accountType": "CUSTODIAL_ACCOUNT",
"openingType": "NEW_ACCOUNT",
"jointAccountHolders": 2,
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"controllingPersons": [
{
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Alberta st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
},
"roles": [
"LEGAL_PERSON_CONTROL_BY_OWNERSHIP"
],
"selfCertification": "PROVIDED"
}
],
"payments": [
{
"type": "DIVIDENDS",
"amount": 5400,
"currency": "EUR"
},
{
"type": "GROSS_PROCEEDS_OR_REDEMPTIONS",
"amount": 122000,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT407300010002061111",
"accountNumberType": "IBAN",
"balance": 0,
"currency": "EUR",
"closed": true,
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "NOT_PROVIDED",
"individual": {
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": [
"LV"
],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
}
}
}
}
]
'import requests
url = "https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts"
payload = [
{
"accountNumber": "LT601010012345678901",
"accountNumberType": "IBAN",
"balance": 15320.44,
"currency": "EUR",
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "REPORTABLE_PERSON",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"payments": [
{
"type": "INTEREST",
"amount": 142.75,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT121000011101001000",
"accountNumberType": "IBAN",
"balance": 248900,
"currency": "EUR",
"accountType": "CUSTODIAL_ACCOUNT",
"openingType": "NEW_ACCOUNT",
"jointAccountHolders": 2,
"accountHolder": {
"selfCertification": "PROVIDED",
"organisation": {
"type": "PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS",
"name": "UAB Inventi",
"nameType": "LEGAL",
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "REGISTRATION"
}
]
}
},
"controllingPersons": [
{
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Alberta st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
},
"roles": ["LEGAL_PERSON_CONTROL_BY_OWNERSHIP"],
"selfCertification": "PROVIDED"
}
],
"payments": [
{
"type": "DIVIDENDS",
"amount": 5400,
"currency": "EUR"
},
{
"type": "GROSS_PROCEEDS_OR_REDEMPTIONS",
"amount": 122000,
"currency": "EUR"
}
]
},
{
"accountNumber": "LT407300010002061111",
"accountNumberType": "IBAN",
"balance": 0,
"currency": "EUR",
"closed": True,
"accountType": "DEPOSITORY_ACCOUNT",
"openingType": "PREEXISTING_ACCOUNT",
"accountHolder": {
"selfCertification": "NOT_PROVIDED",
"individual": {
"names": [
{
"firstName": "Jonas",
"lastName": "Jonaitis"
}
],
"residenceCountryCodes": ["LV"],
"tins": [
{
"number": "39001011234",
"issuedBy": "LV"
}
],
"addresses": [
{
"addressFree": "Riga, Riga st. 1",
"countryCode": "LV",
"type": "RESIDENTAL_OR_HABITATION"
}
],
"birthInfo": {
"birthDate": "1990-05-15",
"city": "Riga",
"countryCode": "LV"
}
}
}
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
accountNumber: 'LT601010012345678901',
accountNumberType: 'IBAN',
balance: 15320.44,
currency: 'EUR',
accountType: 'DEPOSITORY_ACCOUNT',
openingType: 'PREEXISTING_ACCOUNT',
accountHolder: {
selfCertification: 'PROVIDED',
organisation: {
type: 'REPORTABLE_PERSON',
name: 'UAB Inventi',
nameType: 'LEGAL',
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [{addressFree: 'Riga, Riga st. 1', countryCode: 'LV', type: 'REGISTRATION'}]
}
},
payments: [{type: 'INTEREST', amount: 142.75, currency: 'EUR'}]
},
{
accountNumber: 'LT121000011101001000',
accountNumberType: 'IBAN',
balance: 248900,
currency: 'EUR',
accountType: 'CUSTODIAL_ACCOUNT',
openingType: 'NEW_ACCOUNT',
jointAccountHolders: 2,
accountHolder: {
selfCertification: 'PROVIDED',
organisation: {
type: 'PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS',
name: 'UAB Inventi',
nameType: 'LEGAL',
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [{addressFree: 'Riga, Riga st. 1', countryCode: 'LV', type: 'REGISTRATION'}]
}
},
controllingPersons: [
{
names: [{firstName: 'Jonas', lastName: 'Jonaitis'}],
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [
{
addressFree: 'Riga, Alberta st. 1',
countryCode: 'LV',
type: 'RESIDENTAL_OR_HABITATION'
}
],
birthInfo: {birthDate: '1990-05-15', city: 'Riga', countryCode: 'LV'},
roles: ['LEGAL_PERSON_CONTROL_BY_OWNERSHIP'],
selfCertification: 'PROVIDED'
}
],
payments: [
{type: 'DIVIDENDS', amount: 5400, currency: 'EUR'},
{type: 'GROSS_PROCEEDS_OR_REDEMPTIONS', amount: 122000, currency: 'EUR'}
]
},
{
accountNumber: 'LT407300010002061111',
accountNumberType: 'IBAN',
balance: 0,
currency: 'EUR',
closed: true,
accountType: 'DEPOSITORY_ACCOUNT',
openingType: 'PREEXISTING_ACCOUNT',
accountHolder: {
selfCertification: 'NOT_PROVIDED',
individual: {
names: [{firstName: 'Jonas', lastName: 'Jonaitis'}],
residenceCountryCodes: ['LV'],
tins: [{number: '39001011234', issuedBy: 'LV'}],
addresses: [
{
addressFree: 'Riga, Riga st. 1',
countryCode: 'LV',
type: 'RESIDENTAL_OR_HABITATION'
}
],
birthInfo: {birthDate: '1990-05-15', city: 'Riga', countryCode: 'LV'}
}
}
}
])
};
fetch('https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'accountNumber' => 'LT601010012345678901',
'accountNumberType' => 'IBAN',
'balance' => 15320.44,
'currency' => 'EUR',
'accountType' => 'DEPOSITORY_ACCOUNT',
'openingType' => 'PREEXISTING_ACCOUNT',
'accountHolder' => [
'selfCertification' => 'PROVIDED',
'organisation' => [
'type' => 'REPORTABLE_PERSON',
'name' => 'UAB Inventi',
'nameType' => 'LEGAL',
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Riga st. 1',
'countryCode' => 'LV',
'type' => 'REGISTRATION'
]
]
]
],
'payments' => [
[
'type' => 'INTEREST',
'amount' => 142.75,
'currency' => 'EUR'
]
]
],
[
'accountNumber' => 'LT121000011101001000',
'accountNumberType' => 'IBAN',
'balance' => 248900,
'currency' => 'EUR',
'accountType' => 'CUSTODIAL_ACCOUNT',
'openingType' => 'NEW_ACCOUNT',
'jointAccountHolders' => 2,
'accountHolder' => [
'selfCertification' => 'PROVIDED',
'organisation' => [
'type' => 'PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS',
'name' => 'UAB Inventi',
'nameType' => 'LEGAL',
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Riga st. 1',
'countryCode' => 'LV',
'type' => 'REGISTRATION'
]
]
]
],
'controllingPersons' => [
[
'names' => [
[
'firstName' => 'Jonas',
'lastName' => 'Jonaitis'
]
],
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Alberta st. 1',
'countryCode' => 'LV',
'type' => 'RESIDENTAL_OR_HABITATION'
]
],
'birthInfo' => [
'birthDate' => '1990-05-15',
'city' => 'Riga',
'countryCode' => 'LV'
],
'roles' => [
'LEGAL_PERSON_CONTROL_BY_OWNERSHIP'
],
'selfCertification' => 'PROVIDED'
]
],
'payments' => [
[
'type' => 'DIVIDENDS',
'amount' => 5400,
'currency' => 'EUR'
],
[
'type' => 'GROSS_PROCEEDS_OR_REDEMPTIONS',
'amount' => 122000,
'currency' => 'EUR'
]
]
],
[
'accountNumber' => 'LT407300010002061111',
'accountNumberType' => 'IBAN',
'balance' => 0,
'currency' => 'EUR',
'closed' => true,
'accountType' => 'DEPOSITORY_ACCOUNT',
'openingType' => 'PREEXISTING_ACCOUNT',
'accountHolder' => [
'selfCertification' => 'NOT_PROVIDED',
'individual' => [
'names' => [
[
'firstName' => 'Jonas',
'lastName' => 'Jonaitis'
]
],
'residenceCountryCodes' => [
'LV'
],
'tins' => [
[
'number' => '39001011234',
'issuedBy' => 'LV'
]
],
'addresses' => [
[
'addressFree' => 'Riga, Riga st. 1',
'countryCode' => 'LV',
'type' => 'RESIDENTAL_OR_HABITATION'
]
],
'birthInfo' => [
'birthDate' => '1990-05-15',
'city' => 'Riga',
'countryCode' => 'LV'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts"
payload := strings.NewReader("[\n {\n \"accountNumber\": \"LT601010012345678901\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 15320.44,\n \"currency\": \"EUR\",\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"REPORTABLE_PERSON\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"payments\": [\n {\n \"type\": \"INTEREST\",\n \"amount\": 142.75,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT121000011101001000\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 248900,\n \"currency\": \"EUR\",\n \"accountType\": \"CUSTODIAL_ACCOUNT\",\n \"openingType\": \"NEW_ACCOUNT\",\n \"jointAccountHolders\": 2,\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"controllingPersons\": [\n {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Alberta st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n },\n \"roles\": [\n \"LEGAL_PERSON_CONTROL_BY_OWNERSHIP\"\n ],\n \"selfCertification\": \"PROVIDED\"\n }\n ],\n \"payments\": [\n {\n \"type\": \"DIVIDENDS\",\n \"amount\": 5400,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"GROSS_PROCEEDS_OR_REDEMPTIONS\",\n \"amount\": 122000,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT407300010002061111\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 0,\n \"currency\": \"EUR\",\n \"closed\": true,\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"NOT_PROVIDED\",\n \"individual\": {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n }\n }\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"accountNumber\": \"LT601010012345678901\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 15320.44,\n \"currency\": \"EUR\",\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"REPORTABLE_PERSON\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"payments\": [\n {\n \"type\": \"INTEREST\",\n \"amount\": 142.75,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT121000011101001000\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 248900,\n \"currency\": \"EUR\",\n \"accountType\": \"CUSTODIAL_ACCOUNT\",\n \"openingType\": \"NEW_ACCOUNT\",\n \"jointAccountHolders\": 2,\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"controllingPersons\": [\n {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Alberta st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n },\n \"roles\": [\n \"LEGAL_PERSON_CONTROL_BY_OWNERSHIP\"\n ],\n \"selfCertification\": \"PROVIDED\"\n }\n ],\n \"payments\": [\n {\n \"type\": \"DIVIDENDS\",\n \"amount\": 5400,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"GROSS_PROCEEDS_OR_REDEMPTIONS\",\n \"amount\": 122000,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT407300010002061111\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 0,\n \"currency\": \"EUR\",\n \"closed\": true,\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"NOT_PROVIDED\",\n \"individual\": {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n }\n }\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rrc.dev.finventi.com/reports/crs/v1/submissions/{submissionId}/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"accountNumber\": \"LT601010012345678901\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 15320.44,\n \"currency\": \"EUR\",\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"REPORTABLE_PERSON\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"payments\": [\n {\n \"type\": \"INTEREST\",\n \"amount\": 142.75,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT121000011101001000\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 248900,\n \"currency\": \"EUR\",\n \"accountType\": \"CUSTODIAL_ACCOUNT\",\n \"openingType\": \"NEW_ACCOUNT\",\n \"jointAccountHolders\": 2,\n \"accountHolder\": {\n \"selfCertification\": \"PROVIDED\",\n \"organisation\": {\n \"type\": \"PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS\",\n \"name\": \"UAB Inventi\",\n \"nameType\": \"LEGAL\",\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"REGISTRATION\"\n }\n ]\n }\n },\n \"controllingPersons\": [\n {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Alberta st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n },\n \"roles\": [\n \"LEGAL_PERSON_CONTROL_BY_OWNERSHIP\"\n ],\n \"selfCertification\": \"PROVIDED\"\n }\n ],\n \"payments\": [\n {\n \"type\": \"DIVIDENDS\",\n \"amount\": 5400,\n \"currency\": \"EUR\"\n },\n {\n \"type\": \"GROSS_PROCEEDS_OR_REDEMPTIONS\",\n \"amount\": 122000,\n \"currency\": \"EUR\"\n }\n ]\n },\n {\n \"accountNumber\": \"LT407300010002061111\",\n \"accountNumberType\": \"IBAN\",\n \"balance\": 0,\n \"currency\": \"EUR\",\n \"closed\": true,\n \"accountType\": \"DEPOSITORY_ACCOUNT\",\n \"openingType\": \"PREEXISTING_ACCOUNT\",\n \"accountHolder\": {\n \"selfCertification\": \"NOT_PROVIDED\",\n \"individual\": {\n \"names\": [\n {\n \"firstName\": \"Jonas\",\n \"lastName\": \"Jonaitis\"\n }\n ],\n \"residenceCountryCodes\": [\n \"LV\"\n ],\n \"tins\": [\n {\n \"number\": \"39001011234\",\n \"issuedBy\": \"LV\"\n }\n ],\n \"addresses\": [\n {\n \"addressFree\": \"Riga, Riga st. 1\",\n \"countryCode\": \"LV\",\n \"type\": \"RESIDENTAL_OR_HABITATION\"\n }\n ],\n \"birthInfo\": {\n \"birthDate\": \"1990-05-15\",\n \"city\": \"Riga\",\n \"countryCode\": \"LV\"\n }\n }\n }\n }\n]"
response = http.request(request)
puts response.read_body[
{
"status": "SUCCESS",
"accountNumber": "LT601010012345678901"
},
{
"status": "SUCCESS",
"accountNumber": "LT121000011101001000"
},
{
"status": "SUCCESS",
"accountNumber": "LT407300010002061111"
}
][
{
"status": "SUCCESS",
"accountNumber": "LT601010012345678901"
},
{
"status": "FAILED",
"accountNumber": "LT121000011101001000",
"errors": [
{
"fields": [
"accountNumber"
],
"message": "Duplicate account number 'LT121000011101001000'"
}
]
}
][
{
"status": "FAILED",
"accountNumber": "LT601010012345678901",
"errors": [
{
"message": "Account holder address is missing"
},
{
"message": "Account holder name is missing or invalid"
}
]
},
{
"status": "FAILED",
"accountNumber": "LT121000011101001000",
"errors": [
{
"message": "Organisation whose account holder type is not PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS cannot have controlling person"
}
]
}
]Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Client-provided idempotency key. UUID v4 suggested, max 255 characters. If provided, duplicate requests with the same key return the cached response.
255Path Parameters
Body
Account number, or its functional equivalent where the account has no number. Identifies the account within the submission, so it must be unique across the accounts you push.
200"LT601010012345678901"
Type of the account number. IBAN values are checked against the IBAN structure.
IBAN, OBAN, ISIN, OSIN, OTHER, ELECTRONIC_MONEY_PRODUCT "IBAN"
Balance or value at the end of the reporting year. Must be 0 when account is closed.
12345.67
Currency the balance is denominated in, ISO 4217
1"EUR"
The reportable holder of the account.
Show child attributes
Show child attributes
Type of financial account maintained for the holder.
DEPOSITORY_ACCOUNT, CUSTODIAL_ACCOUNT, CASH_VALUE_INSURANCE_OR_ANNUITY_CONTRACT, DEBT_OR_EQUITY_INTEREST_IN_INVESTMENT_ENTITY, NOT_REPORTED "DEPOSITORY_ACCOUNT"
Whether the account is a new or a pre-existing account, which decides the due diligence procedure that applied to it.
NEW_ACCOUNT, PREEXISTING_ACCOUNT, NOT_REPORTED "PREEXISTING_ACCOUNT"
The account was closed during the reporting year
The account is dormant
The account is undocumented
Controlling persons of a passive non-financial entity holder. Required when the holder is an organisation of type PASSIVE_NFE_WITH_REPORTABLE_CONTROLLING_PERSONS, and not accepted otherwise.
Show child attributes
Show child attributes
4Show child attributes
Show child attributes
Number of joint account holders. Send it only where the account is jointly held.
1 <= x <= 2002
Response
All accounts saved