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

NameTypeSampleExplanation
id
post
int900Expense id to update. Alias: expense_id.

Optional Parameters

NameTypeSampleWhat it gives
category_id
post
int224Updates category.
amount
post
number224.00Updates amount.
document_type
post
stringinvoicedelivery_invoice | invoice | receipt_tax_invoice | receipt.
month
post
string2026-07YYYY-MM or mmyy. Stored as mmyy.
expense_name
post
stringOffice rentUpdates EXPENSE NAME (expenses_name). Aliases: name, expenses_name.
customer_id
post
int123Updates CHOOSE CUSTOMER. Aliases: cust_id, contactus_id.
sub_category_id
post
int45Updates sub category. Alias: sub_category.
project_id
post
int700Updates project.
vat_includes
post
int1VAT included. Alias: expences_text_includes.
notes
post
stringOffice suppliesUpdates note.
payment_date
post
date2026-07-17Updates 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_number
post
stringCHK-100Updates check number.
invoice_number
post
stringINV-25Updates invoice number.
document_date
post
date2026-07-17Updates 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_id
post
int80Updates supplier.
file_path
post
urlhttps://example.com/receipt.jpgUpdates 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.Update

Sample 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."
}