{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "SimplifiedInvoiceCreationRequestData", "type": "object", "additionalProperties": false, "required": [ "SimplifiedInvoice" ], "properties": { "SimplifiedInvoice": { "$ref": "#/definitions/SimplifiedInvoice" }, "SkipExtendedValidation": { "type": "boolean", "description": "Skips the validation of the resulting xml invoice with the official KOSIT-validator.\nImproves performance immensely, but incorrect invoice data may result in an invalid XInvoice." }, "IncludeCompactPreview": { "type": "boolean" }, "XInvoiceVersion": { "type": [ "null", "string" ], "description": "If empty, the default version is used\nSupported values / versions: 2.2, 2.3, 3.0" } }, "definitions": { "SimplifiedInvoice": { "type": "object", "description": "Represents a simplified invoice model.", "additionalProperties": false, "required": [ "InvoiceNumber", "InvoiceIssueDate", "BuyerReference", "Seller", "Buyer", "PaymentInstructions", "InvoiceLines" ], "properties": { "InvoiceNumber": { "type": "string", "description": "The invoice number.", "minLength": 1, "x-example": 123456 }, "InvoiceIssueDate": { "type": "string", "description": "The issue date of the invoice.", "format": "date-time", "minLength": 1 }, "PaymentDueDate": { "type": [ "null", "string" ], "description": "The due date for the payment.\nREQUIRED if PaymentTerms is not set.", "format": "date-time" }, "DeliveryDate": { "type": [ "null", "string" ], "description": "The delivery date of the products or services.\nMay be required by Deutsche Bahn. See https://einfach-xrechnung.de/faq?post=133-A for more information.", "format": "date-time" }, "SalesOrderReference": { "type": [ "null", "string" ], "description": "The reference of the sales order (Auftragsnummer).\nREQUIRED if PurchaseOrderReference is set. See https://einfach-xrechnung.de/faq?post=193-A for more information." }, "PurchaseOrderReference": { "type": [ "null", "string" ], "description": "The reference of the purchase order (Bestellnummer).\nREQUIRED if SalesOrderReference is set. See https://einfach-xrechnung.de/faq?post=193-A for more information." }, "InvoiceTypeCode": { "type": [ "null", "string" ], "description": "The type code of the invoice. Possible values: \"380\" (Commercial invoice), \"381\" (Credit note).\nDefault value is \"380\"." }, "InvoiceCurrencyCode": { "type": [ "null", "string" ], "description": "The currency code of the invoice. Possible values: \"EUR\" (Euro), \"USD\" (US Dollar), etc.\nDefault value is \"EUR\"." }, "BuyerReference": { "type": "string", "description": "The reference of the buyer. Leitweg-ID if available. \nIf no Leitweg-ID is available, the buyer can request the type of data to be entered.\nIf no request is made, the seller can enter at will, like a customer number or recipient's email address", "minLength": 1 }, "Seller": { "description": "Details of the seller.", "oneOf": [ { "$ref": "#/definitions/SellerSmp" } ] }, "Buyer": { "description": "Details of the buyer.", "oneOf": [ { "$ref": "#/definitions/BuyerSmp" } ] }, "PaymentInstructions": { "description": "Payment instructions.", "oneOf": [ { "$ref": "#/definitions/PaymentInstructionsSmp" } ] }, "PaymentTerms": { "type": [ "null", "string" ], "description": "Payment terms. (Zahlungsbedingungen)" }, "DocumentLevelAllowances": { "type": [ "array", "null" ], "description": "List of document level allowances.", "items": { "$ref": "#/definitions/DocumentLevelAllowanceSmp" } }, "InvoiceLines": { "type": "array", "description": "List of invoice lines.", "items": { "$ref": "#/definitions/InvoiceLineSmp" } } } }, "SellerSmp": { "type": "object", "description": "Represents the seller details in the invoice.", "additionalProperties": false, "required": [ "SellerName", "SellerElectronicAddress", "SellerContactPoint", "SellerContactTelephoneNumber", "SellerContactEmailAddress" ], "properties": { "SellerName": { "type": "string", "description": "The name of the seller.", "minLength": 1 }, "SellerVatIdentifier": { "type": [ "null", "string" ], "description": "The VAT identifier of the seller." }, "SellerAdditionalLegalInformation": { "type": [ "null", "string" ], "description": "Additional legal information about the seller." }, "SellerElectronicAddressTypeCode": { "type": [ "null", "string" ], "description": "The type code of the electronic address. Possible values: \"EM\" (E-Mail), ... , etc.\nThe default value is \"EM\". In this case, an email address is expected as SellerElectronicAddress." }, "SellerElectronicAddress": { "type": "string", "description": "The electronic address of the seller. Also called Technical Endpoint-ID.\nThe sender's email address, Vat-Id, Leitweg-ID etc. \nHas to match the type code in SellerElectronicAddressTypeCode.\nBy default, an email address is expected.", "minLength": 1 }, "SellerPostalAddress": { "description": "The postal address of the seller.", "oneOf": [ { "type": "null" }, { "$ref": "#/definitions/SellerPostalAddressSmp" } ] }, "SellerContactPoint": { "type": "string", "description": "The name of responsible person on the seller side. (Anlaufstelle / Ansprechpartner)", "minLength": 1 }, "SellerContactTelephoneNumber": { "type": "string", "description": "The telephone number of the seller's contact point.", "minLength": 1 }, "SellerContactEmailAddress": { "type": "string", "description": "The email address of the seller's contact point.", "minLength": 1 } } }, "SellerPostalAddressSmp": { "type": "object", "description": "Represents the postal address of the seller.", "additionalProperties": false, "required": [ "SellerAddressLine1", "SellerCity", "SellerPostCode" ], "properties": { "SellerAddressLine1": { "type": "string", "description": "The first line of the seller's address.", "minLength": 1 }, "SellerCity": { "type": "string", "description": "The city of the seller's address.", "minLength": 1 }, "SellerPostCode": { "type": "string", "description": "The postal code of the seller's address.", "minLength": 1 }, "SellerCountryCode": { "type": [ "null", "string" ], "description": "The country code of the seller's address. Possible values: \"DE\" (Germany), \"FR\" (France), etc.\nThe default value is \"DE\"." } } }, "BuyerSmp": { "type": "object", "description": "Represents the buyer details in the invoice.", "additionalProperties": false, "required": [ "BuyerName", "BuyerElectronicAddress", "BuyerPostalAddress" ], "properties": { "BuyerName": { "type": "string", "description": "The name of the buyer.", "minLength": 1 }, "BuyerVatIdentifier": { "type": [ "null", "string" ], "description": "The VAT identifier of the buyer." }, "BuyerElectronicAddressTypeCode": { "type": [ "null", "string" ], "description": "The type code of the electronic address. Possible values: \"EM\" (E-Mail), ... , etc.\nThe default value is \"EM\". In this case, an email address is expected as BuyerElectronicAddress." }, "BuyerElectronicAddress": { "type": "string", "description": "The electronic address of the buyer. Also called Technical Endpoint-ID.\nThe buyers Leitweg-ID, email address, Vat-Id etc. \nIf the buyer has a Leitweg-ID, it should be entered here.\nHas to match the type code in SellerElectronicAddressTypeCode.\nBy default, an email address is expected.", "minLength": 1 }, "BuyerPostalAddress": { "description": "The postal address of the buyer.", "oneOf": [ { "$ref": "#/definitions/BuyerPostalAddressSmp" } ] } } }, "BuyerPostalAddressSmp": { "type": "object", "description": "Represents the postal address of the buyer.", "additionalProperties": false, "required": [ "BuyerAddressLine1", "BuyerCity", "BuyerPostCode" ], "properties": { "BuyerAddressLine1": { "type": "string", "description": "The first line of the buyer's address.", "minLength": 1 }, "BuyerCity": { "type": "string", "description": "The city of the buyer's address.", "minLength": 1 }, "BuyerPostCode": { "type": "string", "description": "The postal code of the buyer's address.", "minLength": 1 }, "BuyerCountryCode": { "type": [ "null", "string" ], "description": "The country code of the buyer's address. Possible values: \"DE\" (Germany), \"US\" (United States), etc." } } }, "PaymentInstructionsSmp": { "type": "object", "description": "Represents the payment instructions in the invoice.", "additionalProperties": false, "properties": { "PaymentMeansText": { "type": [ "null", "string" ], "description": "Represents additional textual information about the payment means.\nThis can include instructions or details not covered by the standard payment means type codes, eg. which online payment service was used exactly (Paypal etc.)." }, "PaymentMeansTypeCode": { "type": [ "null", "string" ], "description": "The type code of the payment means. Possible values:\n\"30\" Credit transfer, \"54\" Credit card, \"55\" Debit card,\n68 Online payment service.\nIf necessary, any other code that's part of the UN/ECE 4461 code list.\nThe default value is 30." }, "BankTransfer": { "type": [ "array", "null" ], "description": "List of bank account details for bank credit transfer.\nIn the XRechnung specs confusingly called \"Credit transfer\".\nDO NOT SET if PaymentMeansTypeCode is not \"30\" (Credit transfer).\nREQUIRED if PaymentMeansTypeCode is \"30\" (Credit transfer).", "items": { "$ref": "#/definitions/BankTransferSmp" } }, "PaymentCard": { "description": "Details for the used card, usually debit or credit card.\nDO NOT SET if PaymentMeansTypeCode is not \"54\" (Credit card) or \"55\" (Debit card).\nREQUIRED if PaymentMeansTypeCode is \"54\" (Credit card) or \"55\" (Debit card).", "x-example": null, "oneOf": [ { "type": "null" }, { "$ref": "#/definitions/PaymentCardSmp" } ] } } }, "BankTransferSmp": { "type": "object", "description": "Represents the credit transfer / bank account details.", "additionalProperties": false, "required": [ "PaymentAccountIdentifier" ], "properties": { "PaymentAccountIdentifier": { "type": "string", "description": "The identifier of the payment account. Usually the IBAN.", "minLength": 1 }, "PaymentAccountName": { "type": [ "null", "string" ], "description": "The name of the payment account holder. (Kontoinhaber)" } } }, "PaymentCardSmp": { "type": "object", "description": "Represents the credit/debit card details.", "additionalProperties": false, "required": [ "PaymentCardPrimaryAccountNumber" ], "properties": { "PaymentCardPrimaryAccountNumber": { "type": "string", "description": "The primary account number of the credit/debit card.\nNote: For security reasons, the complete card number should not be included.", "minLength": 1 }, "PaymentCardHolderName": { "type": [ "null", "string" ], "description": "The name of the card holder." } } }, "DocumentLevelAllowanceSmp": { "type": "object", "description": "Represents document level allowances in the invoice.", "additionalProperties": false, "required": [ "DocumentLevelAllowanceVatCategoryCode", "DocumentLevelAllowanceReason" ], "properties": { "DocumentLevelAllowanceAmount": { "type": "number", "description": "The amount of the document level allowance.", "format": "decimal" }, "DocumentLevelAllowanceVatCategoryCode": { "type": "string", "description": "The VAT category code of the document level allowance. Possible values: \"S\" (Standard rate), etc.", "minLength": 1 }, "DocumentLevelAllowanceVatRate": { "type": "number", "description": "The VAT rate of the document level allowance.", "format": "decimal" }, "DocumentLevelAllowanceReason": { "type": "string", "description": "The reason for the document level allowance.", "minLength": 1 } } }, "InvoiceLineSmp": { "type": "object", "description": "Represents an invoice line in the invoice.", "additionalProperties": false, "required": [ "ItemName", "InvoicedQuantity", "ItemNetPrice" ], "properties": { "ItemSellerIdentifier": { "type": [ "null", "string" ], "description": "The seller's identifier for the item. E.g. a product or item number. (Artikelnummer)" }, "ItemName": { "type": "string", "description": "The name of the item. -> What is sold?", "minLength": 1 }, "InvoicedQuantity": { "type": "number", "description": "The quantity invoiced. -> How many items are sold?", "format": "decimal" }, "InvoicedQuantityUnitOfMeasureCode": { "type": [ "null", "string" ], "description": "The unit of measure code for the invoiced quantity. -> How are the items measured?\nPossible values: \"C62\" (Unit), etc.\nThe default value is \"C62\"." }, "ItemNetPrice": { "type": "number", "description": "The net price of the item.\n ", "format": "decimal" }, "InvoicedItemVatCategoryCode": { "type": [ "null", "string" ], "description": "The VAT category code of the invoiced item. Possible values: \"S\" (Standard rate), etc.\nThe defualt value is \"S\"." }, "InvoicedItemVatRate": { "type": "number", "description": "The VAT rate of the invoiced item in %. \nthe default value is 19.", "format": "decimal" } } } } }