All pages
Powered by GitBook
1 of 1

Loading...

Create account limit

Use case

In this example, we will review how to set up an account limit and apply it to the particular account.

Use case data
API parameters with values

The current account id to which the account limit is going to be applied.

The account limit amount is 10000 EUR.

Sample API call

To create a new account limit, make the following API call.

Create account limit

POST https://account-api.sandbox.tuumplatform.com/api/v2/accounts/limits

Sample request

Below is an example request body of the API call for creating an account limit.

{
  "limitTypeId": "ID-1002",
  "accountId": "ID-1279",
  "amount": {
    "amount": "10000",
    "currencyCode": "EUR"
  }
}
curl -L 'https://account-api.sandbox.tuumplatform.com/api/v2/accounts/limits'
-H 'x-channel-code: SYSTEM'
-H 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMTlUMTU6MDU6MzYiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2ODk3NzkxMzZ9.ITizqprIzqJfEhgygd8ij1gxzN2Wj5yNiR5U6IxI_c4'
-H 'Content-Type: application/json'
-d '{ "limitTypeId": "ID-1002", "accountId": "ID-1279", "amount": { "amount": "10000", "currencyCode": "EUR" } }'

Sample response

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

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "accountLimitId": "ID-1445",
        "limitTypeId": "ID-1002",
        "accountId": "ID-1279",
        "ownerPersonId": null,
        "userPersonId": null,
        "amount": {
            "amount": 10000.00,
            "currencyCode": "EUR"
        },
        "validityRange": {
            "endTime": null,
            "startTime": "2023-07-19T14:05:43.241Z"
        },
        "editable": true
    }
}

Result

A new account limit ID-1445 was created on the current account ID-1279.

The account limit type that was created in the . The account scope, monthly, per-currency limit.

https://account-api.sandbox.tuumplatform.com/api/v2/accounts/limits

See more information about the endpoint in the Tuum developer portal.

See more about this endpoint in the Tuum developer portal.

"limitTypeId": "ID-1002"n
"accountId": "ID-1279"
"amount": {
    "amount": "10000",
    "currencyCode": "EUR"
  }
create account limit
information
previous call