All income sources
curl --request GET \
--url https://cashboard-f5x2.onrender.com/incomeimport requests
url = "https://cashboard-f5x2.onrender.com/income"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cashboard-f5x2.onrender.com/income', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cashboard-f5x2.onrender.com/income",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cashboard-f5x2.onrender.com/income"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cashboard-f5x2.onrender.com/income")
.asString();require 'uri'
require 'net/http'
url = URI("https://cashboard-f5x2.onrender.com/income")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"income": [
{
"source": "Side Hustle: Selling Shoes",
"payDate": "2024-11-02T00:00:00.000Z",
"account": "662fbf9eac827e370c18d4b9",
"category": "side hustle",
"amount": 7000,
"_id": "662fbfcaac827e370c18d4bf"
}
]
}{
"status": "error",
"message": "Income not available"
}Income
All income sources
This endpoint gets all the income sources for the specified user.
Endpoint: https://cashboard-f5x2.onrender.com/income
Query Parameter: User UUID
The response body is a JSON object that includes an array of all the user’s income sources. The individual income object contains:
- the income source (string) - the income’s description
- the payDate (date) - the date the income was paid
- the category (string) - the category of the income
- the account’s id (string) - the account that was credited
- the amount (number) - the amount made from the income source
- _id (string) - the unique identifier for the income
GET
/
income
All income sources
curl --request GET \
--url https://cashboard-f5x2.onrender.com/incomeimport requests
url = "https://cashboard-f5x2.onrender.com/income"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cashboard-f5x2.onrender.com/income', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cashboard-f5x2.onrender.com/income",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cashboard-f5x2.onrender.com/income"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cashboard-f5x2.onrender.com/income")
.asString();require 'uri'
require 'net/http'
url = URI("https://cashboard-f5x2.onrender.com/income")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"income": [
{
"source": "Side Hustle: Selling Shoes",
"payDate": "2024-11-02T00:00:00.000Z",
"account": "662fbf9eac827e370c18d4b9",
"category": "side hustle",
"amount": 7000,
"_id": "662fbfcaac827e370c18d4bf"
}
]
}{
"status": "error",
"message": "Income not available"
}Query Parameters
required
Response
OK
The response is of type object.

