Preview a new bill

Shows the draft bill bill.store would save from the same body, without writing anything and without a confirmation token: the supplier (vendor, its id and name, null for a supplier not created yet); per line the account, the tax rule (import_vat true for an import VAT rule), the quantity, unit price, entered amount, and the net, VAT and gross the bill carries; the bill totals; the currency and exchange_rate (status base_currency, document_date with the ECB rate of the document date and its source, or at_approval when no ECB rate can be read now and approval takes the document date's); and period_state (open, locked or filed) for the document date. vendor_id may be left out when the bill is for a supplier not created yet: send supplier_name instead, and optionally supplier_vat_id and supplier_country_id (the supplier's VAT number and country, used only by the zero-rate check Cybooks AI runs in the app's chat, and never saved), and the supplier's own checks (the duplicate number among them) run on bill.store. Every other check of bill.store applies, with the same refusals (bill_line_account_unavailable, bill_line_tax_rule_unavailable, bill_line_tax_rule_mismatch, a duplicate supplier number). attachment_ids is checked as on bill.store and echoed as attachments (id, name). Requires the bills:write OAuth scope.

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

Proposed values used to preview a new bill without persisting changes.

bill.store.preview (Brain foundation C6a): the body bill.store takes,
checked the same way, except that the supplier may be one not created yet:
without vendor_id, supplier_name names it, with supplier_vat_id,
supplier_country_id, supplier_legal_name, supplier_registration_number,
supplier_email and supplier_phone when they are known.

uuid | null
uuid
required
string
enum
required
Allowed:
date
required
date | null
date | null
date | null
string | null
string | null
string | null
string | null
uuid | null
uuid | null
uuid | null

Where the stock goes; the main warehouse when empty.

string | null

The supplier not created yet, as far as it is known: for Cybooks AI's zero-rate check.

uuid | null
string | null

The supplier's company registration number, for the same check. Never saved.

string | null

The supplier's email, for the same check. Never saved.

string | null

The supplier's phone, for the same check. Never saved.

attachment_ids
array of uuids | null
attachment_ids
line_items
array of objects
required
length ≥ 1
line_items*
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
*/*