# Update Expense Update an existing expense. All fields are required. Endpoint: PUT /expenses/{expenseId} Version: 2.0.0 Security: oauth2, apiKey ## Path parameters: - `expenseId` (string, required) UUID of the expense Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ## Request fields (application/json): - `expense_name` (string, required) Example: "Office Supplies Updated" - `date` (string) Example: "2024-01-15" - `amount` (number) Example: 200 - `category_id` (string) UUID of the expense category Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - `project_id` (integer) ID of the project (optional) Example: 100 - `note` (string) Additional notes about the expense Example: "Updated expense details" - `is_billable` (boolean) Whether the expense is billable Example: true ## Response 200 fields (application/json): - `success` (boolean) Example: true - `data` (object,null) - `message` (string) Example: "Expense updated successfully" - `meta` (object) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 400 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 401 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 403 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 404 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 422 fields (application/json): - `success` (boolean, required) - `message` (string, required) Example: "Validation failed" - `errors` (object, required) Object containing validation error messages for each field Example: {"email":["The email field is required.","The email must be a valid email address."],"firstname":["The firstname field is required."],"role":["The selected role is invalid."]} - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 500 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string)