Skip to main content

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.

Create Invoice action in Zapier

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 custom Title.
  • Use dot as a decimal separator for amounts (e.g., 100.00); VAT must be a VAT Type enum value (e.g., VAT_23, VAT_8, VAT_0_KR, VAT_ZW).
  • If Payment Type is TRANSFER, include a valid Requested 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​

FieldRequiredDescription
Client API IDYesTo obtain your identifier, email [email protected] and include your NIP (tax ID)
Invoice TypeYesSupported values: VAT, PRO_FORMA
Invoice Pattern IDNoUse predefined numbering pattern. If provided, Title field is ignored. Manage patterns

Required Fields​

FieldTypeDescriptionExample
Main LanguageStringInvoice languagePL, EN
Invoice TypeStringInvoice typeVAT, PRO_FORMA, CORRECTION
Invoice DateDateInvoice issue date (YYYY-MM-DD)2024-01-15
Sell DateDateService/product delivery date (YYYY-MM-DD)2024-01-15
Created ByStringName displayed on invoice (1-64 chars)IT Corp
Invoice CityStringInvoice city (1-128 chars)Warsaw
SupplierObjectSupplier informationSee Supplier Structure
Line ItemsArrayProducts/services (at least 1 item)See Line Items Structure
CurrencyStringCurrency code (3 chars)PLN, EUR, USD
Payment StatusStringPayment statusTO_PAID, IN_PAYMENT, PAID, NOT_PAYABLE, NEW
Payment DateDatePayment due date (YYYY-MM-DD)2024-02-15
Payment TypeStringPayment methodCASH, TRANSFER, CARD, CREDIT_CARD, ONLINE

Optional Fields​

FieldTypeDescriptionExample
Second LanguageStringSecondary invoice languagePL, EN
TitleStringCustom invoice title (1-254 chars)INV/13/09/2025
CommentsStringAdditional comments (0-255 chars)Payment within 14 days
Requested Account NumberStringBank account for transfers12345678901234567890123456

Supplier Structure​

FieldRequiredTypeDescriptionExample
IdNoStringExisting supplier ID (1-64 chars)supplier_123
Supplier FirstnameNoStringFirst name (0-64 chars)John
Supplier NameYes*StringCompany/person name (1-255 chars)IT Corporation
NIPYes*StringTax identification number (1-20 chars)1234567890
CityYes*StringCity (1-128 chars)Warsaw
StreetNoStringStreet address (0-128 chars)Main Street
Postal CodeYes*StringPostal code (1-64 chars)00-001
NumberYes*StringBuilding number (1-64 chars)123
Country CodeYes*StringISO country code (2 chars)PL
BusinessNoBooleanIs business entitytrue, false
EmailNoStringEmail address (0-255 chars)[email protected]
PhoneNoStringPhone number (0-64 chars)+48123456789
Update Supplier By NipNoBooleanUpdate existing supplier by NIPtrue, false

*Required if Id is not provided

Line Items Structure​

Each line item must include:

FieldRequiredTypeDescriptionExample
NameYesStringProduct/service name (1-1000 chars)Web Development
UnitYesStringUnit of measurement (1-64 chars)h, szt, kg, m2
QuantityYesDecimalQuantity (positive, 2 decimal places)10.00, 1.50
Unit Price NettoYesDecimalNet price per unit (positive, 2 decimal places)100.00, 25.50
VAT TypeYesEnumVAT rate codeVAT_23, VAT_8, VAT_0_KR, VAT_ZW
Discount ValueNoDecimalFixed discount amount (positive, 2 decimal places)50.00, 10.25
Discount PercentageNoDecimalPercentage 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 Title field
  • All monetary values must be decimal numbers with 2 decimal places (e.g., 100.00, 25.50)
  • Dates must be in YYYY-MM-DD format
  • VAT is a VAT Type enum value — one of VAT_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 (not 23 or "23%")
  • Currency must be exactly 3 characters
  • If supplier Id is provided, other supplier fields are ignored
  • Line items array cannot be empty
  • Quantity and prices must be positive values

Field Mapping Examples​

Trigger FieldAutofaktury FieldNotes
Customer NameCreated ByCompany/client name (1-64 chars)
CityInvoice CityInvoice city (1-128 chars)
Product NameLines[0].NameFirst product name
PriceLines[0].Unit Price NettoMust be decimal format
QuantityLines[0].QuantityMust be decimal format
VAT RateLines[0].VAT TypeMust be an enum value (VAT_23, VAT_8, VAT_0_KR, …)
Company NameSupplier.Supplier NameSupplier company name
NIPSupplier.NIPTax identification number
AddressSupplier.StreetStreet address
Postal CodeSupplier.Postal CodePostal code
CountrySupplier.Country CodeISO country code (2 chars)