{
  "info": {
    "_postman_id": "interop-api-govapp-akatharista",
    "name": "GovApp Akatharista - Interop API",
    "description": "Interop API endpoints της πλατφόρμας ΔΑΕ (dae.govapp.gr).\n\nΌλα τα endpoints απαιτούν:\n- Authorization: OAuth 2.0 Client Credentials\n- Content-Type: application/json\n- Scope: GovApp.AkatharistaEsoda.Interop",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "tokenName",
        "value": "dae-interop-token",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "client_credentials",
        "type": "string"
      },
      {
        "key": "accessTokenUrl",
        "value": "{{auth_token_url}}",
        "type": "string"
      },
      {
        "key": "clientId",
        "value": "{{client_id}}",
        "type": "string"
      },
      {
        "key": "clientSecret",
        "value": "{{client_secret}}",
        "type": "string"
      },
      {
        "key": "scope",
        "value": "GovApp.AkatharistaEsoda.Interop",
        "type": "string"
      },
      {
        "key": "headerPrefix",
        "value": "Bearer",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      },
      {
        "key": "client_authentication",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://dae-test.govapp.gr",
      "description": "Base URL της εφαρμογής (default: Test· για Production επιλέξτε το αντίστοιχο environment)"
    },
    {
      "key": "auth_token_url",
      "value": "https://auth-test.govhub.gr/connect/token",
      "description": "OAuth2 Token URL (default: Test)"
    },
    {
      "key": "client_id",
      "value": "",
      "description": "OAuth2 Client ID"
    },
    {
      "key": "client_secret",
      "value": "",
      "description": "OAuth2 Client Secret"
    }
  ],
  "item": [
    {
      "name": "Endpoint 11 - Βεβαιωμένα Ποσά",
      "item": [
        {
          "name": "Βεβαιωμένα Ποσά - Όλοι Δήμοι {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/veveomena-posa",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "veveomena-posa"]
            },
            "description": "Επιστρέφει βεβαιωμένα ποσά για όλους τους δήμους για το {{test_year}}."
          }
        },
        {
          "name": "Βεβαιωμένα Ποσά - Δήμος {{test_municipality_afm}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/veveomena-posa",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "veveomena-posa"]
            },
            "description": "Επιστρέφει βεβαιωμένα ποσά για δήμο {{test_municipality_afm}}, έτος {{test_year}}, όλοι μήνες."
          }
        },
        {
          "name": "Βεβαιωμένα Ποσά - Δήμος {{test_municipality_afm}}, Μάιος {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}},\n  \"month\": 5\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/veveomena-posa",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "veveomena-posa"]
            },
            "description": "Επιστρέφει βεβαιωμένα ποσά για δήμο {{test_municipality_afm}}, Μάιος {{test_year}} (αναμένεται 22995.57)."
          }
        }
      ]
    },
    {
      "name": "Endpoint 12 - Εισπράξεις",
      "item": [
        {
          "name": "Εισπράξεις - Όλοι Δήμοι {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/eisprakseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "eisprakseis"]
            },
            "description": "Επιστρέφει εισπράξεις για όλους τους δήμους, {{test_year}}."
          }
        },
        {
          "name": "Εισπράξεις - Δήμος {{test_municipality_afm}}, {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/eisprakseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "eisprakseis"]
            },
            "description": "Επιστρέφει εισπράξεις δήμου {{test_municipality_afm}} για {{test_year}}."
          }
        },
        {
          "name": "Εισπράξεις - Δήμος {{test_municipality_afm}}, Μάιος {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}},\n  \"month\": 5\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/eisprakseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "eisprakseis"]
            },
            "description": "Επιστρέφει εισπράξεις δήμου {{test_municipality_afm}}, Μάιος {{test_year}} (αναμένεται 19275.11)."
          }
        }
      ]
    },
    {
      "name": "Endpoint 13 - Προσαυξήσεις",
      "item": [
        {
          "name": "Προσαυξήσεις - Όλοι Δήμοι {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/prosafxiseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "prosafxiseis"]
            },
            "description": "Επιστρέφει προσαυξήσεις για όλους τους δήμους, {{test_year}}."
          }
        },
        {
          "name": "Προσαυξήσεις - Δήμος {{test_municipality_afm}}, Μάιος {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}},\n  \"month\": 5\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/prosafxiseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "prosafxiseis"]
            },
            "description": "Επιστρέφει προσαυξήσεις δήμου {{test_municipality_afm}}, Μάιος {{test_year}}."
          }
        }
      ]
    },
    {
      "name": "Endpoint 14 - Πλήθος Επιχειρήσεων",
      "item": [
        {
          "name": "Πλήθος Επιχειρήσεων - Όλοι Δήμοι {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/plithos-epixeiriseon",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "plithos-epixeiriseon"]
            },
            "description": "Επιστρέφει πλήθος επιχειρήσεων για όλους τους δήμους, {{test_year}}."
          }
        },
        {
          "name": "Πλήθος Επιχειρήσεων - Δήμος {{test_municipality_afm}}, Οκτώβριος {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}},\n  \"month\": 10\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/plithos-epixeiriseon",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "plithos-epixeiriseon"]
            },
            "description": "Επιστρέφει πλήθος επιχειρήσεων δήμου {{test_municipality_afm}}, Οκτώβριος {{test_year}} (αναμένεται 10)."
          }
        }
      ]
    },
    {
      "name": "Endpoint 15 - Πλήθος Δηλώσεων",
      "item": [
        {
          "name": "Πλήθος Δηλώσεων - Όλοι Δήμοι {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": {{test_year}}\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/plithos-diloseon",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "plithos-diloseon"]
            },
            "description": "Επιστρέφει πλήθος δηλώσεων για όλους τους δήμους, {{test_year}}."
          }
        },
        {
          "name": "Πλήθος Δηλώσεων - Δήμος {{test_municipality_afm}}, Οκτώβριος {{test_year}}",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_municipality_afm}}\",\n  \"year\": {{test_year}},\n  \"month\": 10\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/plithos-diloseon",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "plithos-diloseon"]
            },
            "description": "Επιστρέφει πλήθος δηλώσεων δήμου {{test_municipality_afm}}, Οκτώβριος {{test_year}} (αναμένεται 10)."
          }
        }
      ]
    },
    {
      "name": "Endpoint 16 - Έλεγχος Υποβολής ΑΑΔΕ",
      "item": [
        {
          "name": "Έλεγχος Υποβολής & Φόρων ΑΑΔΕ",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_epixirisi_afm}}\",\n  \"month\": {{test_month}},\n  \"year\": 2023,\n  \"kae\": \"{{test_kae}}\"\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/aade-historic-data",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "aade-historic-data"]
            },
            "description": "Καλεί live την υπηρεσία της ΑΑΔΕ για ένα ΑΦΜ επιχείρησης × μήνα × έτος × ΚΑΕ Δήμου. Κάλυψη ΑΑΔΕ: 01/2022 – 02/2025.\n\nResponse fields:\n- submissionFlag: 0=δεν υπάρχει, 1=έχει υποβληθεί\n- taxes: οφειλόμενο τέλος προς τον Δήμο (όχι είσπραξη)\n- periodType: 1=μηνιαία, 3=τριμηνιαία, 12=ετήσια δήλωση\n- errorCode/errorDescr: null αν επιτυχία\n\nΣφάλματα επιστρέφονται με HTTP 200: GEN_COMMUNICATION_ERROR (network/timeout) ή ο κωδικός της ΑΑΔΕ. Δεν γίνεται validation στα πεδία."
          }
        }
      ]
    },
    {
      "name": "Endpoint 17 - Περιοδικές Δηλώσεις",
      "item": [
        {
          "name": "Περιοδικές Δηλώσεις - Πρώτη Σελίδα",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"997561152\",\n  \"year\": 2021\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/periodikes-diloseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "periodikes-diloseis"]
            },
            "description": "Επιστρέφει την πρώτη σελίδα (50 εγγραφές) περιοδικών δηλώσεων για δήμο 997561152, 2021."
          }
        },
        {
          "name": "Περιοδικές Δηλώσεις - Επόμενη Σελίδα",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"997561152\",\n  \"year\": 2021,\n  \"page\": 2,\n  \"pageSize\": 50\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/periodikes-diloseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "periodikes-diloseis"]
            },
            "description": "Επιστρέφει τη δεύτερη σελίδα αποτελεσμάτων."
          }
        },
        {
          "name": "Περιοδικές Δηλώσεις - Μεγάλο Page Size",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"997561152\",\n  \"year\": 2021,\n  \"page\": 1,\n  \"pageSize\": 500\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/periodikes-diloseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "periodikes-diloseis"]
            },
            "description": "Επιστρέφει έως 500 εγγραφές (μέγιστο page size)."
          }
        },
        {
          "name": "Περιοδικές Δηλώσεις - Validation Error (400)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"12345\",\n  \"year\": 2019\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/periodikes-diloseis",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "periodikes-diloseis"]
            },
            "description": "Παράδειγμα με λάθος validation — AFM < 9 ψηφία και year < 2021. Αναμένεται 400 Bad Request."
          }
        }
      ]
    },
    {
      "name": "Endpoint 18 - Οφειλόμενο Τέλος ΑΑΔΕ ανά ΑΦΜ",
      "item": [
        {
          "name": "Οφειλόμενο Τέλος ΑΑΔΕ - Επιχείρηση {{test_epixirisi_afm}}, 2023",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_epixirisi_afm}}\",\n  \"kae\": \"{{test_kae}}\",\n  \"etos\": 2023\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/eispraxeis-ana-afm",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "eispraxeis-ana-afm"]
            },
            "description": "Όλες οι περίοδοι του έτους για ένα ΑΦΜ επιχείρησης και ΚΑΕ Δήμου, live από την ΑΑΔΕ (μία κλήση ανά μήνα). Το ποσό είναι το οφειλόμενο τέλος από τη δήλωση, όχι πραγματική είσπραξη. Έτος 2022–2025 (κάλυψη ΑΑΔΕ 01/2022 – 02/2025).\n\nResponse: afm, etos, kae, municipalityName, exeiIpovoli, synoloTaxes, periodoi[] (periodosLabel, periodType, submissionFlag, taxes), sfalmata[] (minas, errorCode, errorDescr)."
          }
        },
        {
          "name": "Οφειλόμενο Τέλος ΑΑΔΕ - Validation Error (400)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"12345\",\n  \"kae\": \"{{test_kae}}\",\n  \"etos\": 2020\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/eispraxeis-ana-afm",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "eispraxeis-ana-afm"]
            },
            "description": "Παράδειγμα με λάθος validation — AFM < 9 ψηφία. Αναμένεται 400 Bad Request με { message, messageCode, httpStatusCode, errors }."
          }
        }
      ]
    },
    {
      "name": "Endpoint 19 - Οφειλόμενο Τέλος ΑΑΔΕ ανά ΑΦΜ (Excel)",
      "item": [
        {
          "name": "Οφειλόμενο Τέλος ΑΑΔΕ Excel - Επιχείρηση {{test_epixirisi_afm}}, 2023",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"afm\": \"{{test_epixirisi_afm}}\",\n  \"kae\": \"{{test_kae}}\",\n  \"etos\": 2023\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": {
              "raw": "{{base_url}}/api/interop/eispraxeis-ana-afm/excel",
              "host": ["{{base_url}}"],
              "path": ["api", "interop", "eispraxeis-ana-afm", "excel"]
            },
            "description": "Τα δεδομένα του Endpoint 18 σε αρχείο xlsx (DAE_Eispraxeis_{afm}_{etos}_{yyyyMMdd_HHmm}.xlsx). Στο Postman χρησιμοποιήστε «Send and Download»."
          }
        }
      ]
    }
  ]
}
