Shows what correcting an approved bill would change, without writing anything: the supplier (vendor_id), the supplier's number (document_number), the description, and per line (named by its id) the account (account_id or account_code), the tax rule (tax_rule_id or tax_code), the description and the IP Box fields (ip_box_category, ip_box_percentage, ip_box_asset_id, set as the bill page sets them: a category without a percentage claims 100%, a null category clears the percentage and the asset). A line sent as {id, remove: true} is removed, as deleting its row on the bill page does: the totals drop by its net, VAT and gross, the journal is re-posted from the lines left, changes.removed_line_items lists it, and on a bill with payments or vendor credits the open amount drops by as much (a bill its payments now cover is paid). Every field a line does not send stays exactly as stored, IP Box fields included, and so does every bill field the request does not change (the exchange rate among them). A foreign-currency bill with no exchange rate Cybooks can post with (none, or a bare 1 with no source) takes the rate of its date only when the request sends missing_exchange_rate: "document_date": the ECB rate saving the bill in the app gives it, shown in changes.exchange_rate (from and to), with the journal and VAT boxes at that rate. date_of_document (YYYY-MM-DD) moves the bill's date as the bill page does: the journal is re-posted on it, payments and vendor credits keep their own dates and journals, a foreign-currency bill takes the ECB rate of the new date (changes.exchange_rate), and a bill with a preset payment term takes the due date the term gives the new date unless due_date is sent (due_date alone moves the due date; one the term would not give makes the term custom, as the bill page does). Both the old and the new date must be in an open, unfiled period; a bill in a bank file or marked paid already can be re-dated (Pay bills holds its supplier and open amount). The preview then shows changes.date_of_document, changes.due_date and changes.payment_term, the journal's dates_before and dates, and vat_periods: the boxes that move per VAT period, the old period and the new (an estimate from each line's VAT; the journal is what posts). Returns the changes (per line, fields lists every line field that would change, from and to, so nothing changes unseen), the totals before and after, the bill journal before and after re-posting per account (base currency), the VAT return boxes the change moves, warnings and the confirmation token bill.correct needs. Refusals name their code in error.code and at the start of the message: bill_correct_draft, bill_correct_voided, bill_correct_not_posted, bill_correct_period_locked, bill_correct_vat_filed, bill_correct_vendor_paid (a supplier change on a bill with payments or vendor credits), bill_correct_total_paid (a tax rule change that changes the total of a bill with payments or vendor credits), bill_correct_below_paid (a removal that takes the total below what the bill has paid or had credited), bill_correct_keep_a_line (a removal of every line: void the bill instead), bill_correct_total_not_positive (a removal that takes the total to zero or below), bill_correct_awaiting_approval (a removal on a bill with payments that waits for approval), bill_totals_mismatch (the totals left would not agree with the lines left), bill_in_bank_file (a supplier change or a removal while the bill is in a bank file: put it back to To pay in Cybooks), bill_paid_already (a supplier change or a removal while it is marked paid already: take the mark back with bill.paidAlready.undoPreview then bill.paidAlready.undo), bill_correct_stock_line, bill_correct_fixed_asset_line (both also for a removed line stock or a fixed asset was built from), bill_correct_import_vat, bill_correct_no_change, bill_correct_line_unknown, bill_correct_account_unavailable, bill_correct_tax_rule_unavailable, bill_correct_vendor_unavailable, bill_correct_ip_box_invalid, bill_correct_ip_box_no_category (a percentage or asset on a line without an IP Box category), bill_correct_ip_box_capitalized (an IP Box change on, or the removal of, a line in an IP Box capitalization), bill_correct_exchange_rate_unusable (a foreign-currency bill with no rate Cybooks can post with, and no missing_exchange_rate), bill_correct_exchange_rate_present (missing_exchange_rate on a bill that has a rate, or is in the base currency), bill_correct_exchange_rate_paid (missing_exchange_rate on a bill with payments or vendor credits: undo them first; on a bill that made a fixed asset (delete it first) or has an IP Box capitalization it is bill_correct_fixed_asset_line or bill_correct_ip_box_capitalized), bill_correct_exchange_rate_unavailable (no rate for the bill's date or its new date), bill_correct_due_before_date (a due_date before the bill's date); a new date is also refused with bill_correct_period_locked or bill_correct_vat_filed when the old or the new date is closed or filed, with bill_correct_exchange_rate_paid on a foreign-currency bill with payments or vendor credits, and with bill_correct_fixed_asset_line, bill_correct_ip_box_capitalized, bill_correct_import_vat or bill_correct_stock_line on a bill a fixed asset, an IP Box capitalization, import VAT or stock was built from, with bill_correct_landed_cost on a bill with a customs record or a landed cost applied from it, and with bill_correct_accrual_exchange_rate on a foreign-currency bill whose service period ends before the new date; a date or due date change that changes what an approval policy may ask again on (the due date, a foreign-currency bill's amount at the new rate) is refused with bill_in_bank_file or bill_paid_already while Pay bills holds the bill. The required Idempotency-Key binds the token; send the same key and body to bill.correct. Requires the bills:action OAuth scope.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
