Expenses

POST

Update Expense

Update an existing expense's information. Note: Use POST method with _method=PUT to handle file uploads.

Required Permission: Edit Expense
POST /expenses/{id}

Request Body

JSON

    

Request Parameters

Parameter Type Required Validation Description
_methodStringRequiredstring, required, in:PUTMust be set to PUT
fund_idIntegerRequiredinteger, required, exists:funds,idID of the fund
expense_category_idIntegerRequiredinteger, required, exists:expense_categories,idID of the expense category
amountNumericRequirednumeric, required, min:0.01Expense amount
dateDateOptionaldate, nullable, format:Y-m-dDate of the expense (defaults to today)
noteStringOptionalstring, nullable, max:255Additional notes
branch_idIntegerOptionalinteger, nullable, exists:branches,idID of the branch
fileFileOptionalfile, nullable, max:2048, mimes:pdf,jpg,jpeg,pngAttachment file
statusBooleanOptionalbooleanStatus (1=Active, 0=Inactive)

Response

200 OK
Status Code
HTTP status code (200)
Message
Expense updated successfully
Data
Updated expense object