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
JSONRequest Parameters
| Parameter | Type | Required | Validation | Description |
|---|---|---|---|---|
| _method | String | Required | string, required, in:PUT | Must be set to PUT |
| fund_id | Integer | Required | integer, required, exists:funds,id | ID of the fund |
| expense_category_id | Integer | Required | integer, required, exists:expense_categories,id | ID of the expense category |
| amount | Numeric | Required | numeric, required, min:0.01 | Expense amount |
| date | Date | Optional | date, nullable, format:Y-m-d | Date of the expense (defaults to today) |
| note | String | Optional | string, nullable, max:255 | Additional notes |
| branch_id | Integer | Optional | integer, nullable, exists:branches,id | ID of the branch |
| file | File | Optional | file, nullable, max:2048, mimes:pdf,jpg,jpeg,png | Attachment file |
| status | Boolean | Optional | boolean | Status (1=Active, 0=Inactive) |
Response
200 OKStatus Code
HTTP status code (200)
Message
Expense updated successfully
Data
Updated expense object