FinchContext
Run with

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 InvoicesDoc XML is submitted to the AADE myDATA SendInvoices REST endpoint with the entity's aade-user-id / subscription key; AADE returns the MARK, a UID, and an authenticationCode. The mark, uid, and authenticationCode elements 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


Conversion procedure

  1. 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.
  2. Extract the header. issuer (VAT vatNumber, country GR, branch), counterpart (VAT, country, branch — omit for retail to a private consumer), and invoiceHeader (series, aa, issueDate, invoiceType, currency).
  3. Validate identifiers. The Greek AFM (vatNumber) is 9 digits; an EU counterpart carries its country code and VAT. If the issuer/counterpart VAT, the invoiceType, a vatCategory, or a classificationCategory is missing or ambiguous, stop and ask — do not invent a VAT number or guess a classification.
  4. Normalise. issueDate to YYYY-MM-DD; amounts to dot-decimal 2 dp; country to ISO GR/EU codes; vatCategory to the AADE numeric code (1=24%, 2=13%, 3=6%, …); classification codes to the AADE value lists (classificationType E3_561_001, classificationCategory category1_1, …).
  5. Build invoiceDetails lines. One invoiceDetails per line with lineNumber, netValue, vatCategory, vatAmount, and an incomeClassification (classificationType, classificationCategory, amount).
  6. Build the invoiceSummary. Sum totalNetValue, totalVatAmount, totalGrossValue, and the rolled-up incomeClassification totals across all lines.
  7. Validate and reconcile. Recompute each line's VAT and the summary totals; flag mismatches. Leave mark/uid/authenticationCode for AADE.
  8. 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)

incomeClassificationclassificationCategory (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)

incomeClassificationclassificationType (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


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/20262026-06-10; invoiceType "services" → 2.1; VAT 24%vatCategory 1; amounts 1.000,001000.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


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.