Skip to content

Errors & statusCode

A document can fail at two different levels. Your application must handle both.

flowchart TD
    A[POST SendInvoices] --> B{HTTP status}
    B -- "401" --> U[Invalid API key or VAT number<br/>without permission<br/>fix your settings]
    B -- "400" --> V["Rejected by the provider<br/>body: { errors: [...] }<br/><b>NOT sent to AADE</b><br/>fix and send again"]
    B -- "5xx / timeout / no connection" --> T["The provider does not respond<br/>send again with transmissionFailure = 1<br/>(within 1 day)"]
    B -- "200" --> S{"response[0].statusCode"}
    S -- Success --> OK[Issued ✔]
    S -- Offline --> OFF["Issued ✔ — AADE was not responding<br/>the provider will transmit it<br/><b>DO NOT send it again</b><br/>then check that it got a MARK"]
    S -- "ValidationError<br/>XMLSyntaxError<br/>TechnicalError" --> E["Rejected by AADE<br/>see errors[].error[]<br/>fix and send again"]

HTTP status codes

HTTP What it means Body Issued?
200 The call was processed. Check statusCode. { "response": [ … ] } Depends on statusCode
400 Rejected by the provider's checks. See the list of rules. { "errors": ["…"] } No
401 API-KEY is missing or invalid, or the issuer's VAT number (ΑΦΜ) is not active on your account. empty or { "errors": ["…"] } No
404 Not found, e.g. unknown table or document. { "errors": ["…"] } —
5xx Unexpected error at the provider. varies Assume it was not issued, see below

statusCode

statusCode Issued? What you do
Success Store invoiceMark, invoiceUid, authenticationCode, invoiceUrl.
Offline The document was issued, with a UID. AADE was not responding and the provider will transmit it automatically. Do not send it again, but check later that it got a MARK. See Offline.
ValidationError AADE rejected the data. Read errors[].error[].code and message, fix and send again. Codes: AADE error codes.
XMLSyntaxError A value is outside the AADE schema, e.g. an invalid invoiceType or code. Fix and send again.
TechnicalError Unexpected error at AADE. Try again later.

HTTP 200 does not mean success

A rejected document (ValidationError) also returns HTTP 200. The document is issued only when statusCode is Success or Offline.

Example of a rejection by AADE:

{
  "response": [
    {
      "index": 1,
      "statusCode": "ValidationError",
      "invoiceMark": 0,
      "invoiceUid": null,
      "invoiceUrl": null,
      "credits": null,
      "errors": [
        {
          "error": [
            {
              "code": "228",
              "message": "The UID: C10262E0AE13C6AFD7DD2C980900BB0DF266D9C5 is invalid . It has already been sent for another invoice (MARK:400001939576037 , AUTHENTICATION_CODE:1D0F38488D532D3BB715408E01283D39E8D56A3A)"
            }
          ]
        }
      ]
    }
  ]
}

Error 228: already sent

This usually means that your previous attempt succeeded, but you never received the response (e.g. timeout). The message contains the MARK and the Authentication Code of the original. Use these instead of issuing the document again. You can also find the original with RequestTransmittedDocs, filtered by uid.

Offline & retries

  • You cannot reach the provider (timeout, network error, 5xx): send the same document again. If the provider still does not respond, issue the document locally and send it within 1 day with "transmissionFailure": 1.
  • statusCode = "Offline": the document was issued, but AADE was not responding and the provider will transmit it later. Never send it again. You find the final MARK with RequestTransmittedDocs?uid=….
  • Check that an Offline document finally got a MARK. While AADE is not responding, only the provider's checks run, not AADE's. A document with a data error may not be accepted once it is transmitted. How to check.

In detail, step by step: Offline & retries.

Error body formats at a glance

{ "errors": [ "The sum of the payment methods amount must be equal to the total gross value of the invoices." ] }
{ "response": [ { "statusCode": "ValidationError", "errors": [ { "error": [ { "code": "203", "message": "…" } ] } ] } ] }