create_invoice
Issue a Greek electronic invoice (τιμολόγιο) into the national AADE myDATA platform. Builds an AadeBookInvoiceType <InvoicesDoc> XML and transmits it to /SendInvoices under your own AADE credentials, returning the official MARK (Μοναδικός Αριθμός Καταχώρησης / unique registration number), invoice UID and QR url. Bring your own credentials as headers: x-aade-user-id (your myDATA user id) and x-aade-subscription-key (your Ocp-Apim subscription key) — both issued by the AADE myDATA portal. Header x-aade-mode: prod switches to the live rail (default = dev / test rail, no fiscal effect). Amounts are in EUR, VAT-exclusive per line. Greek VAT rates map to AADE vatCategory codes automatically: 24 (mainland standard), 13 and 6 (reduced), 17 / 9 / 4 (island reduced), 0 (VAT-exempt, category 7). invoiceType defaults to 1.1 (sales invoice); use 2.1 for a services invoice or 5.1 for a credit note.
Parameters11
| issuer_vat | string | optional | Your (issuer/seller) Greek VAT number / ΑΦΜ, 9 digits (EL/GR prefix optional). Recommended; must match the credentials used. |
| issuer_branch | number | optional | Issuer branch / εγκατάσταση number (BranchID). Default 0 (head office). |
| counterpart_vat | string | required | Buyer (counterpart) Greek VAT number / ΑΦΜ, 9 digits (EL/GR prefix optional). Always required — v1 covers B2B invoices (invoiceType 1.1/2.1/5.1); retail receipts without a counterpart are not supported yet. |
| counterpart_country | string | optional | Buyer country ISO code. Default GR. |
| counterpart_branch | number | optional | Buyer branch number. Default 0. |
| series | string | optional | Invoice series (σειρά). Default "A". |
| aa | string | optional | Invoice running number (Α/Α) within the series. Auto-generated if omitted. |
| issue_date | string | optional | Issue date (ημερομηνία έκδοσης), YYYY-MM-DD. Default: today (UTC). |
| invoice_type | string | optional | AADE invoiceType code. Default 1.1 (sales invoice). Common: 1.1 sales, 2.1 services, 5.1 credit note. |
| currency | string | optional | Currency code. Default EUR. |
| lines | array | required | Invoice lines. Each: net_value (line net total, VAT-exclusive EUR), vat_rate (24|13|9|6|4|17|0). Optional: description, vat_exemption_category (1-31, required by AADE when vat_rate is 0), income_classification_type + income_classification_category (E3/VAT classification if your accounting requires it). |
Raw schema
{
"type": "object",
"properties": {
"issuer_vat": {
"type": "string",
"description": "Your (issuer/seller) Greek VAT number / ΑΦΜ, 9 digits (EL/GR prefix optional). Recommended; must match the credentials used."
},
"issuer_branch": {
"type": "number",
"description": "Issuer branch / εγκατάσταση number (BranchID). Default 0 (head office)."
},
"counterpart_vat": {
"type": "string",
"description": "Buyer (counterpart) Greek VAT number / ΑΦΜ, 9 digits (EL/GR prefix optional). Always required — v1 covers B2B invoices (invoiceType 1.1/2.1/5.1); retail receipts without a counterpart are not supported yet."
},
"counterpart_country": {
"type": "string",
"description": "Buyer country ISO code. Default GR."
},
"counterpart_branch": {
"type": "number",
"description": "Buyer branch number. Default 0."
},
"series": {
"type": "string",
"description": "Invoice series (σειρά). Default \"A\"."
},
"aa": {
"type": "string",
"description": "Invoice running number (Α/Α) within the series. Auto-generated if omitted."
},
"issue_date": {
"type": "string",
"description": "Issue date (ημερομηνία έκδοσης), YYYY-MM-DD. Default: today (UTC)."
},
"invoice_type": {
"type": "string",
"description": "AADE invoiceType code. Default 1.1 (sales invoice). Common: 1.1 sales, 2.1 services, 5.1 credit note."
},
"currency": {
"type": "string",
"description": "Currency code. Default EUR."
},
"lines": {
"type": "array",
"minItems": 1,
"description": "Invoice lines. Each: net_value (line net total, VAT-exclusive EUR), vat_rate (24|13|9|6|4|17|0). Optional: description, vat_exemption_category (1-31, required by AADE when vat_rate is 0), income_classification_type + income_classification_category (E3/VAT classification if your accounting requires it).",
"items": {
"type": "object",
"properties": {
"net_value": {
"type": "number",
"description": "Line net value in EUR, VAT-exclusive (netValue)."
},
"vat_rate": {
"type": "number",
"description": "VAT rate percent: 24, 13, 9, 6, 4, 17, or 0 (exempt). Mapped to AADE vatCategory automatically."
},
"description": {
"type": "string",
"description": "Optional line item description (not a myDATA field; echoed in the response only)."
},
"vat_exemption_category": {
"type": "number",
"description": "AADE vatExemptionCategory code 1-31. Required when vat_rate is 0; defaults to 1 if omitted."
},
"income_classification_type": {
"type": "string",
"description": "Optional AADE income classificationType, e.g. E3_561_001."
},
"income_classification_category": {
"type": "string",
"description": "Optional AADE income classificationCategory, e.g. category1_1."
}
},
"required": [
"net_value",
"vat_rate"
]
}
}
},
"required": [
"counterpart_vat",
"lines"
]
}