All pages
Powered by GitBook
1 of 1

Loading...

Create account limit type

Use case

Here, we will create a single currency account limit type with the account scope.

Use case data
API parameters with values

The limit must be applicable on the account level.

The limit is active on a montly basis.

The limit is calculated per currency.

The that was generated in the previous call.

You can find more information about the limit type parameters in the dev portal.

Sample API call

To create an account limit type, make the following call.

https://account-api.sandbox.tuumplatform.com/api/v1/limits/types

See more about the create

ndpoint in the Tuum developer portal.

Sample request

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

{
  "scopeTypeCode": "ACCOUNT",
  "periodTypeCode": "MONTHLY",
  "calcTypeCode": "PER_CURRENCY",
  "limitCode": "NEW_ACCOUNT_LIMIT"
}
curl -L 'https://account-api.sandbox.tuumplatform.com/api/v1/limits/types' \
-H 'x-channel-code: SYSTEM' \
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMTFUMTU6MDA6MTUiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODkwODc2MTV9.wfWaIi2x7wg64c0UPBPBHoezz5EhajJqQp1oHD7Rm7o' \
-H 'Content-Type: application/json' \
-d '{
  "scopeTypeCode": "ACCOUNT",
  "periodTypeCode": "MONTHLY",
  "calcTypeCode": "PER_CURRENCY",
  "limitCode": "NEW_ACCOUNT_LIMIT"
}'

Sample response

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

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "limitTypeId": "ID-1002",
        "scopeTypeCode": "ACCOUNT",
        "periodTypeCode": "MONTHLY",
        "calcTypeCode": "PER_CURRENCY",
        "limitCode": "NEW_ACCOUNT_LIMIT"
    }
}

Result

A new single currency account limit type is created - ID-1002. In the further API call, we will assign this limit type to an existing account and define the limit amount.

"scopeTypeCode": "ACCOUNT"
"periodTypeCode": "MONTHLY"
"calcTypeCode": "PER_CURRENCY"
"limitCode": "NEW_ACCOUNT_LIMIT"
limit code