Update a vendor bill
Changes the fields you send on a vendor bill. Sending lineItems replaces the whole set. Requires the vendor_bills:write permission, plus vendor_bills:read, because the endpoint reads the bill back to return it.
Authorization
AuthorizationstringrequiredPath parameters
vendorBillIdstringrequiredSnowflake id of the vendor bill.
Body
application/json
Every field is optional and only the ones you send are applied; there is no way to clear memo, reference or a property context through this endpoint. lineItems is a full replacement — a line you send with its id keeps its existing payment allocations, a line with no id is created fresh, and a line you leave out is dropped.
companyBillbooleanSwitch the bill between company-owed and owner-owed. true is only accepted for companies that have the company ledger enabled.
billDatestring · dateThe date the vendor issued the bill.
dueDatestring · dateThe date the vendor expects payment.
vendorIdstringMove the bill to a different vendor. It must exist in this company.
memostringFree-text note, up to 1000 characters.
referencestringThe vendor's own invoice number, up to 150 characters.
propertyIdstringRe-stamp the property context on every line item. Requires lineItems to be sent as well when any existing line has no property.
unitIdstringRe-stamp the unit context on every line item.
leaseIdstringRe-stamp the lease context on every line item.
lineItemsLineItem[]The complete new set of lines, at least one.
adjustPaymentsbooleanRequired to be true before a bill that already has payment allocations can be changed at all. When true the allocated transactions are rewritten to match the new lines; when false and any allocation exists the call is rejected.
Response
200 · The vendor bill after the change, read back in full.
idstringSnowflake id of the vendor bill.
createdstring · date-timeWhen the bill was recorded, in the company's timezone.
updatedstring · date-timeWhen the bill was last changed, in the company's timezone.
companyBillbooleantrue when the management company owes this bill itself; false when a property owner does, in which case every line carries a property context.
billDatestring · dateThe date the vendor issued the bill.
dueDatestring · dateThe date the vendor expects payment.
memostringFree-text note on the bill. Absent when none was set.
referencestringThe vendor's own invoice number or reference. Absent when none was set.
sourceTypeenum<string>What the bill was raised from. Absent when it is not linked to anything.
sourceIdstringId of the record named by sourceType. Absent when sourceType is.
vendorIdstringThe vendor who issued the bill.
statusenum<string>Where the bill sits in the approval flow. Bills created through this API start as draft; none of these endpoints move it on.
assignedToIdstringThe property manager the bill is waiting on. Absent while nobody is assigned.
assignedByIdstringThe property manager who assigned it. Absent while nobody is assigned.
assignedAtstring · date-timeWhen it was assigned, in the company's timezone. Absent while nobody is assigned.
totalAmountnumberSum of every line item's amount, as a decimal.
allocatedAmountnumberSum of every line item's allocatedAmount — how much of the bill has been paid.
dueAmountnumbertotalAmount minus allocatedAmount — what is still outstanding on the bill.
lineItemsLineItem[]The bill's lines, in order. There is always at least one.
filesFile[]Scanned invoices and other attachments.
creatorobjectWho recorded the bill. Deprecated mirrors of id — propertyManagerId, tenantId, vendorId, ownerId — are also present, whichever matches type.
400 · The bill has payment allocations and `adjustPayments` was not `true`; or `lineItems` is empty, has a zero or negative amount, or leaves a line without a property context on an owner bill.
401 · The access token is missing, expired, or not for this company.
403 · The caller does not hold both the `vendor_bills:write` and `vendor_bills:read` permissions. A caller holding only `vendor_bills:write` gets a 403 **after the change has been applied**, because the response is read back through the read-gated path.
404 · The bill is not in this company, the `vendorId` names no vendor, or a `chartOfAccountId` names no account visible to this company.
422 · A `chartOfAccountId` is not an expense account, or `companyBill` is `true` for a company that does not have the company ledger enabled.
A bill with allocations cannot be edited without it. Setting it to true re-spreads the existing payment transactions across the new line items — the transactions themselves are adjusted, not just the bill.