Greece E-Invoicing Platform for Businesses and Compliance

myDATA API Integration: A Technical Guide for Developers and IT Teams

myDATA API Integration

myDATA API Integration is the technical process of connecting a business’s ERP or invoicing system directly to the AADE myDATA platform using the published REST API. For developers and IT teams implementing compliance solutions for Greek businesses, understanding the API architecture, authentication model, key endpoints, and XML data requirements is essential for building a reliable, maintainable integration. This guide covers the full technical scope of myDATA API Integration from environment setup through production go-live. 

A well-implemented myDATA API Integration automates the complete invoice submission workflow: invoice data is generated in your system, formatted as AADE-compliant XML, submitted to myDATA in real time, and the MARK identifier returned by AADE is stored back in the source system alongside the invoice record. Any deviation from this workflow incorrect XML, authentication errors, missing mandatory fields, or unhandled retry logic results in rejected invoices that must be manually corrected, creating compliance risk and operational overhead. 

Key Takeaways

  • ✓ myDATA API Integration: myDATA API Integration connects ERP systems to AADE in real time for automated invoice submission and MARK retrieval.
  • ✓ Greece myDATA API: The Greece myDATA API is a REST API published by AADE on its developer portal with test and production endpoints.
  • ✓ AADE API integration: AADE API integration requires subscription keys, correct XML schemas, and robust error and retry handling.
  • ✓ myDATA XML data transmission: myDATA XML data transmission requires invoices to conform to the AADE XSD schema and include all mandatory fields.
  • ✓ myDATA API documentation: myDATA API documentation is published by AADE and covers all endpoints, request formats, error codes, and response structures.

API Overview and Environments (Test vs Production) 

The Greece myDATA API is a REST-based web service that AADE operates on two separate environments: a test (sandbox) environment and a production environment. The test environment is functionally identical to production but does not create legally binding tax records, making it the appropriate environment for all development, testing, and integration validation work. The production environment creates real tax records, so it should only be used once testing is complete and the integration has been validated against a representative range of invoice scenarios. 

AADE API integration requires separate credentials for each environment: the subscription keys used in the test environment will not work in production, and vice versa. Developers should obtain test environment credentials from the AADE developer portal before beginning implementation, and production credentials are provided separately after the integration has been validated. myDATA API documentation provides the base URLs for both environments and specifies the authentication headers required for each request. 

Environment Base URL Source Use Case Records Created
Test / Sandbox AADE developer portal (test URL) Development, testing, validation No real tax records
Production AADE developer portal (production URL) Live invoice submission Legally binding tax records
Shared Infrastructure Both use same API structure Test before going to production N/A – environment-specific

Authentication and Subscription Keys 

The Greece myDATA API uses a subscription key-based authentication model. Each API request must include the subscription key in the request header, typically as a custom HTTP header named Ocp-Apim-Subscription-Key or equivalent as specified in the current myDATA API documentation. The subscription key identifies the calling entity — either the business itself for direct API integration, or the certified provider submitting on the business’s behalf. 

Subscription keys must be stored securely in your integration infrastructure. They should not be embedded in client-side code or stored in version control systems. Environment variables, secrets management systems, or configuration stores with appropriate access controls are the recommended approaches for credential storage. AADE API integration code should load credentials from these secure stores at runtime rather than hardcoding them in the application. 

Key Endpoints: SendInvoices, RequestDocs, CancelInvoice 

The core endpoints of the Greece myDATA API for myDATA API Integration are SendInvoices, RequestDocs, and CancelInvoice. SendInvoices is the primary endpoint for submitting invoice XML to myDATA. It accepts a POST request containing the invoice XML payload and returns a response that includes either a list of accepted invoices with their MARK numbers and UIDs, or a list of errors for rejected invoices. The response structure must be parsed carefully to extract MARK numbers for storage and to identify and handle errors. 

RequestDocs is used to retrieve counterparty invoice data from myDATA — specifically, the invoices that have been submitted by your suppliers and appear in your myDATA expense records. This endpoint is useful for building automated reconciliation workflows that compare received invoices in your accounting system against the myDATA counterparty records. CancelInvoice allows the cancellation of a previously submitted invoice that has been accepted by myDATA but needs to be reversed, for example when a commercial dispute requires the invoice to be cancelled rather than corrected with a credit note. 

Invoice XML Structure and Required Fields 

myDATA XML data transmission follows the AADE-specified XML schema, which is published as XSD files on the AADE developer portal. The root element of the invoice XML is InvoicesDoc, which contains one or more Invoice elements. Each Invoice element must include the invoice header (with issuer details, counterparty details, invoice type, and series information), one or more detail lines with line-item descriptions, quantities, unit values, and income classification codes, and a summary section with total amounts and VAT breakdown by rate. 

The income classification codes used in each invoice line are critical for myDATA XML data transmission accuracy. AADE publishes a comprehensive code table that maps each type of income to a specific category identifier. Incorrect classification codes result in the invoice being accepted by myDATA — because the XML is structurally valid — but the summary book entry will be incorrect, creating a discrepancy that must be corrected through an amendment. Greece E-Invoice API integration must therefore include a mapping layer that translates the business’s internal invoice categories to the correct AADE classification codes. 

Handling Responses, MARK and UID 

Every call to the SendInvoices endpoint returns a response that must be fully parsed and handled by the integration. For accepted invoices, the response contains a list of response items, each with the invoice UID and the AADE-assigned MARK number. The MARK must be extracted from the response and stored in the source system alongside the corresponding invoice record. This is the critical moment in the myDATA API Integration workflow — failure to store the MARK correctly means the business cannot prove that the invoice was accepted by AADE. 

For rejected invoices, the response contains error objects with error codes and descriptions. The integration must handle these errors gracefully — logging them, notifying the relevant finance team members, and either triggering an automated correction workflow or flagging the invoice for manual review. The error codes in the AADE API response correspond to specific validation rules described in myDATA API documentation, so the integration should translate these codes into human-readable messages that finance staff can act on. 

Error Handling and Retry Logic 

Robust error handling is one of the most important aspects of a production-quality myDATA API Integration. Errors fall into two categories: validation errors (the invoice data does not meet AADE requirements) and connectivity or infrastructure errors (the API request failed due to network issues, service unavailability, or authentication problems). Each category requires a different response from the integration. 

For validation errors, the integration should not retry the same invoice automatically, as the same data will produce the same error. Instead, it should flag the invoice for correction, log the specific error codes, and notify the responsible team member. For connectivity errors, the integration should implement exponential backoff retry logic retrying the failed request after progressively longer delays — to handle transient service issues without flooding the AADE API with repeated requests. QuickBooks E-Invoicing workflows should also account for these error-handling practices, while AADE API integrations should implement circuit breaker patterns to avoid cascading failures when the API is temporarily unavailable.

Testing and Go-Live Checklist 

Complete these steps before moving your myDATA API Integration from test to production: 

  • Test all invoice types your business issues, including standard invoices, credit notes, debit notes, and any special transaction types. 
  • Verify that income classification codes are mapped correctly for each transaction type using test invoices in the AADE sandbox. 
  • Confirm that MARK numbers are extracted correctly from successful responses and stored in your source system. 
  • Test error scenarios by submitting intentionally invalid invoices and verifying that error codes are captured and presented correctly. 
  • Test the CancelInvoice endpoint to confirm that cancellation workflows function correctly. 
  • Load-test the integration with realistic volumes to confirm that the system handles bulk submission without performance degradation. 
  • Obtain production API credentials from AADE and complete a credential rotation procedure before go-live. 
  • Confirm monitoring and alerting are in place for submission failures and API connectivity issues in production. 
Go-Live Checklist Item Status Check Responsibility
All invoice types tested in sandbox All scenarios accepted or correctly rejected IT Development
Classification code mapping verified Codes produce correct myDATA summary entries Finance and IT
MARK storage confirmed in source system MARKs visible on invoice records in ERP IT Development
Error handling tested with invalid invoices Errors captured and notified correctly IT Development
Production credentials obtained Test and production keys are separate and secure IT Security
Monitoring and alerting configured Alerts fire correctly on submission failure IT Operations
Finance team trained on error resolution Staff can identify and resolve rejections Finance Manager

Conclusion 

myDATA API Integration is a well-defined technical challenge with clear specifications and a test environment that allows thorough validation before go-live. Developers and IT teams that take the time to understand the Greece myDATA API architecture, implement robust error and retry handling, and complete comprehensive testing in the AADE sandbox will deliver integrations that are reliable in production. Germany Advintek helps businesses explore digital invoicing solutions and streamline invoice management. The investment in getting AADE API integration right at the outset pays dividends in the form of lower maintenance burden, fewer compliance gaps, and finance teams that can trust the submission data they see in their reporting dashboards.

Frequently Asked Questions 

What is myDATA API Integration? 

myDATA API Integration is the process of connecting an ERP or invoicing system directly to the AADE myDATA REST API to automate invoice submission, MARK retrieval, and error handling. It is the most efficient method for businesses with medium to high invoice volumes. 

Where is Greece myDATA API documentation published? 

myDATA API documentation is published on the AADE developer portal at the official AADE website. It covers API endpoints, authentication requirements, XML schema specifications, error codes, and response formats for both the test and production environments. 

What is AADE API integration? 

AADE API integration is the technical connection between a business’s systems and the AADE myDATA platform using the published REST API. It requires subscription key authentication, AADE-compliant XML invoice formatting, and robust handling of API responses including MARK extraction and error management. 

What is myDATA XML data transmission? 

myDATA XML data transmission is the process of formatting invoice data as AADE-compliant XML and submitting it to the myDATA API endpoint. The XML must conform to the AADE XSD schema, include all mandatory fields, and use the correct income classification and VAT codes. 

What is Greece E-Invoice API integration? 

Greece E-Invoice API integration is the implementation of a direct connection between a business’s invoice generation system and the AADE myDATA API, enabling automated real-time submission of invoice data, retrieval of MARK identifiers, and management of errors and rejections without manual intervention.

Source by:

Image by Pexels