Create a vendor bill
Records a bill from a vendor and returns it as draft. Every line item is booked to an expense account and must be a positive amount. Requires the vendor_bills:write permission, plus vendor_bills:read, because the endpoint reads the bill back to return it.
Authorization
AuthorizationstringrequiredBody
application/json
propertyId, unitId and leaseId set the property context for the whole bill, not per line: whichever you send is resolved to a portfolio/property/unit/lease set and stamped onto every line item. One of them is required unless companyBill is true.
companyBillbooleanrequiredtrue when the management company owes the bill itself. false when a property owner does — then a property context is required. true is only accepted for companies that have the company ledger enabled.
billDatestring · daterequiredThe date the vendor issued the bill.
dueDatestring · daterequiredThe date the vendor expects payment.
vendorIdstringrequiredThe vendor who issued the bill. It must exist in this company.
memostringFree-text note, up to 1000 characters.
referencestringThe vendor's own invoice number, up to 150 characters.
portfolioIdstringAccepted by the endpoint but not used when resolving the property context — send propertyId, unitId or leaseId instead.
propertyIdstringThe property the whole bill is for.
unitIdstringThe unit the whole bill is for.
leaseIdstringThe lease the whole bill is for.
lineItemsLineItem[]requiredAt least one line. Their order in the array becomes each line's order.
Response
200 · The vendor bill that was created, 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.