Raw schema
{
"type": "object",
"properties": {
"contact_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "An existing Lexware contact with the customer role (from lexware_list_contacts). Give this OR name + country_code."
},
"name": {
"description": "One-time recipient name (no contact is created). Required without contact_id.",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"supplement": {
"description": "One-time address supplement.",
"type": "string",
"maxLength": 255
},
"street": {
"description": "One-time address street and number.",
"type": "string",
"maxLength": 255
},
"zip": {
"description": "One-time address ZIP code.",
"type": "string",
"maxLength": 20
},
"city": {
"description": "One-time address city.",
"type": "string",
"maxLength": 255
},
"country_code": {
"type": "string",
"pattern": "^[A-Z]{2}(_[A-Z0-9]{1,3})?$",
"description": "ISO 3166 alpha-2 country code, e.g. DE, AT, CH (lexware_list_countries lists the supported codes)."
},
"voucher_date": {
"type": "string",
"description": "Invoice date (yyyy-mm-dd)."
},
"shipping_type": {
"type": "string",
"enum": [
"service",
"serviceperiod",
"delivery",
"deliveryperiod",
"none"
],
"description": "Leistungs-/Lieferdatum type: service or delivery (needs shipping_date), serviceperiod or deliveryperiod (needs shipping_date and shipping_end_date), none."
},
"shipping_date": {
"description": "Service/delivery date, or the start of the period (yyyy-mm-dd).",
"type": "string"
},
"shipping_end_date": {
"description": "End of the service/delivery period (yyyy-mm-dd).",
"type": "string"
},
"language": {
"description": "Document language (default de; en needs the INVOICING_PRO feature).",
"type": "string",
"enum": [
"de",
"en"
]
},
"tax_type": {
"description": "Tax type (default net): net, gross, vatfree, intraCommunitySupply, constructionService13b, externalService13b, thirdPartyCountryService, thirdPartyCountryDelivery.",
"type": "string",
"enum": [
"net",
"gross",
"vatfree",
"intraCommunitySupply",
"constructionService13b",
"externalService13b",
"thirdPartyCountryService",
"thirdPartyCountryDelivery"
]
},
"tax_type_note": {
"description": "Note for a vat-free tax type (Lexware uses the organization's default when omitted).",
"type": "string",
"maxLength": 1000
},
"line_items": {
"minItems": 1,
"maxItems": 300,
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"custom",
"service",
"material",
"text"
],
"description": "custom = a free item without an article; service/material = an existing article (article_id required); text = a text-only line."
},
"article_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "The article id (from lexware_list_articles); required for type service and material, not allowed otherwise."
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Item name (max 255 characters)."
},
"description": {
"description": "Item description (max 2000; **bold**, __italic__ and '- ' lists are supported).",
"type": "string",
"maxLength": 2000
},
"quantity": {
"description": "Quantity (up to 4 decimals); required unless type is text.",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"unit_name": {
"description": "Unit, e.g. Stück, Stunde, piece, hour; required unless type is text.",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"unit_price": {
"description": "Unit price in EUR (up to 4 decimals): NET when tax_type is not gross, GROSS when tax_type is gross. Required unless type is text.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000
},
"tax_rate": {
"description": "VAT rate in percent, e.g. 19, 7 or 0 (0 for every vat-free tax_type). Required unless type is text.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"discount_percentage": {
"description": "Line discount in percent (up to 2 decimals).",
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"type",
"name"
]
},
"description": "1-300 line items."
},
"total_discount_percentage": {
"description": "Total discount in percent.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"payment_term_duration": {
"description": "Days until payment is due (the organization's or contact's default when omitted).",
"type": "integer",
"minimum": 0,
"maximum": 3650
},
"payment_term_label": {
"description": "Payment terms text shown on the document.",
"type": "string",
"maxLength": 255
},
"title": {
"description": "Document title (max 25 characters; default from Lexware).",
"type": "string",
"maxLength": 25
},
"introduction": {
"description": "Introduction text (max 2000).",
"type": "string",
"maxLength": 2000
},
"remark": {
"description": "Closing remark (max 2000).",
"type": "string",
"maxLength": 2000
}
},
"required": [
"voucher_date",
"shipping_type",
"line_items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}