This documentation provides a complete overview of the xRechnung object used in the createPdf endpoint for generating ZUGFeRD-compliant invoices. The xRechnung object contains key information required to create a legally compliant electronic invoice, following the specifications of the XRechnung format.
Payload Structure
The xRechnung object is part of the main payload sent to the createPdf endpoint. Below is the structure and detailed explanation of all properties within the xRechnung object.
Main Payload Structure
Copy {
" report " : " string " ,
" reportName " : " string " ,
" configName " : " string " ,
" archive " : true ,
" documentTypeId " : 0 ,
" culture " : " string " ,
" parameters " : {
" additionalProp1 " : " string " ,
" additionalProp2 " : " string " ,
" additionalProp3 " : " string "
},
" mainHostUrl " : " string " ,
" xRechnung " : {
" invoiceMain " : { ... },
" additionalReferencedDocuments " : [ ... ],
" despatchAdviceReferencedDocument " : { ... },
" profile " : 1 ,
" tradeLineItems " : [ ... ],
" taxes " : [ ... ],
" serviceCharges " : [ ... ],
" receivableSpecifiedTradeAccountingAccounts " : [ ... ]
}
}
xRechnung Object Details
This object contains the main details of the invoice, including invoice number, dates, buyer, seller, and payment terms.
Properties:
invoiceNo (string): The unique identifier of the invoice.
invoiceDate (DateTime): The date the invoice was issued.
paymentReference (string): Reference used for payments.
orderNo (string): The related order number.
orderDate (DateTime): The date of the related order.
currency (enum): The currency of the invoice. See currency enum.
buyer (object): Information about the buyer.
seller (object): Information about the seller.
notes (array): Notes related to the invoice.
paymentTerms (object): The terms of payment.
grandTotalAmount (decimal): The total amount of the invoice.
duePayableAmount (decimal): The amount due for payment.
Other related invoice properties.
2. additionalReferencedDocuments
This array contains documents that reference the invoice, such as orders or contracts.
Properties:
id (string): Identifier of the referenced document.
issueDateTime (DateTime): Date and time the document was issued.
referenceTypeCode (enum): Reference type code. See referenceTypeCode enum.
attachmentBinaryObject (string): Base64 encoded binary object of the attachment.
filename (string): Filename of the attachment.
typeCode (enum): Type code for the document. See typeCode enum.
3. tradeLineItems
This array contains items or services billed in the invoice.
Properties:
globalID (object): Global ID of the item or service.
sellerAssignedID (string): ID assigned by the seller.
name (string): Name of the item or service.
billedQuantity (decimal): Quantity billed.
lineTotalAmount (decimal): Total amount for the line item.
taxCategoryCode (enum): Tax category code. See taxCategoryCode enum.
netUnitPrice (decimal): Net unit price of the item.
unitCode (enum): Unit code for the item. See unitCode enum.
Other related line item properties.
This array contains detailed tax information applied to the invoice.
Properties:
basisAmount (decimal): Amount on which the tax is calculated.
percent (decimal): Tax percentage.
typeCode (enum): Type of tax. See taxType enum.
categoryCode (enum): Tax category code. See taxCategoryCode enum.
exemptionReasonCode (enum): Reason for tax exemption. See exemptionReasonCode enum.
5. serviceCharges
This array contains additional charges applied to the invoice.
Properties:
tax (object): Tax information related to the service charge (similar to taxes object).
amount (decimal): Amount of the service charge.
description (string): Description of the service charge.
6. receivableSpecifiedTradeAccountingAccounts
This array contains accounting accounts related to the trade, either receivable or payable.
Properties:
tradeAccountID (string): ID of the trade account.
tradeAccountTypeCode (enum): Type of trade account. See tradeAccountTypeCode enum.
Represents currency codes.
Identification schemes for IDs.
GLN (Global Location Number)
DUNS (Data Universal Numbering System)
Country codes.
Subject codes for notes.
Content codes for notes.
Invoice profiles.
EN 16931 Profile (XRechnung)
Invoice types.
8. referenceTypeCode
Reference type codes for documents.
Despatch Advice Reference
9. taxCategoryCode
Tax category codes.
Tax types.
11. electronicAddressSchemeID
Electronic address schemes.
EDI (Electronic Data Interchange)
Document type codes.
Unit codes for line items.
14. paymentMeansTypeCode
Payment means type codes.
15. tradeAccountTypeCode
Trade account type codes.
This documentation provides a complete and structured overview of the xRechnung object, including all properties and enumerations used in the payload.