Create draft invoice
bexio_create_draft_invoiceWRITE: create a DRAFT invoice in bexio for a contact, with custom, item (article) and text lines. It is never issued, sent or booked: the user reviews and issues it in bexio. Taxes must be active sales taxes (bexio_list_taxes with types sales_tax, scope active).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Invoice title. | |
| footer | No | Text below the lines. | |
| header | No | Text above the lines. | |
| user_id | No | Responsible bexio user (default: the signed-in user). | |
| tax_mode | No | net = unit prices are net and VAT is added (default); gross = unit prices include VAT; exempt = the invoice is exempt from VAT. | |
| valid_to | No | Due date, yyyy-mm-dd (default from the payment terms). | |
| positions | Yes | 1-150 invoice lines. | |
| reference | No | Customer reference shown on the invoice. | |
| contact_id | Yes | The customer contact (from bexio_list_contacts). | |
| project_id | No | Link to this project. | |
| valid_from | No | Invoice date, yyyy-mm-dd (default today). | |
| currency_id | No | Currency (from bexio_list_currencies); company default when omitted. | |
| document_nr | No | Invoice number. Only when automatic numbering is OFF in bexio's settings (then it is required); leave empty with automatic numbering. | |
| language_id | No | Document language id; the contact's language when omitted. | |
| api_reference | No | Your own external reference (only visible through the API). | |
| contact_sub_id | No | A contact person of the customer. | |
| bank_account_id | No | Bank account for the payment slip (from bexio_list_bank_accounts); default when omitted. | |
| payment_type_id | No | Payment type id; default when omitted. |