In this example, we will review how to create a currency account for a legal person and add access rights for a private person.
The legal account ID-3397.
...persons/ID-3397/accounts
The private person ID-3392 is granted all rights to the bank account of the legal person.
To create an account and set access rights, make the following call.
https://account-api.sandbox.tuumplatform.com/api/v4/persons/{personId}/accounts
Below is an example request body of the API call for creating an account and setting access rights.
curl -L 'https://account-api.sandbox.tuumplatform.com/api/v4/persons/ID-3397/accounts' \
-H 'x-channel-code: SYSTEM' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMDZUMTQ6NDE6NTAiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODg2NTQ1MTB9.qDVHzIowyGFM-XRG9xEktcwaA6YNf6WhPNp6yw4aTzE' \
-H 'Content-Type: application/json' \
-d '{
"accountTypeCode": "CURRENCY",
"personName": "Trevor Harry Tuum",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"residencyCountryCode": "GB",
"currencyCode": "GBP",
"representatives": [
{
"personId": "ID-3392",
"accountRightCode": "ALL",
"limits": [
{
"amount": {
"amount": "1000",
"currencyCode": "GBP"
},
"accountLimitTypeCode": "DAILY"
},
{
"amount": {
"amount": "10000",
"currencyCode": "GBP"
},
"accountLimitTypeCode": "MONTHLY"
}
]
}
]
}'
Below you find an example response body to the API call above.
A new current account ID-1286
was created. The private person ID-3397
was granted all rights to the created account.
"representatives": [
{
"personId": "ID-3392",
"accountRightCode": "ALL",
{
"accountTypeCode": "CURRENCY",
"personName": "Trevor Harry Tuum",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"residencyCountryCode": "GB",
"currencyCode": "GBP",
"representatives": [
{
"personId": "ID-3392",
"accountRightCode": "ALL",
"limits": [
{
"amount": {
"amount": "1000",
"currencyCode": "GBP"
},
"accountLimitTypeCode": "DAILY"
},
{
"amount": {
"amount": "10000",
"currencyCode": "GBP"
},
"accountLimitTypeCode": "MONTHLY"
}
]
}
]
}