# CreateInvoice
## Properties
| Name | Type | Description | Notes |
| --------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| **invoice_number** | Option<**String**> | Invoice number. Must end with a number.<br/>If empty, we will create a new number.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_006\">FACT_006</a></td><td>Invoice number is missing.</td><tr><td><a href=\"#FACT_007\">FACT_007</a></td><td>Invoice number is too long.</td><tr><td><a href=\"#FACT_008\">FACT_008</a></td><td>Invoice number is invalid.</td><tr><td><a href=\"#FACT_009\">FACT_009</a></td><td>Invoice number does not end with a digit.</td><tr><td><a href=\"#FACT_101\">FACT_101</a></td><td>Invoice number is in use.</td></table></div> | [optional] |
| **relation_id** | **i32** | The ID of a relation.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_001\">FACT_001</a></td><td>Relation ID is missing.</td><tr><td><a href=\"#FACT_002\">FACT_002</a></td><td>Relation not found.</td><tr><td><a href=\"#FACT_003\">FACT_003</a></td><td>Relation is inactive.</td><tr><td><a href=\"#FACT_EMAIL_001\">FACT_EMAIL_001</a></td><td>Relation email is missing.</td><tr><td><a href=\"#FACT_EMAIL_002\">FACT_EMAIL_002</a></td><td>Relation email is invalid.</td><tr><td><a href=\"#FACT_EMAIL_003\">FACT_EMAIL_003</a></td><td>Relation email for invoices is invalid.</td><tr><td><a href=\"#FACT_EMAIL_004\">FACT_EMAIL_004</a></td><td>Relation email for reminders is invalid.</td><tr><td><a href=\"#FACT_EMAIL_007\">FACT_EMAIL_007</a></td><td>Relation email is missing.</td></table></div> |
| **date** | Option<[**String**](string.md)> | Invoice date.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_011\">FACT_011</a></td><td>Invoice date is missing.</td><tr><td><a href=\"#FACT_012\">FACT_012</a></td><td>Invoice date invalid.</td><tr><td><a href=\"#FACT_013\">FACT_013</a></td><td>Invoice date out of range.</td></table></div> | [optional] |
| **term_of_payment** | **i32** | <br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_015\">FACT_015</a></td><td>Term of payment is missing.</td><tr><td><a href=\"#FACT_016\">FACT_016</a></td><td>Term of payment out of range.</td></table></div> | [default to 0] |
| **in_ex_vat** | Option<**String**> | Indicates if the amount on the invoice is including (`IN`) or excluding (`EX`) VAT. The corresponding value will be calculated based on the VAT code. If left empty the 'EX' option will be used<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_010\">FACT_010</a></td><td>Invoice VAT must be IN or EX.</td></table></div> | [optional] |
| **template_id** | **i32** | <br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_018\">FACT_018</a></td><td>Invoice template not found.</td></table></div> |
| **email_template_id** | Option<**i32**> | The ID of an email template.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_020\">FACT_020</a></td><td>Email template not found.</td></table></div> | [optional] |
| **reference** | Option<**String**> | Reference of the invoice.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_014\">FACT_014</a></td><td>Payment reference is too long.</td></table></div> | [optional] |
| **text** | Option<**String**> | Text of the invoice.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_017\">FACT_017</a></td><td>Invoice text is too long.</td></table></div> | [optional] |
| **print** | Option<**bool**> | Determines whether the invoice should be prepared for printing. | [optional] |
| **email** | Option<[**models::CreateInvoiceEmail**](CreateInvoiceEmail.md)> | | [optional] |
| **direct_debit** | Option<[**models::CreateInvoiceDebit**](CreateInvoiceDebit.md)> | | [optional] |
| **mutation** | Option<[**models::CreateInvoiceMutation**](CreateInvoiceMutation.md)> | | [optional] |
| **items** | [**Vec<models::CreateInvoiceItem>**](CreateInvoiceItem.md) | At least one invoice item is required.<br><div><h3>Error codes</h3><table><tr><td><a href=\"#FACT_004\">FACT_004</a></td><td>Total invoice amount too high.</td><tr><td><a href=\"#FACT_005\">FACT_005</a></td><td>Total invoice amount too low.</td><tr><td><a href=\"#FACT_019\">FACT_019</a></td><td>Invoice items are missing.</td></table></div> |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)