{info} Mengolah data aliran dana pribadi (catatan keuangan).
https://public-api.delcom.org/api/v1
/cash-flows
Content-Type
: multipart/form-data
Authorization
: Bearer <token>
type
as inflow | outflow
source
as cash | savings | loans
label
as string
description
as string
nominal
as number
{
"success": true,
"message": "Berhasil menambahkan data",
"data": {
"cash_flow_id": 1
}
}
/cash-flows/:id
Content-Type
: application/x-www-form-urlencoded
Authorization
: Bearer <token>
type
as inflow | outflow
source
as cash | savings | loans
label
as string
description
as string
nominal
as number
{
"success": true,
"message": "Berhasil mengubah data"
}
/cash-flows
type
as inflow | outflow
source
as cash | savings | loans
label
as string
start_date
as timestamp
, example: 2024-10-05 00:00:00
end_date
as timestamp
, example: 2024-10-05 23:59:59
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"cash_flows": [
{
"id": 4,
"user_id": 1,
"type": "outflow",
"source": "savings",
"label": "alat-elektronik",
"description": "Membeli kebutuhan keyboard dan mouse",
"nominal": 400000,
"created_at": "2024-10-05T12:09:16.000000Z",
"updated_at": "2024-10-05T12:09:16.000000Z"
},
{
"id": 3,
"user_id": 1,
"type": "outflow",
"source": "cash",
"label": "alat-mandi",
"description": "Membeli kebutuhan alat mandi seperti sabun, odol.",
"nominal": 100000,
"created_at": "2024-10-05T11:28:02.000000Z",
"updated_at": "2024-10-05T11:28:02.000000Z"
},
{
"id": 2,
"user_id": 1,
"type": "inflow",
"source": "cash",
"label": "gaji",
"description": "Gaji bulanan",
"nominal": 2500000,
"created_at": "2024-10-05T11:26:45.000000Z",
"updated_at": "2024-10-05T11:26:48.000000Z"
}
],
"stats": {
"cashflow": 2000000,
"total_outflow": 500000,
"total_outflow_savings": 400000,
"total_outflow_savings_alat-elektronik": 400000,
"total_outflow_label_alat-elektronik": 400000,
"total_outflow_cash": 100000,
"total_outflow_cash_alat-mandi": 100000,
"total_outflow_label_alat-mandi": 100000,
"total_inflow": 2500000,
"total_inflow_cash": 2500000,
"total_inflow_cash_gaji": 2500000,
"total_inflow_label_gaji": 2500000
}
}
}
/cash-flows/:id
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"cash_flow": {
"id": 4,
"user_id": 1,
"type": "outflow",
"source": "savings",
"label": "alat-elektronik",
"description": "Membeli kebutuhan keyboard dan mouse",
"nominal": 400000,
"created_at": "2024-10-05T12:09:16.000000Z",
"updated_at": "2024-10-05T12:09:16.000000Z"
}
}
}
/cash-flows/:id
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil menghapus data"
}
/cash-flows/labels
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"labels": ["gaji", "alat-mandi"]
}
}
/cash-flows/stats/daily
end_date
as timestamp
, example: 2024-10-05 23:59:59
total_data
as number
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"stats_inflow": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 2500000,
"06-10-2024": 0,
"07-10-2024": 0
},
"stats_outflow": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 500000,
"06-10-2024": 0,
"07-10-2024": 0
},
"stats_cashflow": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 2000000,
"06-10-2024": 0,
"07-10-2024": 0
}
}
}
/cash-flows/stats/monthly
end_date
as timestamp
, example: 2024-10-05 23:59:59
total_data
as number
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"stats_inflow": {
"01-2024": 0,
"02-2024": 0,
"03-2024": 0,
"04-2024": 0,
"05-2024": 0,
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 2500000,
"11-2024": 0,
"12-2024": 0
},
"stats_outflow": {
"01-2024": 0,
"02-2024": 0,
"03-2024": 0,
"04-2024": 0,
"05-2024": 0,
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 500000,
"11-2024": 0,
"12-2024": 0
},
"stats_cashflow": {
"01-2024": 0,
"02-2024": 0,
"03-2024": 0,
"04-2024": 0,
"05-2024": 0,
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 2000000,
"11-2024": 0,
"12-2024": 0
}
}
}