Overview
TheLineItem schema defines individual line items within an invoice or credit note. Each line item represents a product, service, or other billable item.
All fields are optional, but providing
description, quantity, unit_price, and tax_rate creates complete, clear line items.Basic Fields
Description of the product or serviceThis is the primary field for identifying what is being sold.Example:
"Professional Services", "Product A - Premium Edition", "Consulting hours - October 2024"Product code or SKUInternal reference code for the product/service.Example:
"PROD-001", "SKU-PREMIUM-A"Quantity and Unit
Quantity of items (max 4 decimal places)Example:
10, 2.5, 100.0Unit of measure code (UN/ECE Recommendation 20)Common values:
C62- Units/pieces (most common)HUR- HoursDAY- DaysMTR- MetersKGM- KilogramsLTR- LitersMTK- Square metersMTQ- Cubic metersKWH- Kilowatt hours
"C62", "HUR", "DAY"Pricing
Price per unit (max 2 decimal places), excluding VATThis is the price for a single unit before any allowances or charges.Example:
100.00, 50.99, 1250.00Total line amount (max 2 decimal places), excluding VATTotal amount for this line item after subtracting allowances and adding charges:Calculation:
(quantity × unit_price) - allowances + chargesIf not provided, automatically calculated from quantity, unit_price, allowances, and charges.Example: 1000.00, 950.00 (after €50 discount)Tax
VAT/tax rate as a percentage string with 2 decimal placesFormat:
"XX.XX"Common Belgian rates:"21.00"- Standard rate"6.00"- Reduced rate"0.00"- Zero-rated
"21.00", "6.00", "0.00"Total VAT/tax amount for this line item (max 2 decimal places)Calculation:
amount × (tax_rate / 100)If not provided, automatically calculated from amount and tax_rate.Example: 210.00 (21% of €1000), 126.00 (21% of €600)Allowances (Discounts)
Line-level allowances (discounts) applied to this specific itemUse for product-specific discounts (bulk discounts, promotions, etc.)Example:See Advanced Invoicing guide for details.
Charges (Fees)
Line-level charges (fees) applied to this specific itemUse for product-specific fees (special handling, customization fees, etc.)Example:See Advanced Invoicing guide for details.
Examples
Simple Line Item
Basic product line:- Amount: 10 × €100 = €1,000.00
- Tax: €1,000 × 21% = €210.00
- Total: €1,210.00
Service Line Item
Hourly services:- Amount: 40 hours × €150 = €6,000.00
- Tax: €6,000 × 21% = €1,260.00
- Total: €7,260.00
Line Item with Discount
Product with bulk discount:- Base: 100 × €50 = €5,000.00
- Discount: -€500.00
- Amount: €4,500.00
- Tax: €4,500 × 21% = €945.00
- Total: €5,445.00
Line Item with Charge
Product with special handling fee:- Base: 1 × €500 = €500.00
- Handling: +€50.00
- Amount: €550.00
- Tax: €550 × 21% = €115.50
- Total: €665.50
Mixed Products Invoice
Multiple line items with different rates:- Line 1: €1,000 + €210 (21% tax) = €1,210.00
- Line 2: €100 + €6 (6% tax) = €106.00
- Line 3: €600 + €0 (0% tax) = €600.00
- Total: €1,916.00
Calculation Flow
Understanding how amounts are calculated:- Base Amount:
quantity × unit_price - Apply Allowances: Subtract line-level allowances
- Apply Charges: Add line-level charges
- Line Amount:
base - allowances + charges - Tax:
line_amount × (tax_rate / 100) - Line Total:
line_amount + tax
- Base: 20 × €100 = €2,000.00
-
- Allowance: -€200.00
-
- Charge: +€50.00
- = Amount: €1,850.00
- Tax (21%): €388.50
- Total: €2,238.50
Best Practices
Always Provide Descriptions
Always Provide Descriptions
Clear descriptions help customers understand what they’re paying for:✓ Good:✗ Poor:
Use Appropriate Units
Use Appropriate Units
Match the unit to what you’re selling:
- Products/goods:
"C62"(pieces) - Services by time:
"HUR"(hours) or"DAY"(days) - Materials by weight:
"KGM"(kilograms) - Materials by volume:
"LTR"(liters)
Tax Rates as Strings
Tax Rates as Strings
Always use string format with 2 decimal places:✓ Correct:✗ Wrong:
Consistent Decimal Places
Consistent Decimal Places
Use consistent decimal places:
- Prices: 2 decimals (€100.00)
- Quantities: up to 4 decimals (10.5000)
- Tax rates: exactly 2 decimals as string (“21.00”)