Update a draft bill

Updates only the supplied fields of an active draft purchase bill. Send If-Match from bill.show and an Idempotency-Key. line_items replaces all lines: send each existing id, quantity, unit_price, discount, discount_type, order, description, tag_dimension_id, ip_box_category, ip_box_percentage, ip_box_asset_id, account_id (the returned chart_of_account_id) or account_code, and tax_rule_id or tax_code. A description, tag_dimension_id or ip_box field left out of a line is cleared; product_id, adds_to_stock_cost and serials left out are kept. unit_price uses tax_type (gross includes VAT, net excludes it), before discount. Resending the returned prices with unchanged quantity and discount preserves the stored line amounts, including rounding; a changed price or quantity is recalculated. When currency, tax basis, line amounts, tax rules and stock classification are unchanged, valid stored header totals keep their printed rounding difference from the line sum (with an import VAT line, up to one cent). Read-only response fields such as amount and chart_of_account_id are not write fields. For an approved bill use bill.correct.preview and bill.correct. Requires the bills:write OAuth scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params

Fields accepted to update a draft bill. The schema identifies required and optional values.

uuid
uuid
string
enum
Allowed:
date
date | null
date | null
date | null
string | null
string | null
string | null
string | null
uuid | null
uuid | null
uuid | null
line_items
array of objects
length ≥ 1
line_items
Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

string

Required. ETag from the latest representation; a stale value returns 412 precondition_failed. Send this header, not the standard If-Match: some HTTP intermediaries evaluate a standard If-Match themselves and can answer 412 even though the change was applied. Never send both; both with different ETags returns 400 conflicting_precondition_headers.

string
deprecated

Accepted with the same value and meaning as Cybooks-If-Match, but do not send it: an intermediary can answer 412 to it after the change was applied. Send Cybooks-If-Match instead.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*