Build a myDATA Invoice Document (AADE)
Skill: Convert invoice data into an AADE myDATA InvoicesDoc XML
Region: Greece (Ελλάδα)
Category: E-invoicing / VAT — myDATA (my Digital Accounting and Tax Application), AADE (Independent Authority for Public Revenue)
Does: Takes invoice data and produces the InvoicesDoc XML for the AADE myDATA platform — one invoice element with issuer/counterpart VAT numbers, invoiceHeader (type code, series, AA, date), invoiceDetails lines (net value, VAT category, VAT amount, income classification), and invoiceSummary totals, ready for transmission to receive a MARK (Μοναδικός Αριθμός Καταχώρησης) and authentication code.
Schema version: AADE myDATA REST API — InvoicesDoc (myDATA XSD v1.0.x; income-classification value lists v1.0.x)
The
InvoicesDocXML is submitted to the AADE myDATASendInvoicesREST endpoint with the entity'saade-user-id/ subscription key; AADE returns the MARK, a UID, and an authenticationCode. Themark,uid, andauthenticationCodeelements are assigned by AADE on transmission — you generate them only when echoing a received response, never when first issuing. Transmission deadlines tighten under the 2026 mandatory B2B e-invoicing phase-in. The AI builds the XML; validate against the current AADE myDATA XSD and value lists before sending.
When this applies
- Greek businesses keeping accounting records must transmit their issued sales/expense documents to myDATA, either in real time (via certified e-invoicing provider / ERP) or via the AADE portal.
- This skill builds the invoice transmission XML (
InvoicesDoc) for an issued document: B2B/B2G sales of goods (1.1), services (2.1), retail receipts (11.x), credit notes, and self-billing types. - Under the 2026 phase-in, B2B e-invoicing through certified providers becomes mandatory for an expanding set of taxpayers, shortening real-time transmission windows; classification of income (E3) and VAT remains required on every line.
- Excluded: payroll, the separate expenses classification (
ExpensesClassificationsDoc) submissions for the counterpart, and pure payment-method (PaymentsMethods) documents.
Conversion procedure
- Read the source. Accept an invoice as CSV/JSON line listing, an ERP export, a PDF text layer, or pasted text. Capture issuer VAT, counterpart VAT + country, document type, series/number, date, each line's net value and VAT, and the income classification.
- Extract the header.
issuer(VATvatNumber,countryGR,branch),counterpart(VAT, country, branch — omit for retail to a private consumer), andinvoiceHeader(series,aa,issueDate,invoiceType,currency). - Validate identifiers. The Greek AFM (
vatNumber) is 9 digits; an EU counterpart carries its country code and VAT. If the issuer/counterpart VAT, theinvoiceType, avatCategory, or aclassificationCategoryis missing or ambiguous, stop and ask — do not invent a VAT number or guess a classification. - Normalise.
issueDatetoYYYY-MM-DD; amounts to dot-decimal 2 dp;countryto ISOGR/EU codes;vatCategoryto the AADE numeric code (1=24%,2=13%,3=6%, …); classification codes to the AADE value lists (classificationTypeE3_561_001,classificationCategorycategory1_1, …). - Build invoiceDetails lines. One
invoiceDetailsper line withlineNumber,netValue,vatCategory,vatAmount, and anincomeClassification(classificationType,classificationCategory,amount). - Build the invoiceSummary. Sum
totalNetValue,totalVatAmount,totalGrossValue, and the rolled-upincomeClassificationtotals across all lines. - Validate and reconcile. Recompute each line's VAT and the summary totals; flag mismatches. Leave
mark/uid/authenticationCodefor AADE. - Validate. Work through the checklist; validate against the AADE myDATA XSD.
Source → myDATA field map
| From the source | → Target element / field |
|---|---|
| Issuer VAT (AFM) | invoice/issuer/vatNumber |
| Issuer country | issuer/country (GR) |
| Issuer branch | issuer/branch (0 = head office) |
| Counterpart VAT | invoice/counterpart/vatNumber |
| Counterpart country | counterpart/country |
| Counterpart branch | counterpart/branch |
| Invoice series | invoiceHeader/series |
| Invoice number (AA) | invoiceHeader/aa |
| Issue date | invoiceHeader/issueDate |
| Invoice type code | invoiceHeader/invoiceType (1.1, 2.1, 11.1, …) |
| Currency | invoiceHeader/currency (EUR) |
| VAT payment suspension flag | invoiceHeader/vatPaymentSuspension |
| Line number | invoiceDetails/lineNumber |
| Line net value | invoiceDetails/netValue |
| Line VAT category code | invoiceDetails/vatCategory |
| Line VAT amount | invoiceDetails/vatAmount |
| Income classification type | invoiceDetails/incomeClassification/classificationType (E3_561_001, …) |
| Income classification category | incomeClassification/classificationCategory (category1_1, …) |
| Classified amount | incomeClassification/amount |
| Total net value | invoiceSummary/totalNetValue |
| Total VAT amount | invoiceSummary/totalVatAmount |
| Total gross value | invoiceSummary/totalGrossValue |
| Summary income classification | invoiceSummary/incomeClassification |
| MARK (assigned by AADE) | invoice/mark |
| UID (assigned by AADE) | invoice/uid |
| Authentication code (AADE) | invoice/authenticationCode |
Repeat invoiceDetails once per line, and incomeClassification once per (type, category) within a line and within the summary.
Document structure
InvoicesDoc (xmlns http://www.aade.gr/myDATA/invoice/v1.0)
└── invoice * (one per document)
├── uid (assigned by AADE on transmission)
├── mark (assigned by AADE — Μοναδικός Αριθμός Καταχώρησης)
├── authenticationCode (assigned by AADE)
├── issuer
│ ├── vatNumber (9-digit AFM)
│ ├── country (GR)
│ └── branch (0 = head office)
├── counterpart (omit for retail to private consumer)
│ ├── vatNumber
│ ├── country
│ └── branch
├── invoiceHeader
│ ├── series
│ ├── aa (sequential number)
│ ├── issueDate
│ ├── invoiceType (1.1, 2.1, 11.1, 5.1 …)
│ ├── currency (EUR)
│ └── vatPaymentSuspension (true/false)
├── invoiceDetails * (one per line)
│ ├── lineNumber
│ ├── netValue
│ ├── vatCategory (1–8)
│ ├── vatAmount
│ └── incomeClassification
│ ├── classificationType (E3_xxx_xxx)
│ ├── classificationCategory (category1_1 …)
│ └── amount
└── invoiceSummary
├── totalNetValue
├── totalVatAmount
├── totalWithheldAmount
├── totalFeesAmount
├── totalStampDutyAmount
├── totalOtherTaxesAmount
├── totalDeductionsAmount
├── totalGrossValue
└── incomeClassification * (rolled-up per type+category)
Notes: uid/mark/authenticationCode are populated by AADE — leave them out (or empty) on first issue. counterpart is omitted for retail (11.x) sales to a private consumer. Credit notes (5.1/5.2) reference the original via correlatedInvoices.
Code tables
invoiceType (selected)
| Code | Meaning |
|---|---|
1.1 |
Τιμολόγιο Πώλησης — sales invoice (goods) |
1.2 |
Τιμολόγιο Πώλησης — intra-community supply |
1.3 |
Τιμολόγιο Πώλησης — third-country (export) |
2.1 |
Τιμολόγιο Παροχής Υπηρεσιών — services invoice |
2.2 |
Τιμολόγιο Παροχής — intra-community services |
5.1 |
Πιστωτικό Τιμολόγιο / Συσχετιζόμενο — credit note (correlated) |
5.2 |
Πιστωτικό Τιμολόγιο — non-correlated credit note |
11.1 |
ΑΛΠ — retail receipt (goods) |
11.2 |
ΑΠΥ — retail service receipt |
11.3 |
Simplified invoice |
11.4 |
Retail credit note |
vatCategory
| Code | VAT rate |
|---|---|
1 |
24% (standard) |
2 |
13% (reduced) |
3 |
6% (super-reduced) |
4 |
17% (island reduced standard) |
5 |
9% (island reduced) |
6 |
4% (island super-reduced) |
7 |
0% (without VAT) |
8 |
Records without VAT (e.g. exempt) |
incomeClassification — classificationCategory (selected)
| Code | Meaning |
|---|---|
category1_1 |
Έσοδα από πώληση εμπορευμάτων (revenue from sale of goods) |
category1_2 |
Έσοδα από πώληση προϊόντων (sale of products) |
category1_3 |
Έσοδα από παροχή υπηρεσιών (provision of services) |
category1_5 |
Λοιπά έσοδα / κέρδη (other income / gains) |
category1_7 |
Έσοδα ενδοκοινοτικών παραδόσεων (intra-community supplies) |
incomeClassification — classificationType (selected E3 codes)
| Code | E3 mapping |
|---|---|
E3_561_001 |
Πωλήσεις αγαθών/υπηρεσιών χονδρικές (wholesale sales) |
E3_561_002 |
Πωλήσεις λιανικές (retail sales) |
E3_561_003 |
Πωλήσεις αγαθών — λοιπές |
E3_561_007 |
Ενδοκοινοτικές παραδόσεις (intra-community supplies) |
Calculation rules
- Line VAT (
vatAmount) =netValue× VAT rate of thevatCategory, rounded to 2 dp (e.g. category1→ 24%). - incomeClassification/amount on a line equals that line's
netValue(or the part classified under that category); the sum of a line's classification amounts equals itsnetValue. - totalNetValue = Σ line
netValue, 2 dp. - totalVatAmount = Σ line
vatAmount, 2 dp. - totalGrossValue =
totalNetValue+totalVatAmount+ taxes/fees −totalDeductionsAmount−totalWithheldAmount, 2 dp. - invoiceSummary/incomeClassification rolls up the line classifications: one entry per distinct (
classificationType,classificationCategory) with the summedamount. - Amounts in EUR, dot decimal, 2 dp, no thousands separators. Recompute every total from the lines; flag any mismatch with the source.
Worked example (end-to-end)
Issuer AFM 090000045 (head office, branch 0, GR) issues a services invoice series A, AA 123 on 2026-06-10 to counterpart AFM 099999999 (GR, branch 0). One line: services netValue 1000.00, VAT category 1 (24%) → vatAmount 240.00, classified as services E3_561_001 / category1_3. Summary: net 1000.00, VAT 240.00, gross 1240.00. mark/uid/authenticationCode left for AADE.
Input — invoice export (pasted)
Issuer AFM 090000045 (GR, branch 0) -> Counterpart AFM 099999999 (GR, branch 0)
Doc: type 2.1 services | series A | AA 123 | date 10/06/2026 | EUR
Line 1: Consulting services | net 1.000,00 | VAT 24% = 240,00 | classify services
Totals: net 1.000,00 | VAT 240,00 | gross 1.240,00
After extraction + normalisation (intermediate)
issuer.vatNumber 090000045 ; country GR ; branch 0
counterpart.vatNumber 099999999 ; country GR ; branch 0
invoiceHeader: series A ; aa 123 ; issueDate 2026-06-10 ; invoiceType 2.1 ; currency EUR
Line 1: lineNumber 1 ; netValue 1000.00 ; vatCategory 1 ; vatAmount 240.00 ;
incomeClassification E3_561_001 / category1_3 / 1000.00
summary: totalNetValue 1000.00 ; totalVatAmount 240.00 ; totalGrossValue 1240.00
Output — myDATA InvoicesDoc XML
<?xml version="1.0" encoding="UTF-8"?>
<InvoicesDoc xmlns="http://www.aade.gr/myDATA/invoice/v1.0"
xmlns:icls="https://www.aade.gr/myDATA/incomeClassificaton/v1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<invoice>
<issuer>
<vatNumber>090000045</vatNumber>
<country>GR</country>
<branch>0</branch>
</issuer>
<counterpart>
<vatNumber>099999999</vatNumber>
<country>GR</country>
<branch>0</branch>
</counterpart>
<invoiceHeader>
<series>A</series>
<aa>123</aa>
<issueDate>2026-06-10</issueDate>
<invoiceType>2.1</invoiceType>
<currency>EUR</currency>
<vatPaymentSuspension>false</vatPaymentSuspension>
</invoiceHeader>
<invoiceDetails>
<lineNumber>1</lineNumber>
<netValue>1000.00</netValue>
<vatCategory>1</vatCategory>
<vatAmount>240.00</vatAmount>
<incomeClassification>
<icls:classificationType>E3_561_001</icls:classificationType>
<icls:classificationCategory>category1_3</icls:classificationCategory>
<icls:amount>1000.00</icls:amount>
</incomeClassification>
</invoiceDetails>
<invoiceSummary>
<totalNetValue>1000.00</totalNetValue>
<totalVatAmount>240.00</totalVatAmount>
<totalWithheldAmount>0.00</totalWithheldAmount>
<totalFeesAmount>0.00</totalFeesAmount>
<totalStampDutyAmount>0.00</totalStampDutyAmount>
<totalOtherTaxesAmount>0.00</totalOtherTaxesAmount>
<totalDeductionsAmount>0.00</totalDeductionsAmount>
<totalGrossValue>1240.00</totalGrossValue>
<incomeClassification>
<icls:classificationType>E3_561_001</icls:classificationType>
<icls:classificationCategory>category1_3</icls:classificationCategory>
<icls:amount>1000.00</icls:amount>
</incomeClassification>
</invoiceSummary>
</invoice>
</InvoicesDoc>
Normalisations shown: date 10/06/2026 → 2026-06-10; invoiceType "services" → 2.1; VAT 24% → vatCategory 1; amounts 1.000,00 → 1000.00 (dot decimal, 2 dp); line VAT recomputed 1000.00 × 24% = 240.00; totalGrossValue recomputed 1000.00 + 240.00 = 1240.00; the line incomeClassification rolled up into the summary (E3_561_001 / category1_3 / 1000.00); mark, uid, and authenticationCode omitted because AADE assigns them on transmission.
Validation checklist
- All required fields extracted; AI asked about anything missing or ambiguous (no invented AFM, type code, or classification)
- Root
xmlns=http://www.aade.gr/myDATA/invoice/v1.0; income-classification elements in theiclsnamespace -
issuer/vatNumber(andcounterpart/vatNumberwhere present) are valid 9-digit Greek AFM or EU VAT with the rightcountry -
invoiceHeaderhasseries,aa,issueDate(YYYY-MM-DD), a validinvoiceType(1.1,2.1,11.1, …), andcurrency -
counterpartpresent for B2B/B2G; omitted for retail (11.x) to a private consumer - Each
invoiceDetailsline hasnetValue, a validvatCategory(1–8),vatAmount, and anincomeClassification(type + category + amount) - Line VAT =
netValue× rate ofvatCategory; line classification amount = linenetValue -
invoiceSummarytotals (totalNetValue,totalVatAmount,totalGrossValue) reconcile with the lines; mismatches flagged -
mark,uid,authenticationCodeleft for AADE (not invented) on first issue - Amounts EUR, dot decimal, 2 dp; file validated against the current AADE myDATA XSD and value lists before transmission within the applicable (2026 phase-in) deadline
Last updated: 2026-06-13 — verify the active AADE myDATA InvoicesDoc schema version, the invoiceType/vatCategory/income-classification value lists, and the 2026 e-invoicing phase-in transmission deadlines against the current AADE specification before use.