PUT
/
savings
/
{id}
Update Saving
curl --request PUT \
  --url https://cashboard-f5x2.onrender.com/savings/{id} \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 50000,
  "account": "662fbf9eac827e370c18d4b9",
  "date": "01/12/2024"
}'
{
  "savings": [
    {
      "currentAmount": 0,
      "desc": "New Car",
      "goal": "950000",
      "currency": "KSH",
      "_id": "662fd2808f1d17198913a0c8",
      "createdAt": "2024-04-29T17:01:52.662Z",
      "updatedAt": "2024-04-29T17:01:52.662Z"
    },
    {
      "desc": "New Car",
      "goal": "950000",
      "currentAmount": 50000,
      "currency": "KSH",
      "_id": "662fed844c9c64845b5d085c",
      "createdAt": "2024-04-29T18:57:08.338Z",
      "updatedAt": "2024-04-29T19:35:03.034Z"
    }
  ]
}

Path Parameters

id
string
required

Query Parameters

user
string

Body

application/json · object

Response

200
application/json

OK

The response is of type object.