POST
/
investment
/
add
Create an Investment
curl --request POST \
  --url https://cashboard-f5x2.onrender.com/investment/add \
  --header 'Content-Type: application/json' \
  --data '{
  "desc": "Bitcoin",
  "category": "Cryptocurrency",
  "account": "662fbf9eac827e370c18d4b9",
  "date": "03/21/2024",
  "amount": 5000
}'
{
  "investments": [
    {
      "desc": "Bitcoin",
      "currentAmount": 95000,
      "category": "Cryptocurrency",
      "_id": "662ff8a5712cd9fd793e1fb7",
      "createdAt": "2024-04-29T19:44:37.441Z",
      "updatedAt": "2024-04-29T19:44:37.441Z"
    },
    {
      "desc": "Bitcoin",
      "currentAmount": 5000,
      "category": "Cryptocurrency",
      "_id": "662ff9e36e0d87944a3c4cf7",
      "createdAt": "2024-04-29T19:49:55.065Z",
      "updatedAt": "2024-04-29T19:49:55.065Z"
    },
    {
      "desc": "Bitcoin",
      "currentAmount": 5000,
      "category": "Cryptocurrency",
      "_id": "662ffab8df4fbf42a526c6d5",
      "createdAt": "2024-04-29T19:53:28.755Z",
      "updatedAt": "2024-04-29T19:53:28.755Z"
    }
  ]
}

Query Parameters

user
string

Body

application/json · object

Response

200
application/json

OK

The response is of type object.