Add a new invoice to the database.
Body
Invoice object.
The ID of the administration this invoice belongs to, which also determines its invoice number series. Defaults to the default administration when empty.
The person the invoice is addressed for the attention of. Copied from the client when empty.
The footnote printed below the invoice lines (HTML). Replaced by the G-account footnote when a G-account amount applies and the comment is empty or the default one.
The ID of the client (klant) this invoice is for. Empty contact fields are filled from the client on save, and on create the client's invoicing defaults apply to the export options. Either client_id or company must be set.
The Chamber of Commerce number of the invoiced party. Copied from the client when empty.
The company name of the invoiced party. Copied from the client's name when empty; when no client_id is given, set this to invoice a party that is not a client.
Whether this invoice is finalized. Finalizing assigns the invoice number; a finalized invoice can no longer be changed in its lines, deleted, or given a different sent or due date. Create the invoice as a draft, add its rate lines through the /invoiceitem endpoint with invoice_id, then update the invoice (optionally with confirmed: 1): the update puts the rate lines on the invoice and recalculates the totals. Returned as 1 (yes) or 0 (no).
The settings of this invoice per connected third party application, keyed by connection (e.g. {"exact_online": {"journal": "70"}}).
The country of the invoiced party, returned as the full country name (falls back to the Netherlands). Accepts an ISO 3166-1 alpha-2 code or a country name; copied from the client when empty.
The ID of the default VAT rate of this invoice. When this VAT rate is reverse-charged, no VAT is calculated on the invoice.
The date and time this invoice was archived (soft deleted), or empty when it is not archived.
The total discount of all invoice lines in euros (zero or negative). Calculated automatically from the invoice lines (items). Returned as a numeric string, e.g. "12.50".
The due date of this invoice. Derived from the sent date and the client's (or default) payment term when the invoice is finalized without a valid one, and locked once the invoice is finalized.
The email address the invoice is sent to (max. 50 characters). Copied from the client's invoicing email address (or else its email address) when empty.
Whether the man-day register is attached to this invoice. Returned as 1 (yes) or 0 (no).
Whether the order overview reports of the selected presets are attached to this invoice. Returned as 1 (yes) or 0 (no).
The IDs connected to this invoice in connected third party applications, keyed by connection (e.g. {"exact_online": "..."}).
Whether a G-account amount applies to this invoice. Empty follows the client setting, or else the default setting. Returned as 1 (yes) or 0 (no).
The types of rate lines that are combined into one invoice line when they share the same pricing, unit, description, discount and price. Any of 'operation', 'material', 'vehicle', 'user' or 'weight_type'.
The random 40-character token in the public link of this invoice. Generated automatically on create.
The invoice number. Assigned automatically from the administration's number series when the invoice is finalized (confirmed), and empty while it is a draft.
The lines on the invoice document, from which the totals of this invoice are calculated. They are built automatically from the rate lines linked to this invoice through the /invoiceitem endpoint (with invoice_id) each time the invoice is updated, and cannot be changed directly.
Whether all rate lines are merged into a single invoice line. Returned as 1 (yes) or 0 (no).
The IDs of the presets whose reports are attached to this invoice when export_presets is enabled.
The invoice date printed on the document. Set to today when the invoice is finalized without one, and locked once the invoice is finalized.
The type of the record this invoice was made from. Either 'order' (project), 'suborder' or 'client' (klant). Detected automatically.
The ID of the current invoice status, whose code is one of 'draft', 'confirmed', 'sent_concept', 'sent_email', 'paid', 'credit' or 'credit_old'. Maintained automatically.
The date and time the status of this invoice last changed. Set automatically.
The total amount excluding VAT in euros as a numeric string. Calculated automatically from the invoice lines (items).
The error messages of the last failed sync to connected third party applications, keyed by connection (e.g. {"exact_online": {"invoice": "..."}}). Maintained automatically.
The total VAT amount in euros as a numeric string. Calculated automatically from the invoice lines (items).
The ID of the invoice layout used for the document. When empty, the layout of the client, then the administration, then the default layout is assigned automatically.
The header comment printed above the invoice lines (HTML). Replaced by the G-account header comment when a G-account amount applies and the comment is empty or the default one.
The total amount including VAT in euros as a numeric string. Calculated automatically from the invoice lines (items).
Antwoord
Successful operation.