myDATA 2.0.2
Greek myDATA invoice (InvoicesDoc)
The document Greek businesses send to AADE's myDATA e-books for every invoice, receipt and delivery note, and the detailed form a buyer downloads from an e-invoicing provider
About
myDATA is AADE's platform of electronic books: every income and expense document of a Greek business is transmitted to it, from the business's own software (ERP), through an approved e-invoicing provider or with AADE's free timologio application, and myDATA answers with the document's registration number, the MARK. An InvoicesDoc carries one or more documents: the issuer and counterpart, the header (series, number, date, document type such as 1.1 sales invoice or 2.1 services invoice), the lines with their VAT category, other taxes and the E3 income or expense classifications, and the summary.
With mandatory B2B e-invoicing (decision A.1128/2025), a provider gives the buyer the invoice as a PDF, in the detailed myDATA form of InvoicesDoc_detailed.xsd and in EN 16931. The detailed form is this schema without the classifications, so it validates here too.
Good to know
- The schema checks structure, data types and AADE's code lists: document types, VAT, withholding, fee and other tax categories, payment methods, units and classification codes.
- After the schema, xmlvalid's rules run the checks myDATA makes on the file with AADE's error codes (MYDATA-203 and so on, in AADE's English wording): the summary against the lines and taxesTotals, the gross value, taxes per line or per document, the Greek tax number's (ΑΦΜ) check digit, names left out for Greek parties, countries by document type (intra-Community and third country sales and purchases), percentage taxes against their category, fuel invoices, line numbers, and the E3 classifications: every line or none, their sum against the net value, the summary's totals and the category and type combinations AADE allows for each document type. Rules marked XV-GR follow what the field descriptions require without an error code of their own.
- Not checked: whether a ΑΦΜ belongs to an active business, the sender's authorisation, duplicates, correlated documents, the issue date against the day of sending, provider signatures, and the classifications of 1.6, 2.4 and 5.1, which follow the document they correct.
- The schema files are AADE's v2.0.2 XSDs unchanged.
- The example is by xmlvalid.com: a sales invoice (1.1) with lines at 24% and 13% VAT and their income classifications. Its tax numbers are made up, with right check digits.
Files
5 files · 78.3 KB · Download all (.zip)-
InvoicesDoc-v2.0.2.xsd main
-
incomeClassification-v2.0.2.xsd
-
expensesClassification-v2.0.2.xsd
-
TransportTypes-v2.0.2.xsd
-
SimpleTypes-v2.0.2.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published
Business rules
Schematron · run in this order-
myDATA checks of AADE (Greece) myDATA 2.0.2 of September 2026
xmlvalid, after AADE's myDATA REST API documentation and its classification combinations · MIT
The rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.
Example document
invoice.xml · 3.1 KB · passes the schema and the rules
In CI and from code
The same schema by its name, mydata-2.0.2, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema mydata-2.0.2
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: mydata-2.0.2
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document=@invoice.xml \
-F schema=mydata-2.0.2
Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups