Appearance
Overview
DocumentData is a data structure used within the Invoicing API.
Definition
typescript
export type DocumentData = {
document_number: string;
date: string;
due_date: string | null;
recipient: RecipientData;
items: Array<LineItemData>;
file_name: string | null;
test_mode: boolean | null;
payment_means_code: CIUSBusinessTerms.BT81 | null;
profile: number;
language_code: string | null;
brand_id: string | null;
sender: SenderData | null;
type: CIUSBusinessTerms.BT3;
currency_code: Currency;
buyer_reference: string | null;
order_reference: string | null;
project_reference: string | null;
contract_reference: string | null;
prepaid_amount: number | null;
tax_point_date: string | null;
allowances_charges: Array<any> | null;
delivery: DeliveryData | null;
cash_discount_days: number | null;
cash_discount_percent: number | null;
intro_text: string | null;
outro_text: string | null;
attachments: Array<AttachmentData> | null;
notes: string | null;
total_net: number | null;
total_tax: number | null;
total_gross: number | null;
billing_period_start: string | null;
billing_period_end: string | null;
direct_debit_mandate_id: string | null;
payee: RecipientData | null;
pdf_presentation: PdfPresentationData | null;
warnings: Array<any>;
};Properties
Required Fields
document_number
- Type:
string - Description: The unique identification of the invoice. [BT-1]
date
- Type:
string - Description: The date when the invoice was issued (ISO 8601). [BT-2]
recipient
- Type:
[RecipientData](/docs/api/types/recipient-data) - Description: Information about the buyer (customer).
items
- Type:
Array<[LineItemData](/docs/api/types/line-item-data)> - Description: List of invoice line items.
profile
- Type:
number - Description: The CIUS profile to use (e.g. XRechnung Standard vs Extended).
type
- Type:
[BT3](/docs/api/enums#bt3) - Description: Code specifying the functional type of the invoice. [BT-3]
currency_code
- Type:
[Currency](/docs/api/enums#currency) - Description: The currency code for all amounts in the invoice.
warnings
- Type:
Array<any> - Description: Array of validation warnings returned by the engine.
Optional Fields
due_date
- Type:
string | null - Description: The date when the payment is due. [BT-9]
file_name
- Type:
string | null - Description: Custom filename for the generated PDF/XML.
test_mode
- Type:
boolean | null - Description: If true, the invoice is marked as a test document.
payment_means_code
- Type:
[BT81](/docs/api/enums#bt81) | null - Description: The code signifying the type of payment. [BT-81]
language_code
- Type:
string | null - Description: Language code for the invoice text (de, en, fr).
brand_id
- Type:
string | null - Description: Internal ID to select a specific layout/brand.
sender
- Type:
[SenderData](/docs/api/types/sender-data) | null - Description: Information about the seller (you).
buyer_reference
- Type:
string | null - Description: An identifier assigned by the buyer used for internal routing (Leitweg-ID). [BT-10]
order_reference
- Type:
string | null - Description: An identifier of a referenced order. [BT-13]
project_reference
- Type:
string | null - Description: The identification of the project the invoice refers to. [BT-11]
contract_reference
- Type:
string | null - Description: The identification of a contract. [BT-12]
prepaid_amount
- Type:
number | null - Description: The sum of amounts which have been paid in advance. [BT-113]
tax_point_date
- Type:
string | null - Description: The date when the VAT becomes accountable.
allowances_charges
- Type:
Array<any> | null - Description: Allowances (discounts) and charges on document level.
delivery
- Type:
[DeliveryData](/docs/api/types/delivery-data) | null - Description: Information about the delivery.
cash_discount_days
- Type:
number | null - Description: Number of days for cash discount.
cash_discount_percent
- Type:
number | null - Description: Percentage of cash discount.
intro_text
- Type:
string | null - Description: Free text field at the beginning of the invoice.
outro_text
- Type:
string | null - Description: Free text field at the end of the invoice.
attachments
- Type:
Array<[AttachmentData](/docs/api/types/attachment-data)> | null - Description: Additional documents attached to the invoice.
notes
- Type:
string | null - Description: Textual note (General invoice note).
total_net
- Type:
number | null - Description: Sum of all line net amounts.
total_tax
- Type:
number | null - Description: Total tax amount.
total_gross
- Type:
number | null - Description: Total amount to be paid (incl. tax).
billing_period_start
- Type:
string | null - Description: Start date of the invoicing period.
billing_period_end
- Type:
string | null - Description: End date of the invoicing period.
direct_debit_mandate_id
- Type:
string | null - Description: Unique Identifier of the Mandate (for Direct Debit).
payee
- Type:
[RecipientData](/docs/api/types/recipient-data) | null - Description: The party receiving the payment (if different from seller).
pdf_presentation
- Type:
[PdfPresentationData](/docs/api/types/pdf-presentation-data) | null - Description: Visual settings for the PDF generation.