Create or update savings order

In this example, we will demonstrate how to update a savings order using the same savings account ID and savings ID referenced in the previous examples about creating a savings account and finding its savings ID. This API call can be used either to set up a savings order if one was not created during account creation, or to modify an existing one.

Use case

In this example, we will modify a savings order linked to the savings account ID-23941.

Use case data
API parameters with values

The savings order will be created for savings account ID-23941 using savings ID ID-1491.

...accounts/saving-accounts/ID-4302/savings/ID-1491

The name the customer has chosen for their savings account.

"savingName": "Emergency savings"

The date when the savings order matures and all scheduled recurring deposits are completed.

"savingEndDate": "2045-12-31"

The target amount to be saved in the savings account.

"savingAmount": "1000"

Defines the recurring deposit setup for the savings account.

It includes the deposit amount, frequency, and the specific day on which the deposit should occur. In this example, deposits are scheduled monthly on the 30th of each month.

"savingOrder": {
    "savingDay": 30,
    "amount": "10",
    "paymentFrequencyCode": "MONTHLY"
  }

When creating a savings order, be sure to set the savingDay in accordance with the rules for the selected paymentFrequencyCode, as outlined in the table below.

paymentFrequencyCode
savingDay

DAILY

No value allowed (null)

WEEKLY

Day of the week (1=Monday to 7=Sunday)

MONTHLY

Day of the month (1 to 31)

Sample API call

To create or update a savings order linked to the savings account, use the following endpoint:

https://account-api.sandbox.tuumplatform.com/api/v4/accounts/saving-accounts/{savingAccountId}/savings/{savingId}

Learn more about the updates saving endpoint in the Tuum developer portal.

Sample request

The sample request body is as follows:

{
  "savingName": "Emergency savings",
  "savingEndDate": "2045-12-31",
  "savingAmount": 1000,
  "savingOrder": {
    "savingDay": 30,
    "amount": 10,
    "paymentFrequencyCode": "MONTHLY"
  }
}

Sample response

Below you will find the response to the API request:

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "savingId": "ID-1491",
        "savingAccountId": "ID-23941",
        "currencyAccountId": "ID-23819",
        "savingName": "Emergency savings",
        "firstDebitDate": "2033-05-30",
        "lastDebitDate": null,
        "savingEndDate": "2045-12-31",
        "nextDebitDate": "2033-05-30",
        "currencyCode": "EUR",
        "interestRate": 3.10,
        "savingAmount": 1000,
        "initialAmount": 10,
        "orderAmount": 10,
        "savingDay": 30,
        "frequency": "MONTHLY",
        "manuallyEnded": false,
        "errorCode": null,
        "accountInterests": [
            {
                "accountInterestMethodId": "ID-000000015023",
                "accountTypeInterestMethodId": "ID-000000001290",
                "currencyCode": "EUR",
                "interestGroupCode": "DEPOSIT",
                "nextInterestCalculationDate": "2033-05-11",
                "balanceTypeCode": "END_OF_DAY",
                "calculationBaseTermCode": "SIMPLE",
                "rateTypeCode": "FIXED",
                "calcDaysMonth": "30",
                "calcDaysYear": "360",
                "paymentIntervalTypeCode": "MONTH",
                "minPayableInterestAmount": 0.01,
                "marginTypeCode": null,
                "conditions": [
                    {
                        "accountInterestConditionId": "ID-000000033574",
                        "amountRange": null,
                        "interestRate": 3.1,
                        "ratePeriodTypeCode": "PER_YEAR",
                        "interestTypeCode": "ACCO_INT",
                        "validityRange": {
                            "startDate": "2033-05-11",
                            "endDate": null
                        },
                        "source": null,
                        "rateBaseCode": null,
                        "baseRate": null,
                        "marginRate": null
                    }
                ]
            }
        ],
        "interestBalances": [],
        "accountNumbers": [
            {
                "accountNumberId": "ID-15148",
                "accountId": "ID-23941",
                "accountNumber": {
                    "value": "XX20XXXX99999000000000000127872",
                    "type": "IBAN"
                },
                "countryCode": "XX",
                "financialInstitutionId": {
                    "value": "ICECLOUDXXX",
                    "type": "BIC"
                },
                "accountNumberSubtype": null,
                "defaultCurrencyCode": "EUR",
                "statusCode": "ENABLED",
                "externalSyncEnabled": false,
                "validityRange": {
                    "endTime": null,
                    "startTime": "2025-10-14T07:31:32.92Z"
                }
            }
        ]
    }
}

Result

The savings order has been successfully processed.

  • If updating: The planned end date and saving day were modified successfully.

  • If creating: The savings order was created successfully.

Last updated

Was this helpful?