> ## 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.

# User Details

> This endpoint gets a user's details.

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

Path Parameter: User's UUID

The response body is a JSON object that returns the new user. The user object contains the following properties:

- username(string) - the user's username
- email(string) - the user's email
- password(string) - the user's password
- currency(string) - the user's currency
- accounts(array) - all the user's accounts
- income(array) - all the user's income sources
- expenses(array) - all the user's expenses
- savings(array) - all the user's saving goals
- investments(array) - all the user's investments
- reports(array) - all the user's reports
- transactions(array) - all the user's transactions



## OpenAPI

````yaml get /user/{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:
  /user/{id}:
    get:
      tags:
        - User
      summary: User Details
      description: >-
        This endpoint gets a user's details.


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


        Path Parameter: User's UUID


        The response body is a JSON object that returns the new user. The user
        object contains the following properties:


        - username(string) - the user's username

        - email(string) - the user's email

        - password(string) - the user's password

        - currency(string) - the user's currency

        - accounts(array) - all the user's accounts

        - income(array) - all the user's income sources

        - expenses(array) - all the user's expenses

        - savings(array) - all the user's saving goals

        - investments(array) - all the user's investments

        - reports(array) - all the user's reports

        - transactions(array) - all the user's transactions
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: required
          example: '{{uuid}}'
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Mon, 29 Apr 2024 15:29:40 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: 87c054309814578b-IAD
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            ETag:
              schema:
                type: string
                example: W/"176-cTm2HOArTEGhbCpGiyqH45jsxDI"
            Vary:
              schema:
                type: string
                example: Origin, Accept-Encoding
            rndr-id:
              schema:
                type: string
                example: 41e2401d-da75-4659
            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:
                _id: 662fbbe0ac827e370c18d4b0
                username: michellemso
                email: michellemuthoni2@gmail.com
                password: $2a$10$yjp6lyCU6.jwQrhOG/7kjOnCJQC5uSbk2gs62oj8EqGN0s5lU3UM.
                currency: KSH
                accounts: []
                income: []
                expenses: []
                savings: []
                investments: []
                reports: []
                transactions: []
                createdAt: '2024-04-29T15:25:20.377Z'
                updatedAt: '2024-04-29T15:25:20.377Z'
                __v: 0
        '500':
          description: Internal Server Error
          headers:
            Date:
              schema:
                type: string
                example: Mon, 29 Apr 2024 16:01:38 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: 87c08308eee95884-IAD
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            ETag:
              schema:
                type: string
                example: W/"4a-fOMG1BJva1s/NJ/TCi6cViPmbMw"
            Vary:
              schema:
                type: string
                example: Origin, Accept-Encoding
            rndr-id:
              schema:
                type: string
                example: d8e328d6-c028-4b3c
            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: We couldn't find the user. Please try again

````