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.
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"
}
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}
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:
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?