POST
Expenses.Update
Update an expense in expenses_new using the same field mapping as Expenses.Add / dashboard Expences::add_expenses. Send id plus only the fields to change. month accepts YYYY-MM and is stored as mmyy. Changing document_type to receipt / receipt_tax_invoice sets paid_status=1 (otherwise 0) when paid_status is not sent.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Updates the requested Expenses record after validating permissions and input fields.
Push Service
Pushes event expenses.updated to users who should see this change.
Automation
No automation is run for this function.
Special Instructions
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
idpost | int | 900 | Expense id to update. Alias: expense_id. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
category_idpost | int | 224 | Updates category. |
amountpost | number | 224.00 | Updates amount. |
document_typepost | string | invoice | delivery_invoice | invoice | receipt_tax_invoice | receipt. |
monthpost | string | 2026-07 | YYYY-MM or mmyy. Stored as mmyy. |
expense_namepost | string | Office rent | Updates EXPENSE NAME (expenses_name). Aliases: name, expenses_name. |
customer_idpost | int | 123 | Updates CHOOSE CUSTOMER. Aliases: cust_id, contactus_id. |
sub_category_idpost | int | 45 | Updates sub category. Alias: sub_category. |
project_idpost | int | 700 | Updates project. |
vat_includespost | int | 1 | VAT included. Alias: expences_text_includes. |
notespost | string | Office supplies | Updates note. |
payment_datepost | date | 2026-07-17 | Updates payment date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
check_numberpost | string | CHK-100 | Updates check number. |
invoice_numberpost | string | INV-25 | Updates invoice number. |
document_datepost | date | 2026-07-17 | Updates document date. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
supplier_idpost | int | 80 | Updates supplier. |
file_pathpost | url | https://example.com/receipt.jpg | Updates image URL. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Expenses.Update",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"id": "900",
"expense_name": "Office rent updated",
"customer_id": "123",
"amount": "250.00"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Expenses.Update",
"url_domain": "https:\/\/{domain}\/app\/Expenses.Update"
}Endpoint
POST /app/Expenses.Update
POST https://{user}.bull36.com/app/Expenses.Update
POST https://{domain}/app/Expenses.UpdateSample Output
{
"success": 1,
"id": "900",
"message": "Record updated successfully.",
"automation_event": null,
"socket_event": "expenses.updated"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({
id: '900',
expense_name: 'Office rent updated',
customer_id: '123',
amount: '250.00'
});
const res = await fetch('/app/Expenses.Update', {
method: 'POST',
headers: { Authorization: 'Bearer ' + token },
body
});
console.log(await res.json());Error Example
{
"success": 0,
"message": "Record was not found."
}