In this example, we will review how to create a currency account (account application) with an external service provider.
Creating a currency account.
The external provider is LHV.
The name of the account holder is Trevor Harry Tuum.
Trevor is assigned to the GROUP_A customer group.
The standard price list is assigned to the account.
The account currency is EUR.
The account interest rate is set to 10.
The account holder is a private person.
To create an account application, make the following API call.
https://account-api.sandbox.tuumplatform.com/api/v2/persons/{personId}/applications
Below is an example request body of the API call for creating an account application.
{
"accountTypeCode": "CURRENCY",
"accountTypeSetupCode": "EXTERNAL_VIRTUAL",
"serviceProviderCode": "LHV",
"accountName": "My business account",
"personName": "Trevor Harry Tuum",
"residencyCountryCode": "GB",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"currencyCode": "EUR",
"accountInterestRate": 10,
"personTypeCode": "P"
}
curl -L 'https://account-api.sandbox.tuumplatform.com/api/v2/persons/ID-3392/applications' \
-H 'x-channel-code: SYSTEM' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMDVUMTg6MjI6MjEiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODg1ODEzNDF9.LFWDXWOCWurR4ywAhL-idPSQIVexdUXHad6h7p4mXJ0' \
-H 'Content-Type: application/json' \
-d '{
"accountTypeCode": "CURRENCY",
"accountTypeSetupCode": "EXTERNAL_VIRTUAL",
"serviceProviderCode": "LHV",
"accountName": "My business account",
"personName": "Trevor Harry Tuum",
"residencyCountryCode": "GB",
"customerGroupCode": "GROUP_A",
"priceListTypeCode": "STANDARD",
"currencyCode": "EUR",
"accountInterestRate": 10,
"personTypeCode": "P"
}'
Below you find an example response body to the API call above.
A new account application ID-1007
is created.
"accountTypeCode": "CURRENCY"
"accountTypeSetupCode": "EXTERNAL_VIRTUAL",
"serviceProviderCode": "LHV",
"personName": "Trevor Harry Tuum"
"customerGroupCode": "GROUP_A"
"priceListTypeCode": "STANDARD"
"currencyCode": "EUR"
"accountInterestRate": 10
"personTypeCode": "P"