Invoices: create invoice
invoices_createCreate a final outgoing invoice for a customer and book it immediately. Provide recipient, line items, prices, and VAT to generate a numbered invoice.
Instructions
🟡 WRITE · creates data: Creates new records (receipts, transactions, postings, invoices, master data). Not idempotent: calling twice may create duplicates.
create invoice
Add an invoice for the specified customer.
Use to issue a final outgoing invoice that is booked immediately.
For an invoice that should stay editable, use invoices_create_draft. For a structured XML invoice in XRechnung or ZUGFeRD format, use invoices_create_e_invoice.
Not idempotent: a second call issues a second invoice with a new number. v1 offers no endpoint to list, change or cancel an invoice once created.
Endpoint: POST /invoices/create
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | The zip of the recipient company. If specified, the field will be validated. | |
| city | No | The city of the recipient company. If specified, the field will be validated. | |
| date | Yes | The date of the invoice. | |
| type | Yes | Can be either 'invoice' ("Rechnung"), 'credit' ("Gutschrift") or 'offer' ("Angebot"). | |
| No | The email for sending the invoice. If specified, the field will be validated. | ||
| street | No | The street of the recipient company. If specified, the field will be validated. | |
| country | No | The country of the recipient company. If specified, the field will be validated. Valid cases are only the German version of the country name [Dänemark] OR the two digit ISO code of the country [DK]. | |
| due_days | No | The number of days between the invoice date and the due date. If specified, the field will be validated. | |
| item_vat | Yes | An array of invoice item vats. Usage: "item_vat" : ['7', '19'] Valid vat rates are floating point numbers between 0 and 100. | |
| language | No | The language for translatable invoice labels (e.g. headings, table headers, payment terms). Can be either 'de_DE' ("Deutsch", default) or 'en_US' ("English"). If omitted, German is used. | |
| item_name | Yes | An array of invoice items. Usage: "item_name" : ['Item 1', 'Item 2'] | |
| item_unit | Yes | An array of invoice items units. Usage: "item_unit" : ['Std.', 'Stk.'] | |
| item_amount | Yes | An array of invoice item amounts. Usage: "item_amount" : ['10', '20'] | |
| company_name | Yes | The company name of the recipient. | |
| discount_type | No | The type of the discount. Can be either 'percent' or 'EUR'. If specified, the field will be validated. | |
| invoicenumber | No | The invoicenumber for the invoice. If not specified, the default BHB number will be created. If specified, the field will be validated. | |
| show_bankdata | No | Show the the bank data on the invoice. If specified, the field will be validated. | |
| correspondence | No | The optional correspondence to the invoice recipient. If specified, the field will be validated. | |
| date_of_supply | No | Date or period of service/delivery. NOTE: The date_of_supply will be displayed on the PDF, but when the date AND the date_of_supply is specified in the format "YYYY-MM-DD", the date_of_supply will also be taken over as date_delivery of the receipt in the 'Belege' or 'Belege/Buchen' view. IMPORTANT: Due to the DATEV compatibility, we cannot accept a date_of_supply that is after the invoice date. In that case it will be ignored! | |
| discount_value | No | The value of granted discount. If specified, the field will be validated. | |
| customer_number | No | The customer number of the recipient. If specified, the field will be validated. | |
| final_provisions | No | The final comment of the invoice. If specified, the field will be validated. | |
| item_description | No | An array of invoice item description. Usage: "item_description" : ['Description Item 1', 'Description Item 2']. If specified, the field will be validated. | |
| show_contactdata | No | Show the contact data on the invoice. If specified, the field will be validated. | |
| show_prices_type | Yes | Can be either 'net' ("Netto") or 'gross' ("Brutto"). | |
| item_single_price | Yes | An array of invoice item single_prices. Usage: "item_single_price" : ['20', '19.99'] | |
| payment_reference | No | The payment reference id. If specified correctly, the resulting receipt of the created invoice will match with the corresponding transaction. NOTE: Currently we support Amazon order id, PayPal transaction id and Stripe transaction id! | |
| payment_conditions | No | The payment conditions of the invoice. If specified, the field will be validated. | |
| recurring_interval | No | An interval for recurring invoices. Can be either 'weekly', 'monthly', 'quarterly' or 'yearly'. If specified, the field will be validated. | |
| contact_person_name | No | The name of the contact person of the recipient company. If specified, the field will be validated. | |
| recurring_date_next | No | The next date of a recurring invoice. IMPORTANT: The field is required, if "recurring_interval" is specified. If specified, the field will be validated. | |
| additional_addressline | No | The additional address information of the recipient company. If specified, the field will be validated. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | blank | |
| success | Yes | Success boolean | |
| file_name | No | Filename of the created invoice | |
| invoicenumber | No | blank | |
| id_by_customer | No | blank |