GET /budgets/list/{event_id}
Replace {event_id} with the ID of the event to retrieve budgets.
{
"status": "success",
"return_count": 2,
"data": [
{
"id": 1,
"name": "Budget 1",
"total_amount": 500.00,
"items_count": 3
},
{
"id": 2,
"name": "Budget 2",
"total_amount": 1000.00,
"items_count": 2
}
]
}
The response includes the status, total number of budgets, and an array of budget details.
GET /budgets/view/{id}
Replace {id} with the ID of the budget you want to view.
{
"status": "success",
"return_count": 1,
"data": {
"id": 1,
"name": "Budget 1",
"total_amount": 500.00,
"items_count": 3
}
}
The response includes the status, total number of budgets (1 in this case), and details of the requested budget.
POST /budgets/create/{event_id}
Replace {event_id} with the ID of the event to which the budget belongs.
application/json{
"name": "New Budget",
"description": "Description for New Budget"
}
{
"status": "success",
"message": "Budget saved successfully"
}
{
"status": "error",
"message": "Budget failed to save"
}
{
"status": "error",
"message": "Invalid request method"
}
POST /budgets/update/{id}
Replace {id} with the ID of the budget you want to update.
application/json{
"name": "Updated Budget",
"description": "Updated description for Budget"
}
{
"status": "success",
"message": "Budget saved successfully"
}
{
"status": "error",
"message": "Budget failed to save"
}
{
"status": "error",
"message": "Invalid request method"
}
POST /budgets/delete/{id}
Replace {id} with the ID of the budget you want to delete.
{
"status": "success",
"message": "Budget deleted successfully"
}
{
"status": "error",
"message": "Budget failed to delete"
}
{
"status": "error",
"message": "Invalid request method"
}
GET /budgets/list-items/{id}
Replace {id} with the ID of the budget to retrieve items.
{
"status": "success",
"return_count": 3,
"data": [
{
"id": 1,
"name": "Item 1",
"amount": 100.00
},
{
"id": 2,
"name": "Item 2",
"amount": 200.00
},
{
"id": 3,
"name": "Item 3",
"amount": 300.00
}
]
}
The response includes the status, total number of items, and an array of item details for the specified budget.
POST /budgets/create-item/{id}
Replace {id} with the ID of the budget to which the item belongs.
application/json{
"name": "New Item",
"amount": 200.00
}
{
"status": "success",
"message": "Item saved successfully"
}
{
"status": "error",
"message": "Item failed to save"
}
{
"status": "error",
"message": "Invalid request method"
}
POST /budgets/update-item/{id}
Replace {id} with the ID of the budget item you want to update.
application/json{
"name": "Updated Item",
"amount": 150.00
}
{
"status": "success",
"message": "Item saved successfully"
}
{
"status": "error",
"message": "Item failed to save"
}
{
"status": "error",
"message": "Invalid request method"
}
POST /budgets/delete-item/{id}
Replace {id} with the ID of the budget item you want to delete.
{
"status": "success",
"message": "Item deleted successfully"
}
{
"status": "error",
"message": "Item failed to delete"
}
{
"status": "error",
"message": "Invalid request method"
}