Raw schema
{
"type": "object",
"properties": {
"document_type": {
"description": "Document type (default vat_invoice).",
"type": "string",
"enum": [
"vat_invoice",
"proforma",
"advance_invoice",
"final_invoice",
"bill",
"simplified_invoice",
"invoice_no_vat",
"receipt",
"debit_note",
"credit_note",
"invoice_split_payment",
"invoice_cash_method",
"invoice_to_receipt"
]
},
"seller": {
"description": "Seller details.",
"type": "object",
"properties": {
"name": {
"description": "Seller company or full name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"first_name": {
"description": "Seller first name (for a private person with no business name).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"last_name": {
"description": "Seller last name (for a private person with no business name).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"private_person": {
"description": "True for a private person that runs no business (then first and last name are needed).",
"type": "boolean"
},
"tax_id": {
"description": "Seller tax number (NIP, or a VAT id).",
"type": "string",
"minLength": 1,
"maxLength": 30,
"pattern": "^[A-Za-z0-9 .\\-/]+$"
},
"street": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"building": {
"description": "Building number.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"apartment": {
"description": "Apartment/unit number.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"postal_code": {
"type": "string",
"minLength": 1,
"maxLength": 20
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"country": {
"description": "Two-letter country code (PL, DE...), default PL.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"email": {
"type": "string",
"maxLength": 200,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
}
},
"buyer": {
"type": "object",
"properties": {
"name": {
"description": "Buyer company or full name.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"first_name": {
"description": "Buyer first name (for a private person with no business name).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"last_name": {
"description": "Buyer last name (for a private person with no business name).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"private_person": {
"description": "True for a private person that runs no business (then first and last name are needed).",
"type": "boolean"
},
"tax_id": {
"description": "Buyer tax number (NIP, or a VAT id).",
"type": "string",
"minLength": 1,
"maxLength": 30,
"pattern": "^[A-Za-z0-9 .\\-/]+$"
},
"street": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"building": {
"description": "Building number.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"apartment": {
"description": "Apartment/unit number.",
"type": "string",
"minLength": 1,
"maxLength": 30
},
"postal_code": {
"type": "string",
"minLength": 1,
"maxLength": 20
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"country": {
"description": "Two-letter country code (PL, DE...), default PL.",
"type": "string",
"minLength": 1,
"maxLength": 60
},
"email": {
"type": "string",
"maxLength": 200,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"description": "Buyer details."
},
"items": {
"minItems": 1,
"maxItems": 300,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Product or service name."
},
"quantity": {
"description": "Quantity (default 1).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"unit": {
"description": "Unit of measure.",
"type": "string",
"enum": [
"service",
"piece",
"day",
"hour",
"kg",
"km",
"set",
"l",
"m",
"m2",
"m3",
"month",
"package",
"pair",
"lump_sum"
]
},
"vat_rate": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^(zw|np|oo|npI|npII|0WDT|0EX|0KR|\\d{1,2}(\\.\\d{1,2})?)$",
"description": "VAT rate as enabled on the account: \"23\", \"8\", \"5\", \"0\", \"zw\" (exempt), \"np\"..."
},
"net_price": {
"description": "Net unit price. Give either net_price or gross_value.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"gross_value": {
"description": "Gross value of the line (the vendor field is `produkt_wartosc_brutto`). Give either net_price or gross_value.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"name",
"vat_rate"
]
},
"description": "Line items (1-300)."
},
"issue_date": {
"description": "Issue date (default today).",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"sale_date": {
"description": "Sale date (default today).",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"place": {
"description": "Place of issue (default: the account's saved place).",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"currency": {
"description": "Currency code (default PLN).",
"type": "string",
"enum": [
"PLN",
"EUR",
"USD",
"GBP",
"CHF",
"CAD",
"AUD",
"JPY",
"THB",
"HKD",
"NZD",
"SGD",
"HUF",
"UAH",
"CZK",
"DKK",
"ISK",
"NOK",
"SEK",
"HRK",
"RON",
"BGN",
"TRY",
"ILS",
"CLP",
"PHP",
"MXN",
"ZAR",
"BRL",
"MYR",
"RUB",
"IDR",
"INR",
"KRW",
"CNY",
"XDR",
"AED"
]
},
"payment_type": {
"description": "Payment method / term.",
"type": "string",
"enum": [
"transfer",
"transfer_7_days",
"transfer_14_days",
"transfer_21_days",
"transfer_30_days",
"transfer_60_days",
"cash_on_delivery",
"cash",
"paid_by_transfer",
"paid_in_cash"
]
},
"payment_status": {
"description": "Payment status (default unpaid).",
"type": "string",
"enum": [
"unpaid",
"paid",
"partially_paid"
]
},
"paid_amount": {
"description": "Amount already paid (subtracted from the total).",
"type": "number",
"minimum": 0,
"maximum": 1000000000000
},
"notes": {
"description": "Notes printed on the document.",
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"public_links": {
"description": "Return public PDF and preview links (default false).",
"type": "boolean"
}
},
"required": [
"buyer",
"items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}