Create Invoice Action
Create a new invoice in Autofaktury with supplier, line items, currency, and payment details. Use a numbering pattern configured in Setup or provide a custom title.

When to use this action
Use this action when you want to automatically generate invoices in Autofaktury from other apps (e.g., form submissions, orders, or scheduled events) and map trigger data into invoice fields.
Best practices
- Map trigger fields to the exact names and formats in the reference below (dates
YYYY-MM-DD, currency 3-letter code). - Provide only one of:
Invoice Pattern ID(from Setup) or a customTitle. - Use dot as a decimal separator for amounts (e.g.,
100.00); VAT must be aVAT Typeenum value (e.g.,VAT_23,VAT_8,VAT_0_KR,VAT_ZW). - If
Payment TypeisTRANSFER, include a validRequested Account Number(digits only). - When using a new supplier (no
Id), provide all required supplier fields: Name, NIP, City, Postal Code, Number, Country Code.
Account Setup Fields
| Field | Required | Description |
|---|---|---|
| Client API ID | Yes | To obtain your identifier, email [email protected] and include your NIP (tax ID) |
| Invoice Type | Yes | Supported values: VAT, PRO_FORMA |
| Invoice Pattern ID | No | Use predefined numbering pattern. If provided, Title field is ignored. Manage patterns |
Required Fields
| Field | Type | Description | Example |
|---|---|---|---|
| Main Language | String | Invoice language | PL, EN |
| Invoice Type | String | Invoice type | VAT, PRO_FORMA, CORRECTION |
| Invoice Date | Date | Invoice issue date (YYYY-MM-DD) | 2024-01-15 |
| Sell Date | Date | Service/product delivery date (YYYY-MM-DD) | 2024-01-15 |
| Created By | String | Name displayed on invoice (1-64 chars) | IT Corp |
| Invoice City | String | Invoice city (1-128 chars) | Warsaw |
| Supplier | Object | Supplier information | See Supplier Structure |
| Line Items | Array | Products/services (at least 1 item) | See Line Items Structure |
| Currency | String | Currency code (3 chars) | PLN, EUR, USD |
| Payment Status | String | Payment status | TO_PAID, IN_PAYMENT, PAID, NOT_PAYABLE, NEW |
| Payment Date | Date | Payment due date (YYYY-MM-DD) | 2024-02-15 |
| Payment Type | String | Payment method | CASH, TRANSFER, CARD, CREDIT_CARD, ONLINE |
Optional Fields
| Field | Type | Description | Example |
|---|---|---|---|
| Second Language | String | Secondary invoice language | PL, EN |
| Title | String | Custom invoice title (1-254 chars) | INV/13/09/2025 |
| Comments | String | Additional comments (0-255 chars) | Payment within 14 days |
| Requested Account Number | String | Bank account for transfers | 12345678901234567890123456 |
Supplier Structure
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| Id | No | String | Existing supplier ID (1-64 chars) | supplier_123 |
| Supplier Firstname | No | String | First name (0-64 chars) | John |
| Supplier Name | Yes* | String | Company/person name (1-255 chars) | IT Corporation |
| NIP | Yes* | String | Tax identification number (1-20 chars) | 1234567890 |
| City | Yes* | String | City (1-128 chars) | Warsaw |
| Street | No | String | Street address (0-128 chars) | Main Street |
| Postal Code | Yes* | String | Postal code (1-64 chars) | 00-001 |
| Number | Yes* | String | Building number (1-64 chars) | 123 |
| Country Code | Yes* | String | ISO country code (2 chars) | PL |
| Business | No | Boolean | Is business entity | true, false |
| No | String | Email address (0-255 chars) | [email protected] | |
| Phone | No | String | Phone number (0-64 chars) | +48123456789 |
| Update Supplier By Nip | No | Boolean | Update existing supplier by NIP | true, false |
*Required if Id is not provided
Line Items Structure
Each line item must include:
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| Name | Yes | String | Product/service name (1-1000 chars) | Web Development |
| Unit | Yes | String | Unit of measurement (1-64 chars) | h, szt, kg, m2 |
| Quantity | Yes | Decimal | Quantity (positive, 2 decimal places) | 10.00, 1.50 |
| Unit Price Netto | Yes | Decimal | Net price per unit (positive, 2 decimal places) | 100.00, 25.50 |
| VAT Type | Yes | Enum | VAT rate code | VAT_23, VAT_8, VAT_0_KR, VAT_ZW |
| Discount Value | No | Decimal | Fixed discount amount (positive, 2 decimal places) | 50.00, 10.25 |
| Discount Percentage | No | Decimal | Percentage discount (positive, 2 decimal places) | 10.00, 15.50 |
Payment Requirements
Transfer Payments
When Payment Type is TRANSFER, you must provide:
- Requested Account Number: Bank account number (digits only, IBAN will be normalized)
Business Rules
- Provide exactly ONE of:
Invoice Pattern ID(from account setup), OR- Custom
Titlefield
- All monetary values must be decimal numbers with 2 decimal places (e.g.,
100.00,25.50) - Dates must be in
YYYY-MM-DDformat - VAT is a
VAT Typeenum value — one ofVAT_23,VAT_22,VAT_8,VAT_7,VAT_5,VAT_4,VAT_3,VAT_0_KR,VAT_0_WDT,VAT_0_EX,VAT_ZW,VAT_OO,VAT_NP1,VAT_NP2(not23or"23%") - Currency must be exactly 3 characters
- If supplier
Idis provided, other supplier fields are ignored - Line items array cannot be empty
- Quantity and prices must be positive values
Field Mapping Examples
| Trigger Field | Autofaktury Field | Notes |
|---|---|---|
Customer Name | Created By | Company/client name (1-64 chars) |
City | Invoice City | Invoice city (1-128 chars) |
Product Name | Lines[0].Name | First product name |
Price | Lines[0].Unit Price Netto | Must be decimal format |
Quantity | Lines[0].Quantity | Must be decimal format |
VAT Rate | Lines[0].VAT Type | Must be an enum value (VAT_23, VAT_8, VAT_0_KR, …) |
Company Name | Supplier.Supplier Name | Supplier company name |
NIP | Supplier.NIP | Tax identification number |
Address | Supplier.Street | Street address |
Postal Code | Supplier.Postal Code | Postal code |
Country | Supplier.Country Code | ISO country code (2 chars) |