Create account type class rule
Use case
In this example, we will review how to create an account class rule.
Use case data
API parameters
Setting a new rule for the internal accounts type.
The validity range of the rule. The validity range format: YYYY-MM-DD.
Sample API call
To create a new account type class rule, make the following API call.
Sample request
Below is an example request body of the API call for creating an account type class rule.
{
"accountTypeCode": "INTERNAL",
"accountClassCode": "NEW",
"validityRange": {
"startDate": "2023-07-31"
}
}
curl --location 'https://account-api.sandbox.tuumplatform.com/api/v1/account-type-class-rules' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDctMzFUMTQ6Mjk6NTgiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2OTA4MTM3OTh9.toMwogjfmBdNlD14soqIDPiZ6q1oF0dClO3hDFhJkHM' \
--header 'Content-Type: application/json' \
--data '{
"accountTypeCode": "INTERNAL",
"accountClassCode": "NEW",
"validityRange": {
"startDate": "2023-07-31"
}
}'
Sample response
Below you find an example response body to the API call above.
Response
{
"errors": null,
"validationErrors": null,
"data": {
"accountTypeCode": "INTERNAL",
"accountClassCode": "NEW",
"validityRange": {
"startDate": "2023-07-31",
"endDate": null
},
"accountTypeClassRuleId": "ID-1007"
}
}
Result
A new account type class rule was created.