> For the complete documentation index, see [llms.txt](https://docs.udara360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udara360.io/udara360-docs-1/savings/frequentsavings/update-frequent-savings.md).

# Update Frequent Savings

The "Update Frequent Savings" endpoint allows customers to update an existing frequent savings account.

<mark style="color:blue;">`PUT`</mark> `/api/savingsaccount/v1/frequentsavings/update`

To update a frequent savings account, you need to provide the necessary body parameters, such as `id`, and any of the other fields you wish to change.

**Headers**

| Name                                                | Value                |
| --------------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>      | `application/json`   |
| Authorization<mark style="color:red;">\*</mark>     | `Bearer`             |
| Request-Reference<mark style="color:red;">\*</mark> | `{unique_reference}` |

**Body**

<table><thead><tr><th>Name</th><th>Data Type (Length)</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td></td><td>false</td><td>The unique identifier of the frequent savings account to be updated.</td></tr><tr><td><code>pocketName</code></td><td>string (100)</td><td>false</td><td>Details of the savings, e.g. Rent, School Fees.</td></tr><tr><td><code>amount</code></td><td>Integer</td><td>false</td><td>The Principal Amount.<br><br><em><mark style="color:red;">Amount should be sent in the base unit of the currency. For example, 1000 naira will be sent as 1000 * 100</mark>.</em></td></tr><tr><td><code>deductionAmount</code></td><td>Integer</td><td>false</td><td>The amount to be deducted till the Target Amount is reached.<br><br><em><mark style="color:red;">Deduction Amount should be sent in the base unit of the currency. For example, 1000 naira will be sent as 1000 * 100.</mark></em></td></tr><tr><td><code>frequency</code></td><td>Integer</td><td>false</td><td>How often the deduction towards the savings occurs.<br><br>Enum (Daily = 1, Weekly = 2, Monthly = 3)</td></tr><tr><td><code>commencementDate</code></td><td>Integer</td><td>false</td><td>The start date of the frequent savings.</td></tr><tr><td><code>maturityDate</code></td><td>number</td><td>false</td><td>The maturity date of the frequent savings.</td></tr><tr><td><code>interestRate</code></td><td>Integer</td><td>false</td><td>The applicable interest rate for the savings.<br><br><em><mark style="color:red;">Percentage should be in at most 3 decimal places</mark>.</em></td></tr><tr><td><code>preferredTime</code></td><td>Integer</td><td>false</td><td>The preferred time for the deduction to occur.<br><br><em><mark style="color:red;">Preferred Time ranges from 0 to 23.</mark></em></td></tr><tr><td><code>imageURL</code></td><td>string</td><td>false</td><td>A URL pointing to an image associated with the savings pocket, for example, a goal image representing what the pocket is saving towards.</td></tr><tr><td><code>targetSavingsURL</code></td><td>string</td><td>false</td><td>A URL associated with the target savings goal, likely used for reference or tracking on the client side.</td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g --request PUT '{{baseurl}}/api/savingsaccount/v1/frequentsavings/update' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "id": ,
  "pocketName": "string",
  "amount": 0,
  "deductionAmount": 0,
  "frequency": "string",
  "commencementDate": "2025-03-14T11:36:17.125Z",
  "maturityDate": "2025-03-14T11:36:17.125Z",
  "interestRate": 0,
  "preferredTime": 0,
  "imageURL": "string",
  "targetSavingsURL": "string"
}'
```

</details>

<details>

<summary>Response: <code>200</code></summary>

```json
{
  "status": true,
  "message": "string"
}
```

</details>
