> ## Documentation Index
> Fetch the complete documentation index at: https://mitchsorg.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Investment

> This endpoint returns the specified investment.

Endpoint: https://cashboard-f5x2.onrender.com/investment/:id

Query Parameters: User UUID

Path Parameters: Investment ID

The response body is a JSON object that contains the specified investment with the following details:

- desc (string) - A description of the investment account
    
- category (string) - Category for the investment
    
- currentAmount (number) - the investment's balance
    
- _id (string) - the unique identifier for the investment
    
- createdAt (timestamp) - whenthe investment was created
    
- updatedAt (timestamp) - when the investment was last updated



## OpenAPI

````yaml get /investment/{id}
openapi: 3.0.0
info:
  title: Cashboard API
  description: >-
    Cashboard is a personal finance tool that helps users keep track of their
    income, expenses, savings and investments.


    API URL: `https://cashboard-f5x2.onrender.com`


    The Cashboard API has endpoints for:


    - Users

    - Accounts

    - Income

    - Expenses

    - Savings

    - Investments
  version: 1.0.0
servers:
  - url: https://cashboard-f5x2.onrender.com
security: []
tags:
  - name: User
    description: |-
      Cashboard uses the users endpoint to:

      - create a new user
      - get a user details
      - update user details
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/user`
  - name: Account
    description: |-
      These endpoints are used to:

      - create account
      - get all user's accounts
      - get account
      - update accounts
      - delete accounts.
          

      The endpoint URL is: `https://cashboard-f5x2.onrender.com/account`
  - name: Income
    description: |-
      These endpoints are used to:

      - create an income source
      - get all income source
      - get an income source
      - update income source
      - delete income source
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/income`
  - name: Expenses
    description: |-
      These endpoints are used to:

      - create an expense
      - get all expenses
      - get an expense
      - update an expense
      - delete an expense
          

      The endpoint URL is: `https://cashboard-f5x2.onrender.com/expenses`
  - name: Savings
    description: |-
      These endpoints are used to:

      - create a saving
      - get all savings
      - get a saving
      - update a saving
      - delete a saving
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/savings`
  - name: Investments
    description: |-
      These endpoints are used to:

      - create an investment
          
      - get all investments
          
      - get an investment
          
      - update an investment
          
      - delete an investment
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/investments`
paths:
  /investment/{id}:
    get:
      tags:
        - Investments
      summary: Investment
      description: >-
        This endpoint returns the specified investment.


        Endpoint: https://cashboard-f5x2.onrender.com/investment/:id


        Query Parameters: User UUID


        Path Parameters: Investment ID


        The response body is a JSON object that contains the specified
        investment with the following details:


        - desc (string) - A description of the investment account
            
        - category (string) - Category for the investment
            
        - currentAmount (number) - the investment's balance
            
        - _id (string) - the unique identifier for the investment
            
        - createdAt (timestamp) - whenthe investment was created
            
        - updatedAt (timestamp) - when the investment was last updated
      parameters:
        - name: user
          in: query
          schema:
            type: string
          example: '{{uuid}}'
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: 662ff8a5712cd9fd793e1fb7
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 29 Apr 2024 19:57:07 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            Connection:
              schema:
                type: string
                example: keep-alive
            CF-Ray:
              schema:
                type: string
                example: 87c1dbf88adb205e-IAD
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            ETag:
              schema:
                type: string
                example: W/"b3-VBCqXYw7JJAfnyEikdRUukk4IHo"
            Vary:
              schema:
                type: string
                example: Origin, Accept-Encoding
            rndr-id:
              schema:
                type: string
                example: 17e007c9-491d-4f5c
            x-powered-by:
              schema:
                type: string
                example: Express
            x-render-origin-server:
              schema:
                type: string
                example: Render
            Server:
              schema:
                type: string
                example: cloudflare
            Content-Encoding:
              schema:
                type: string
                example: br
            alt-svc:
              schema:
                type: string
                example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
              example:
                desc: Bitcoin
                currentAmount: 95000
                category: Cryptocurrency
                _id: 662ff8a5712cd9fd793e1fb7
                createdAt: '2024-04-29T19:44:37.441Z'
                updatedAt: '2024-04-29T19:44:37.441Z'
        '500':
          description: Internal Server Error
          headers:
            Date:
              schema:
                type: string
                example: Mon, 29 Apr 2024 19:56:36 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            Connection:
              schema:
                type: string
                example: keep-alive
            CF-Ray:
              schema:
                type: string
                example: 87c1db35db3d8205-IAD
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            ETag:
              schema:
                type: string
                example: W/"3b-NPibye38wpywAVvvDHgmIZo5rWU"
            Vary:
              schema:
                type: string
                example: Origin, Accept-Encoding
            rndr-id:
              schema:
                type: string
                example: 89d75afd-012a-453b
            x-powered-by:
              schema:
                type: string
                example: Express
            x-render-origin-server:
              schema:
                type: string
                example: Render
            Server:
              schema:
                type: string
                example: cloudflare
            alt-svc:
              schema:
                type: string
                example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
              example:
                status: error
                message: Could not find an investment

````