← Plugins

mydataThird party

Read issued and received invoices and income totals from AADE myDATA

View source

mydata plugin for Stavrobot

Lets the assistant read your invoices from AADE myDATA, the Greek tax authority's electronic books: invoices you issued (including those issued in AADE's free timologio app), invoices others issued to you, and income and expense totals.

The plugin only reads. It calls four GET methods of the myDATA REST API (RequestTransmittedDocs, RequestDocs, RequestMyIncome, RequestMyExpenses) and cannot issue, change or cancel an invoice.

Prerequisites

A myDATA REST API account. It is free and separate from your TAXISnet login:

  1. Log in with TAXISnet at https://www1.aade.gr/saadeapps2/bookkeeper-web.
  2. Choose "Φόρμα εγγραφής στο myDATA REST API", then "Νέα εγγραφή χρήστη".
  3. Pick a username (Latin letters and digits) and add it.
  4. The page lists the subscription key in the column "Κωδικός API".

Install

Tell Stavrobot to install https://github.com/vmasto/stavrobot-plugin-mydata.

Configuration

KeyValue
user_idThe myDATA REST API username from step 3
subscription_keyThe "Κωδικός API" from step 4
entity_vatOptional. An accountant or company representative sets the ΑΦΜ whose books to read. Leave empty for your own

Set them on /settings/plugins.

Tools

ToolWhat it returns
invoicesIssued (default), received or recorded documents between two dates, newest first, with ΜΑΡΚ, number, client or supplier ΑΦΜ, net, VAT, withheld and gross amounts, and totals that leave out cancelled invoices and subtract credit notes
invoiceOne invoice by ΜΑΡΚ, with every line, payment methods and AADE's public QR page
totalsIncome or expense totals as myDATA books them, grouped by month, counterpart or document type

Dates default to 1 January of the current year through today.

invoices has three directions:

  • issued: sales invoices and receipts you issued, from any channel, including the timologio app.
  • received: invoices other businesses issued to you.
  • recorded: expense documents you booked in myDATA yourself (types 13.x to 17.x), such as services bought from an EU supplier (14.3) or retail purchases (13.1). myDATA returns these together with your issued invoices; the plugin separates them by type.

Limits

  • myDATA stores only the ΑΦΜ of Greek counterparts, not their names, so the assistant has to know which ΑΦΜ belongs to whom.
  • Line descriptions appear only when the issuer filled the optional itemDescr or lineComments field.
  • myDATA has no PDF of an invoice. qr_url opens AADE's own view of it.
  • myDATA rate limits each account. After a handful of calls in a minute it refuses requests for about three minutes, and the tools say how long to wait.
  • One call reads at most 25 pages or 20 seconds of results. A longer range comes back marked incomplete; ask again with shorter dates.

What the plugin can and can't do

  • It sends the credentials only to mydatapi.aade.gr and does not follow redirects.
  • It uses only myDATA's read methods. It has no code path that submits, classifies or cancels anything.

Tests

python3 -m unittest discover tests

A local HTTP server stands in for the myDATA API.