Add a draft bill to a work order
Records what the job is going to cost. A draft bill lives on the work order until you convert it, which is when it becomes a real vendor bill in the accounting ledger. Requires the work_orders:write permission.
Authorization
AuthorizationstringrequiredPath parameters
workOrderIdstringrequiredThe work order to act on. A Snowflake id, sent as a decimal string.
Body
application/json
dueDatestring · daterequiredWhen the bill is due.
lineItemsobject[]requiredWhat is being charged. At least one line.
billDatestring · dateThe bill's date. Leave it out and today's date is used.
vendorIdstringThe vendor to be paid. Leave it out and the bill cannot be converted until you set one with Update a draft bill.
Response
200 · The draft bill that was added.
idstringrequiredThe draft bill. Once converted, this is the id of the real vendor bill instead.
billDatestring · daterequiredThe bill's date, in the company's timezone.
dueDatestring · dateWhen the bill is due, in the company's timezone. Absent when no date was set.
lineItemsobject[]requiredWhat is being charged.
filesobject[]requiredInvoices and receipts attached to the bill. An empty array when there are none.
addedOnstring · date-timerequiredWhen the draft bill was added, in the company's timezone and without an offset.
addedByVendorbooleanrequiredWhether the vendor added it through their own portal rather than staff adding it here.
approvedbooleanrequiredWhether the draft has been approved. Drafts created through this API are approved from the start.
vendorIdstringThe vendor to be paid. Absent while unset — it is needed before the bill can be converted.
billIdstringThe real vendor bill this draft became. Absent until it is converted.