All pages
Powered by GitBook
1 of 1

Loading...

Set account access rights

Use case

In this example, we will review how to create a currency account for a legal person and add access rights for a private person.

Use case data
API parameters with values

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.

There are three levels of account access rights: ALL, VIEW_RIGHTS, CHANGE_RIGHTS:

  • ALL - the customer can view and edit account details; initiate currency transfers, payments, etc.

  • VIEW_RIGHTS - the customer can view account details but not edit them; the customer cannot initiate any transactions on accounts.

  • CHANGE_RIGHTS - the customer can view and edit account details and initiate transactions and payments but not confirm them.

Sample API call

To create an account and set access rights, make the following call.

Sample request

Below is an example request body of the API call for creating an account and setting access rights.

{
  "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"
        }
      ]
    }
  ]
}
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"
        }
      ]
    }
  ]
}'

Sample response

Below you find an example response body to the API call above.

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "accountId": "ID-1286",
        "personId": "ID-3397",
        "accountTypeCode": "CURRENCY",
        "activationDate": "2023-07-06",
        "accountName": null,
        "personName": "Trevor Harry Tuum",
        "statusCode": "ACTIVE",
        "iban": "GB12XXXX04030000000999",
        "bic": "LHVBGB2LXXX",
        "defaultCurrencyCode": "GBP",
        "tenantCode": "MB",
        "residencyCode": "GB",
        "customerGroupCode": "GROUP_A",
        "personTypeCode": null,
        "intraOrgCode": null,
        "accountTypeSetupCode": "STANDARD",
        "serviceProviderCode": "TUUM",
        "interestMethodAssignmentCode": null,
        "accountClassCode": null,
        "balances": [
            {
                "balanceId": "ID-1213",
                "accountId": "ID-1286",
                "currencyCode": "GBP",
                "balanceAmount": 0.00,
                "reservedAmount": 0.00,
                "overdraftLimitAmount": 0.00,
                "defaultCurrencyCode": "GBP",
                "availableBalanceInDefaultCcy": 0.00,
                "negativeBalanceStartDate": null,
                "availableBalanceAmount": 0.00
            }
        ],
        "masterAccountId": null,
        "accountNumbers": [
            {
                "accountNumber": {
                    "value": "00000999",
                    "type": "BBAN"
                },
                "countryCode": "GB",
                "financialInstitutionId": {
                    "value": "040300",
                    "type": "SORT_CODE"
                },
                "defaultCurrencyCode": "GBP",
                "accountNumberId": "ID-1145",
                "accountId": "ID-1286",
                "financialInstitutionIdTypeCode": null,
                "statusCode": "ENABLED"
            }
        ],
        "taxResidencyCountryCode": "GB",
        "jurisdictionCountryCode": "GB"
    }
}o

Result

A new current account ID-1286 was created. The private person ID-3397 was granted all rights to the created account.

https://account-api.sandbox.tuumplatform.com/api/v4/persons/{personId}/accounts

See more about the endpoint in the Tuum developer portal.

"representatives": [
    {
      "personId": "ID-3392",
      "accountRightCode": "ALL",
create account and set user rights