Update bill

Full update of a bill or invoice: optional fields that are omitted are cleared. First retrieve the current bill from /api/bills/{id}, apply your changes, then send back the full object. When editing a repeating bill, include its schedules and set changeSchedule to true if the recurrence changed. Fully settled bills are locked and cannot be edited.

Required permission: Full Write Accounting

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int32
required
≥ 1

The id of the bill

Body Params

The current version of the bill

account
object | null
required

The accounts-payable or accounts-receivable control account the bill posts to. Must be a liability account for payables and an asset account for receivables. Provide the id.

payee
object | null
required

The payee: the vendor (payables) or customer (receivables). Provide the id.

int32
required

The record type: 1 = bill (payable), 2 = invoice (receivable).

items
array of objects | null
required

The bill's expense or income line items. At least one line with an account and amount is required.

items*
boolean | null

Set to true when an edit changes the repeating schedules; otherwise the existing recurrence is kept.

int32 | null

The id of the bill.

schedules
array of objects | null

For repeating bills, the recurrence schedules that drive when each bill is created. Providing at least one schedule makes the bill a repeating template.

schedules
string | null

The bill's reference (or invoice number).

string | null

The bill's memo.

date | null

The bill (or invoice) date. Required for one-time bills; repeating bills derive it from the schedule.

terms
object | null

The payment terms. Provide the id: 0 = None, 1 = Due on receipt, 2 = Net 15, 3 = Net 30, 4 = Net 45, 5 = Net 60.

date | null

The date the bill is due.

repeatType
object | null

For repeating bills, what happens on each occurrence. Provide the id: 1 = create the bill automatically, 2 = only remind someone to create it.

int32 | null

For repeating bills, how many days before the due date the bill is created.

string | null

Internal notes on the bill.

files
array of objects | null

Files attached to the bill. To attach one, upload it first with type journal_entry and no linkedTo, then send the returned file id here. Attaching is additive: files that are already attached stay attached when they are left out, and are removed only by deleting the file. Repeating bill templates do not support files.

files
boolean

For invoices, whether the invoice is emailed to the customer: immediately when saving a one-time invoice, or each time a repeating invoice is created. Requires email.

email
object | null

For invoices, the email sent to the customer when send is true.

reminder
object | null

For repeating bills with repeatType 2, the person reminded before the next bill is due. Provide the id.

options
object | null

Online payment options for the invoice.

accounts
object | null

The accounts used to record processing fees for online invoice payments. The expense account is required for every receivable; the income account is also required when options.fees is true. Provide the ids.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json