Project

General

Profile

Docura XML - ORDER

Purchase order in Docura XML (root element Document-Order). Sent by the buyer to the supplier. UTF-8, one order per file. Dates CCYY-MM-DD, decimal separator ".".

File name: <Buyer>-ORDER_<OrderNumber>.xml

Example file: FristarSIA-ORDER_0000001.xml (see also 05 Example)

01 Structure

Document-Order
├── Order-Header            (order number, date, function code, references)
├── Document-Parties        (Sender, Receiver, Creator)
├── Order-Parties           (Buyer, Seller, DeliveryPoint, UltimateCustomer)
├── Order-Lines
│   └── Line
│       └── Line-Item
└── Order-Summary

02 Fields

M = mandatory, O = optional. Structure follows the example below.

Element M/O Format Description
Document-Order M Root element
Order-Header M
OrderNumber M X(35) Order number
OrderDate M CCYY-MM-DD Order date
ExpectedDeliveryDate O CCYY-MM-DD Expected delivery date
DocumentFunctionCode M 9/4/3 9 - original (default), 4 - change, 3 - deletion
Remarks O X(250) Remarks for order
Reference O
ContractNumber O X(175) Contract number
ContractDate O CCYY-MM-DD Contract date
Document-Parties M
Sender M Document sender (buyer)
ILN M [0-9](13) ILN of sender
Name O X(175) Sender name
Receiver M Document receiver (supplier)
ILN M [0-9](13) ILN of receiver
Name O X(175) Receiver name
Creator O Person who created the order
Name O X(175) Name
TelephoneNumber O X(35) Telephone
E-mail O X(175) E-mail
Order-Parties M
Buyer M Buyer
ILN M [0-9](13) ILN of buyer
Name O X(175) Buyer name
TaxID O X(35) VAT number
UtilizationRegisterNumber O X(35) Registration number
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)
Seller M Supplier
ILN M [0-9](13) ILN of seller
Name O X(175) Seller name
TaxID O X(35) VAT number
UtilizationRegisterNumber O X(35) Registration number
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)
DeliveryPoint M Delivery location
ILN M [0-9](13) ILN of delivery point
Name O X(175) Delivery point name
TaxID O X(35) VAT number
UtilizationRegisterNumber O X(35) Registration number
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)
UltimateCustomer O Final recipient
ILN M [0-9](13) ILN of ultimate customer
Name O X(175) Ultimate customer name
TaxID O X(35) VAT number
UtilizationRegisterNumber O X(35) Registration number
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)
Order-Lines M
Line M 1-n
Line-Item M
LineNumber M N0 Line number
EAN O [0-9](14) EAN code
SupplierItemCode O X(70) Supplier item code
BuyerItemCode O X(70) Buyer item code
ItemDescription O X(250) Item description
OrderedQuantity M R4 Ordered quantity
OrderedBoxes O R3 Ordered boxes
UnitOfMeasure O PCE/KGM/DPA PCE - pieces, KGM - kilograms, DPA - boxes
OrderedUnitNetPrice O R4 Unit net price, excl. VAT
OrderedNetAmount O R4 Line net amount, excl. VAT
NetWeight O R3 Net weight
Order-Summary M
TotalLines M N0 Number of lines
TotalOrderedAmount M R4 Total ordered quantity
TotalNetAmount O R4 Total net amount
TotalTaxAmount O R4 Total VAT amount
TotalGrossAmount O R4 Total gross amount
TotalNetWeight O R3 Total net weight

03 How you receive the ORDER

  • EDI-Web — the order 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 ORDER into your ERP's format (EDIFACT, Telema/Edisoft XML, CSV, other).
  • E-mail — XML attachment to your e-mail address.

04 XSD

For automated validation, use the attached XML Schema: Docura_XML_ORDER.xsd

xmllint --noout --schema Docura_XML_ORDER.xsd your_order.xml

05 Example

FristarSIA-ORDER_0000001.xml

<?xml version="1.0" encoding="UTF-8"?>
<Document-Order>
    <Order-Header>
        <OrderNumber>0000001</OrderNumber>
        <OrderDate>2026-09-01</OrderDate>
        <ExpectedDeliveryDate>2026-09-02</ExpectedDeliveryDate>
        <DocumentFunctionCode>9</DocumentFunctionCode>
        <Remarks>TEST</Remarks>
        <Reference>
            <ContractDate>2026-09-01</ContractDate>
        </Reference>
    </Order-Header>
    <Document-Parties>
        <Sender>
            <ILN>9973658250008</ILN>
            <Name>Fristar SIA</Name>
        </Sender>
        <Receiver>
            <ILN>4750192000000</ILN>
            <Name>Latvijas Maiznieks AS</Name>
        </Receiver>
        <Creator>
            <Name>Rita Dakule</Name>
            <TelephoneNumber>+371 20299222</TelephoneNumber>
            <E-mail>rita.dakule@fristar.lv</E-mail>
        </Creator>
    </Document-Parties>
    <Order-Parties>
        <Buyer>
            <ILN>9973658250008</ILN>
            <Name>Fristar SIA</Name>
            <StreetAndNumber>Elizabetes iela 20</StreetAndNumber>
            <CityName>Riga</CityName>
            <PostalCode>LV-1050</PostalCode>
            <Country>LV</Country>
        </Buyer>
        <Seller>
            <ILN>4750192000000</ILN>
            <Name>Latvijas Maiznieks AS</Name>
            <StreetAndNumber>Mazā Viļņas iela 9</StreetAndNumber>
            <CityName>Daugavpils</CityName>
            <PostalCode>LV-5404</PostalCode>
            <Country>LV</Country>
        </Seller>
        <DeliveryPoint>
            <ILN>9973658250282</ILN>
            <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>
        </DeliveryPoint>
        <UltimateCustomer>
            <ILN>9973658250282</ILN>
        </UltimateCustomer>
    </Order-Parties>
    <Order-Lines>
        <Line>
            <Line-Item>
                <LineNumber>1</LineNumber>
                <EAN>4750192741644</EAN>
                <SupplierItemCode>174</SupplierItemCode>
                <ItemDescription>Zeltene Dienišķā baltmaize 0.350g</ItemDescription>
                <OrderedQuantity>3.0000</OrderedQuantity>
                <UnitOfMeasure>PCE</UnitOfMeasure>
                <OrderedUnitNetPrice>0.7200</OrderedUnitNetPrice>
                <OrderedNetAmount>2.1600</OrderedNetAmount>
                <NetWeight>0.700</NetWeight>
            </Line-Item>
        </Line>
        <Line>
            <Line-Item>
                <LineNumber>2</LineNumber>
                <EAN>4750192730709</EAN>
                <SupplierItemCode>143</SupplierItemCode>
                <ItemDescription>Rīgas klaips formas maize 0.600g</ItemDescription>
                <OrderedQuantity>2.0000</OrderedQuantity>
                <OrderedBoxes>0.000</OrderedBoxes>
                <UnitOfMeasure>PCE</UnitOfMeasure>
                <OrderedUnitNetPrice>0.7500</OrderedUnitNetPrice>
                <OrderedNetAmount>1.5000</OrderedNetAmount>
                <NetWeight>1.200</NetWeight>
            </Line-Item>
        </Line>
    </Order-Lines>
    <Order-Summary>
        <TotalLines>2</TotalLines>
        <TotalOrderedAmount>5.0000</TotalOrderedAmount>
        <TotalNetAmount>3.6600</TotalNetAmount>
        <TotalTaxAmount>0.0000</TotalTaxAmount>
        <TotalGrossAmount>3.6600</TotalGrossAmount>
        <TotalNetWeight>0.000</TotalNetWeight>
    </Order-Summary>
</Document-Order>