- Table of contents
- Docura XML - INVOICE
Docura XML - INVOICE¶
Invoice in Docura XML (root element Document-Invoice). Sent by the supplier to the buyer. UTF-8, one invoice per file. Dates CCYY-MM-DD, decimal separator ".".
File name: <Seller>-INVOICE_<InvoiceNumber>.xml
Example file: CidoGrupaSIA-INVOICE_0000013.xml, schema: Docura_XML_INVOICE.xsd (see also 04 Example)
01 Structure¶
Document-Invoice
├── Invoice-Header (invoice number, dates, function code, order/contract refs, delivery)
├── Document-Parties (Sender, Receiver, Creator)
├── Invoice-Parties (Buyer, Seller)
├── Invoice-Lines
│ └── Line
│ └── Line-Item
└── Invoice-Summary
└── Tax-Summary
02 Fields¶
M = mandatory, O = optional. Structure follows the example below.
| Element | M/O | Format | Description |
|---|---|---|---|
| Document-Invoice | M | Root element | |
| Invoice-Header | M | ||
| InvoiceNumber | M | X(35) | Invoice number |
| InvoiceDate | M | CCYY-MM-DD | Invoice date |
| InvoiceCurrency | M | [A-Z](3) | Invoice currency |
| InvoicePaymentDueDate | O | CCYY-MM-DD | Payment due date |
| DocumentFunctionCode | M | 9/4/3 | 9 - original (default), 4 - change, 3 - deletion |
| Remarks | O | X(250) | Remarks for invoice |
| Order | O | ||
| BuyerOrderNumber | O | X(35) | Order number this invoice refers to |
| Reference | O | ||
| ContractNumber | O | X(175) | Contract number |
| Delivery | O | ||
| DeliveryLocationNumber | O | [0-9](13) | ILN of delivery point |
| Name | O | X(175) | Delivery point name |
| StreetAndNumber | O | X(140) | Street and number |
| CityName | O | X(140) | City |
| PostalCode | O | X(9) | Postal code |
| Country | O | X(2) | Country code (ISO 3166) |
| DeliveryDate | O | CCYY-MM-DD | Delivery date |
| Document-Parties | M | ||
| Sender | M | Document sender (supplier) | |
| ILN | M | [0-9](13) | ILN of sender |
| Name | O | X(175) | Sender name |
| Receiver | M | Document receiver (buyer) | |
| ILN | M | [0-9](13) | ILN of receiver |
| Name | O | X(175) | Receiver name |
| Creator | O | Person who created the invoice | |
| Name | O | X(175) | Name |
| TelephoneNumber | O | X(35) | Telephone |
| O | X(175) | ||
| Invoice-Parties | M | ||
| Buyer | M | Buyer | |
| ILN | M | [0-9](13) | ILN of buyer |
| TaxID | O | X(35) | VAT number |
| Name | O | X(175) | Buyer name |
| StreetAndNumber | O | X(140) | Street and number |
| CityName | O | X(140) | City |
| PostalCode | O | X(9) | Postal code |
| Country | O | X(2) | Country code (ISO 3166) |
| BankInfo | O | ||
| BankName | O | X(70) | Bank name |
| Swift | O | X(11) | SWIFT/BIC code |
| BankAccNumber | O | X(35) | IBAN / account number |
| Seller | M | Supplier. Same fields as Buyer | |
| ILN | M | [0-9](13) | ILN of seller |
| Invoice-Lines | M | ||
| Line | M | 1-n | |
| Line-Item | M | ||
| LineNumber | M | N0 | Line number |
| EAN | O | [0-9](13-14) | EAN code |
| SupplierItemCode | O | X(70) | Supplier item code |
| ItemDescription | O | X(250) | Item description |
| ItemType | O | X(2) | "CU" - commodity, "RC" - returnable package |
| InvoiceQuantity | M | R4 | Invoiced quantity |
| InvoiceUnitNetPrice | O | R4 | Unit net price, excl. VAT |
| UnitOfMeasure | O | X(10) | Unit of measure |
| TaxRate | O | R2 | VAT rate, e.g. LV: 21, 12, 5, 0 |
| TaxCategoryCode | O | S/Z/E/O | S - standard rate, Z - zero rate, E - exempt, O - out of scope |
| TaxAmount | O | R4 | VAT amount for row |
| NetAmount | O | R4 | Row amount, excl. VAT |
| GrossAmount | O | R4 | Row amount, incl. VAT |
| ExpirationDate | O | CCYY-MM-DD | Best before date |
| Invoice-Summary | M | ||
| TotalLines | M | N0 | Number of lines |
| TotalNetAmount | M | R4 | Total amount, excl. VAT |
| TotalTaxAmount | O | R4 | Total VAT amount |
| TotalGrossAmount | O | R4 | Total amount, incl. VAT |
| Tax-Summary | O | ||
| Tax-Summary-Line | M | 1-n | |
| TaxRate | M | R2 | VAT rate |
| TaxCategoryCode | M | S/Z/E/O | Tax category |
| TaxAmount | M | R4 | VAT amount for this rate |
| TaxableAmount | M | R4 | Taxable amount for this rate |
03 How you receive the INVOICE¶
- EDI-Web — the invoice appears in Docura.net; an e-mail notification goes to your contact address. See EDI-Web_registration.
- ERP integration — XML is delivered via Partner_API, Docudrive or SFTP_FTP. Docura can convert INVOICE into your ERP's format (EDIFACT, Telema/Edisoft XML, CSV, other).
- E-mail — XML attachment to your e-mail address.
04 Example¶
CidoGrupaSIA-INVOICE_0000013.xml
<?xml version="1.0" encoding="UTF-8"?>
<Document-Invoice>
<Invoice-Header>
<InvoiceNumber>0000013</InvoiceNumber>
<InvoiceDate>2026-09-02</InvoiceDate>
<InvoiceCurrency>EUR</InvoiceCurrency>
<InvoicePaymentDueDate>2026-10-02</InvoicePaymentDueDate>
<DocumentFunctionCode>9</DocumentFunctionCode>
<Remarks>R-1</Remarks>
<Order>
<BuyerOrderNumber>FRI-000022</BuyerOrderNumber>
</Order>
<Reference>
<ContractNumber>R-1/1</ContractNumber>
</Reference>
<Delivery>
<DeliveryLocationNumber>9973658250282</DeliveryLocationNumber>
<Name>Fristar SIA - Babītes vidusskola [7440]</Name>
<StreetAndNumber>Jūrmalas iela 17</StreetAndNumber>
<CityName>Piņķi</CityName>
<PostalCode>LV-2107</PostalCode>
<Country>LV</Country>
<DeliveryDate>2026-08-31</DeliveryDate>
</Delivery>
</Invoice-Header>
<Document-Parties>
<Sender>
<ILN>4750042000006</ILN>
<Name>Cido Grupa SIA</Name>
</Sender>
<Receiver>
<ILN>9973658250008</ILN>
<Name>Fristar SIA</Name>
</Receiver>
<Creator>
<Name>Startsev Roman</Name>
<TelephoneNumber>+3725640620</TelephoneNumber>
<E-mail>roman@cido.lv</E-mail>
</Creator>
</Document-Parties>
<Invoice-Parties>
<Buyer>
<ILN>9973658250008</ILN>
<TaxID>LV40003658252</TaxID>
<Name>Fristar SIA</Name>
<StreetAndNumber>Elizabetes iela 20</StreetAndNumber>
<CityName>Riga</CityName>
<PostalCode>LV-1050</PostalCode>
<Country>LV</Country>
<BankInfo>
<BankName>SWEDBANK AS</BankName>
<Swift>HABALV22</Swift>
<BankAccNumber>LV12HABA0001234567890</BankAccNumber>
</BankInfo>
</Buyer>
<Seller>
<ILN>4750042000006</ILN>
<TaxID>LV40003176944</TaxID>
<Name>Cido Grupa SIA</Name>
<StreetAndNumber>Ostas iela 4</StreetAndNumber>
<CityName>Riga</CityName>
<PostalCode>LV-1034</PostalCode>
<Country>LV</Country>
<BankInfo>
<BankName>SEB BANKA AS</BankName>
<Swift>UNLALV2X</Swift>
<BankAccNumber>LV34UNLA0009876543210</BankAccNumber>
</BankInfo>
</Seller>
</Invoice-Parties>
<Invoice-Lines>
<Line>
<Line-Item>
<LineNumber>1</LineNumber>
<EAN>4750042002352</EAN>
<SupplierItemCode>24600</SupplierItemCode>
<ItemDescription>CIDO Ābolu sula (PET) 0,3L</ItemDescription>
<ItemType>CU</ItemType>
<InvoiceQuantity>6.000</InvoiceQuantity>
<InvoiceUnitNetPrice>0.5080</InvoiceUnitNetPrice>
<UnitOfMeasure>PCE</UnitOfMeasure>
<TaxRate>21.00</TaxRate>
<TaxCategoryCode>S</TaxCategoryCode>
<TaxAmount>0.6405</TaxAmount>
<NetAmount>3.0500</NetAmount>
<GrossAmount>3.6905</GrossAmount>
<ExpirationDate>2026-09-25</ExpirationDate>
</Line-Item>
</Line>
<Line>
<Line-Item>
<LineNumber>2</LineNumber>
<EAN>4751000791875</EAN>
<SupplierItemCode>24411</SupplierItemCode>
<ItemDescription>Bauskas Gaišais speciālais 4,8% 50cl</ItemDescription>
<ItemType>CU</ItemType>
<InvoiceQuantity>40.000</InvoiceQuantity>
<InvoiceUnitNetPrice>1.1100</InvoiceUnitNetPrice>
<UnitOfMeasure>PCE</UnitOfMeasure>
<TaxRate>21.00</TaxRate>
<TaxCategoryCode>S</TaxCategoryCode>
<TaxAmount>9.3240</TaxAmount>
<NetAmount>44.4000</NetAmount>
<GrossAmount>53.7240</GrossAmount>
<ExpirationDate>2026-10-29</ExpirationDate>
</Line-Item>
</Line>
</Invoice-Lines>
<Invoice-Summary>
<TotalLines>2</TotalLines>
<TotalNetAmount>47.4500</TotalNetAmount>
<TotalTaxAmount>9.9645</TotalTaxAmount>
<TotalGrossAmount>57.4145</TotalGrossAmount>
<Tax-Summary>
<Tax-Summary-Line>
<TaxRate>21.00</TaxRate>
<TaxCategoryCode>S</TaxCategoryCode>
<TaxAmount>9.9645</TaxAmount>
<TaxableAmount>47.4500</TaxableAmount>
</Tax-Summary-Line>
</Tax-Summary>
</Invoice-Summary>
</Document-Invoice>
05 XSD¶
For automated validation, use the attached XML Schema: Docura_XML_INVOICE.xsd
xmllint --noout --schema Docura_XML_INVOICE.xsd your_invoice.xml