All pages
Powered by GitBook
1 of 1

Loading...

Create deposit class code

Use case

Here we will review how to create deposit class codes that can be used to define separate general ledger accounts for different deposit products. We will create a new deposit class code for the premium customers.

Use case data
API parameters with values

The new class code is created for the premium customers group.

Sample API call

To create a new deposit class code, make the following API call.

deposit-api.sandbox.tuumplatform.com/api/v1/deposit-class-codes

See more about the create deposit class code endpoint in the Tuum developer portal.

Sample request

Below is an example request body of the API call for creating a deposit class code.

{
  "description": "Class code for premium customers",
  "depositClassCode": "PREMIUM_CUSTOMER"
}
curl --location 'https://deposit-api.sandbox.tuumplatform.com/api/v1/deposit-class-codes' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjQtMDItMjJUMTc6MDE6MTciLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIuRVUiLCJleHAiOjE3MDg2MjEyNzd9.XD_GcGtj3ArKvsM2OxUKKhBNmhQ-TA5RcjmKxTR2fkA' \
--header 'Content-Type: application/json' \
--data '{
  "description": "Class code for premium customers",
  "depositClassCode": "PREMIUM_CUSTOMER"
}'

Sample response

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

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "description": "Class code for premium customers",
        "depositClassCode": "PREMIUM_CUSTOMER"
    }
}

Result

As an outcome, a new deposit class code for premium customers was created.

{
 "description": "Class code for premium customers",
 "depositClassCode": "PREMIUM_CUSTOMER"
 }