Create an invoice (issues a real numbered document)
vyfakturuj_create_invoiceWRITE. Creates a document in Vyfakturuj. Vyfakturuj has NO draft state: the document is issued at once and takes the next number of its number series (delete or cancel it in Vyfakturuj if wrong). Does NOT send an e-mail to the customer, does NOT mark it paid and moves no money; automatic reminders and paid notices are switched off for it (disable_automated_mails). Name the customer with id_customer (an address-book contact, from vyfakturuj_list_contacts) or with the customer_* fields. Items need text and unit_price. Optional id_number_series / id_payment_method come from vyfakturuj_list_number_series / vyfakturuj_list_payment_methods; the account defaults apply otherwise. Prices are net unless calculate_vat is 2 (gross). POST /invoice/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| VS | No | Variable symbol (default: derived from the number). | |
| type | No | Document type: 1 faktura (default), 2 zalohova faktura, 4 proforma faktura, 8 vyzva k platbe, 512 objednavka. | |
| items | Yes | Document items (1-200). | |
| currency | No | Currency, ISO 4217 (default: the account's). | |
| days_due | No | Days until due (splatnost). | |
| language | No | Language of the document. | |
| customer_IC | No | Customer ICO (company id). | |
| id_customer | No | Address-book contact id (from vyfakturuj_list_contacts); fills the customer block. | |
| customer_DIC | No | Customer DIC (VAT id). | |
| customer_zip | No | Customer postal code (PSC). | |
| date_created | No | Issue date yyyy-mm-dd (default today). | |
| order_number | No | Order id / reference. | |
| calculate_vat | No | 1 items are net (VAT added), 2 items are gross, 3 special VAT regime, 4 domestic reverse charge, 5 not a VAT payer, 6 foreign reverse charge. | |
| customer_city | No | Customer city. | |
| customer_name | No | Customer company name (when no id_customer). | |
| note_internal | No | Internal note (not on the document). | |
| customer_street | No | Customer street. | |
| id_number_series | No | Number series id (from vyfakturuj_list_number_series); must match the document type. | |
| customer_lastname | No | Customer last name. | |
| id_payment_method | No | Payment method id (from vyfakturuj_list_payment_methods). | |
| text_before_items | No | Text before the items. | |
| customer_firstname | No | Customer first name. | |
| date_taxable_supply | No | Date of taxable supply (DUZP) yyyy-mm-dd. | |
| text_invoice_footer | No | Text in the footer. | |
| customer_country_code | No | ISO 3166 country code, e.g. CZ, SK, DE. |