{
  "info": {
    "name": "Novus Provider API v3.0",
    "description": "Έκδοση και διαβίβαση παραστατικών στο myDATA μέσω της **Novus Conceptus**, πιστοποιημένου Παρόχου Ηλεκτρονικής Τιμολόγησης της ΑΑΔΕ.\n\n## Πριν ξεκινήσετε\n\n1. Στις **Variables** της collection βάλτε:\n   - `apiKey`: το δοκιμαστικό API key σας (από το developer portal),\n   - `issuerVat`: τον ΑΦΜ με τον οποίο γραφτήκατε. Όλα τα παραστατικά εκδίδονται με αυτόν.\n2. Το `baseUrl` δείχνει εξ ορισμού στο **δοκιμαστικό** `https://provider-dev.timologisi.online`.\n   Για παραγωγή αλλάξτε το σε `https://provider.timologisi.online` (με το κλειδί παραγωγής).\n3. Και τα δύο περιβάλλοντα έχουν **Swagger UI στο `/index.html`**.\n\n## Σειρά εκτέλεσης\n\nΞεκινήστε από τον φάκελο «1. Ροή: το πρώτο παραστατικό» και τρέξτε τα αιτήματα με τη σειρά.\nΣε κάθε φάκελο τα αιτήματα είναι αριθμημένα: όπου ένα βήμα χρειάζεται κάτι από το προηγούμενο\n(MARK, UID, token υπογραφής), τα scripts το αποθηκεύουν **αυτόματα** σε μεταβλητές της collection.\n\nΗ **σημερινή ημερομηνία** (`{{today}}`) και **νέος ΑΑ** (`{{aa}}`) μπαίνουν αυτόματα πριν από κάθε κλήση.\nΣτο **Console** του Postman βλέπετε το `statusCode`, το MARK και τα σφάλματα της ΑΑΔΕ κάθε απάντησης.\n\n## Προσοχή\n\n- **Ένα παραστατικό ανά κλήση.**\n- Μέσω Παρόχου εκδίδονται **μόνο οι τύποι 1.1 έως 11.5**. Οι 12.x έως 17.x δεν διαβιβάζονται από Πάροχο.\n- **HTTP 200 δεν σημαίνει επιτυχία:** κοιτάτε το `response[0].statusCode`. `Success` ή `Offline` = εκδόθηκε.\n- Σε `Offline` **μην** το ξαναστείλετε: θα διαβιβαστεί αυτόματα.\n- Το ίδιο παραστατικό δεύτερη φορά δίνει σφάλμα ΑΑΔΕ `228`, με το MARK του αρχικού.\n- Κάθε κλήση χρεώνει credits (πεδίο `credits`).\n\nΤεκμηρίωση: https://developers.novusconceptus.com",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "API-KEY",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Προειδοποίηση αν δεν έχουν οριστεί τα βασικά",
          "if (!pm.collectionVariables.get('apiKey')) {",
          "    console.warn('Δεν έχει οριστεί apiKey στις Variables της collection.');",
          "}",
          "if (!pm.collectionVariables.get('issuerVat')) {",
          "    console.warn('Δεν έχει οριστεί issuerVat στις Variables της collection.');",
          "}",
          "",
          "// Σημερινή ημερομηνία (ώρα Ελλάδας) και νέος ΑΑ σε κάθε κλήση",
          "let today;",
          "try { today = new Date().toLocaleDateString('sv-SE', { timeZone: 'Europe/Athens' }); }",
          "catch (e) { today = new Date().toISOString().slice(0, 10); }",
          "pm.collectionVariables.set('today', today);",
          "pm.collectionVariables.set('aa', String(Date.now()).slice(-9));"
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Σε κάθε απάντηση παραστατικού: statusCode, MARK, credits και σφάλματα στο Console",
          "const ct = pm.response.headers.get('Content-Type') || '';",
          "if (ct.includes('json')) {",
          "    try {",
          "        const j = pm.response.json();",
          "        if (Array.isArray(j.response) && j.response[0]) {",
          "            const r = j.response[0];",
          "            console.log('statusCode:', r.statusCode, '| MARK:', r.invoiceMark, '| UID:', r.invoiceUid, '| credits:', r.credits);",
          "            if (r.errors) { console.log('Σφάλματα ΑΑΔΕ:', JSON.stringify(r.errors)); }",
          "        } else if (j.errors) {",
          "            console.log('Σφάλματα Παρόχου:', JSON.stringify(j.errors));",
          "        }",
          "    } catch (e) { /* όχι JSON */ }",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://provider-dev.timologisi.online",
      "type": "string",
      "description": "Δοκιμαστικό. Παραγωγή: https://provider.timologisi.online"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string",
      "description": "Το API key σας. Διαφορετικό κλειδί για δοκιμαστικό και παραγωγή."
    },
    {
      "key": "issuerVat",
      "value": "",
      "type": "string",
      "description": "Ο ΑΦΜ με τον οποίο γραφτήκατε. Όλα τα παραστατικά εκδίδονται με αυτόν."
    },
    {
      "key": "b2gApiKey",
      "value": "",
      "type": "string",
      "description": "Μόνο για τον φάκελο 7 (B2G): το ξεχωριστό δοκιμαστικό κλειδί B2G."
    },
    {
      "key": "today",
      "value": "",
      "type": "string",
      "description": "Η σημερινή ημερομηνία. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "aa",
      "value": "",
      "type": "string",
      "description": "Νέος ΑΑ σε κάθε κλήση. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "lastMark",
      "value": "",
      "type": "string",
      "description": "Το MARK του τελευταίου παραστατικού. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "lastUid",
      "value": "",
      "type": "string",
      "description": "Το UID του τελευταίου παραστατικού. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "lastAuthCode",
      "value": "",
      "type": "string",
      "description": "Το Authentication Code του τελευταίου παραστατικού. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "lastAa",
      "value": "",
      "type": "string",
      "description": "Ο ΑΑ του τελευταίου παραστατικού. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "originalMark",
      "value": "",
      "type": "string",
      "description": "Φάκελος 3. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "signatureToken",
      "value": "",
      "type": "string",
      "description": "Φάκελος 4, από το 4.1. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "oldInvoiceMark",
      "value": "",
      "type": "string",
      "description": "Φάκελος 4, από το 4.3. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "oldSignatureToken",
      "value": "",
      "type": "string",
      "description": "Φάκελος 4, από το 4.4. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "tableId",
      "value": "",
      "type": "string",
      "description": "Φάκελος 5. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "orderMark",
      "value": "",
      "type": "string",
      "description": "Φάκελος 5. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "partialMark",
      "value": "",
      "type": "string",
      "description": "Φάκελος 5. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "tableId2",
      "value": "",
      "type": "string",
      "description": "Φάκελος 5. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "order2Mark",
      "value": "",
      "type": "string",
      "description": "Φάκελος 5. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "deliveryNoteMark",
      "value": "",
      "type": "string",
      "description": "Φάκελος 6. Συμπληρώνεται αυτόματα."
    },
    {
      "key": "deliveryNoteToCancel",
      "value": "",
      "type": "string",
      "description": "Φάκελος 6. Συμπληρώνεται αυτόματα."
    }
  ],
  "item": [
    {
      "name": "1. Ροή: το πρώτο παραστατικό",
      "description": "Τα βήματα με τη σειρά που τα κάνει η εφαρμογή σας σε μια πραγματική έκδοση. Αν περάσουν, το κλειδί και ο ΑΦΜ σας δουλεύουν.",
      "item": [
        {
          "name": "1.1 Υπόλοιπο credits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/GetCreditsBalance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "GetCreditsBalance"
              ]
            },
            "description": "Το υπόλοιπο credits του λογαριασμού σας. Κάθε παραστατικό χρεώνει credits και, αν δεν φτάνουν, απορρίπτεται με HTTP 400."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "console.log('creditsBalance:', pm.response.json().creditsBalance);"
                ]
              }
            }
          ]
        },
        {
          "name": "1.2 Έκδοση απόδειξης λιανικής (11.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Εκδίδει μια **Απόδειξη Λιανικής Πώλησης** με μετρητά.\n\nΟ ΑΦΜ εκδότη, η ημερομηνία και ο ΑΑ μπαίνουν αυτόματα από τις μεταβλητές.\n\nΣτην απάντηση: `statusCode`, `invoiceMark` (MARK), `invoiceUid`, `authenticationCode` και `invoiceUrl` (το PDF). Τα κρατάμε για τα επόμενα βήματα.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 1,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "1.3 Αναζήτηση με UID",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/RequestTransmittedDocs?issuerVatNumber={{issuerVat}}&issuedFrom={{today}}&issuedTo={{today}}&uid={{lastUid}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "RequestTransmittedDocs"
              ],
              "query": [
                {
                  "key": "issuerVatNumber",
                  "value": "{{issuerVat}}",
                  "description": "ΑΦΜ εκδότη"
                },
                {
                  "key": "issuedFrom",
                  "value": "{{today}}",
                  "description": "YYYY-MM-DD"
                },
                {
                  "key": "issuedTo",
                  "value": "{{today}}",
                  "description": "YYYY-MM-DD"
                },
                {
                  "key": "uid",
                  "value": "{{lastUid}}",
                  "description": "Το UID του 1.2"
                }
              ]
            },
            "description": "Βρίσκει το παραστατικό του βήματος 1.2.\n\nΈτσι βρίσκετε και το τελικό MARK ενός παραστατικού που εκδόθηκε `Offline`."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "1.4 PDF με UID",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/pdf"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/GetInvoice/{{lastUid}}/pdf",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "GetInvoice",
                "{{lastUid}}",
                "pdf"
              ]
            },
            "description": "Το PDF του παραστατικού. **Δημόσιο link, χωρίς API key**: είναι το `downloadingInvoiceUrl` που δίνει η ΑΑΔΕ στον λήπτη.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Επιστρέφει PDF', function () {",
                  "    pm.response.to.have.status(200);",
                  "    pm.expect(pm.response.headers.get('Content-Type')).to.include('application/pdf');",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "1.5 myDATA XML με UID",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/xml"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/GetInvoice/{{lastUid}}/myDATA",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "GetInvoice",
                "{{lastUid}}",
                "myDATA"
              ]
            },
            "description": "Το αναλυτικό XML του myDATA για το ίδιο παραστατικό. Δημόσιο link, χωρίς API key.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "2. Τιμολόγια & αποδείξεις",
      "description": "Οι συνηθισμένοι τύποι. Ανεξάρτητα αιτήματα: τρέξτε όποιο χρειάζεστε.",
      "item": [
        {
          "name": "2.1 Τιμολόγιο Πώλησης (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Πώληση αγαθών σε επιχείρηση, επί πιστώσει. Με `counterpart` (λήπτη) και χαρακτηρισμό εσόδων ανά γραμμή.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "2.2 Τιμολόγιο Παροχής Υπηρεσιών (2.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Παροχή υπηρεσιών σε επιχείρηση.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"2.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 100\n        },\n        {\n          \"type\": 6,\n          \"amount\": 24\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_3\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_3\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Παροχής Υπηρεσιών\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "2.3 Απόδειξη Παροχής Υπηρεσιών (11.2)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Λιανική παροχή υπηρεσιών σε ιδιώτη. Χωρίς `counterpart`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.2\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 1,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_3\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_3\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Παροχής Υπηρεσιών\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "2.4 Τίτλος Κτήσης (3.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Αγορά από μη υπόχρεο έκδοσης. Ο εκδότης χαρακτηρίζει **έξοδα** (`expensesClassification`).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"3.1\",\n        \"currency\": \"EUR\",\n        \"exchangeRate\": 1.19552,\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 100\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"expensesClassification\": [\n            {\n              \"classificationType\": \"E3_102_002\",\n              \"classificationCategory\": \"category2_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 100,\n        \"expensesClassification\": [\n          {\n            \"classificationType\": \"E3_102_002\",\n            \"classificationCategory\": \"category2_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τίτλος Κτήσης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "2.5 Τέλος ανθεκτικότητας κλιματικής κρίσης (8.2)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Το τέλος ανά διανυκτέρευση, με κατηγορία τέλους 21.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.2\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 6.0\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"CRF-01\",\n          \"quantity\": 2,\n          \"measurementUnitLabel\": \"ΔΙΑΝ.\",\n          \"lineUnitPrice\": 0,\n          \"totalNetPriceBeforeDiscount\": 0,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 0,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"otherTaxesPercentCategory\": 21,\n          \"otherTaxesAmount\": 6.0,\n          \"lineDescription\": \"Τέλος ανθεκτικότητας κλιματικής κρίσης (2 διανυκτερεύσεις)\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 0\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 0,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 6.0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 6.0,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 0\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τέλος Ανθεκτικότητας Κλιματικής Κρίσης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Μετρητά\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "2.6 Φόροι ανά γραμμή",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Παρακράτηση, τέλη, λοιποί φόροι, ψηφιακό τέλος και κρατήσεις **σε κάθε γραμμή**.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 125.7\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"SRV-100\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Προϊόν Α\",\n          \"withheldPercentCategory\": 6,\n          \"withheldAmount\": 4.0,\n          \"feesPercentCategory\": 10,\n          \"feesAmount\": 2.0,\n          \"otherTaxesPercentCategory\": 17,\n          \"otherTaxesAmount\": 3.0,\n          \"stampDutyPercentCategory\": 1,\n          \"stampDutyAmount\": 1.2,\n          \"deductionsAmount\": 0.5,\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 4.0,\n        \"totalFeesAmount\": 2.0,\n        \"totalStampDutyAmount\": 1.2,\n        \"totalOtherTaxesAmount\": 3.0,\n        \"totalDeductionsAmount\": 0.5,\n        \"totalGrossValue\": 125.7,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Μετρητά\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "2.7 Φόροι σε επίπεδο παραστατικού (taxesTotals)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Οι ίδιοι φόροι **μία φορά** για όλο το παραστατικό, στο `taxesTotals`. Αν τους στέλνετε εδώ, δεν τους στέλνετε ανά γραμμή.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 125.7\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"SRV-100\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Προϊόν Α\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"taxesTotals\": [\n        {\n          \"taxType\": 1,\n          \"taxCategory\": 6,\n          \"underlyingValue\": 100,\n          \"taxAmount\": 4.0,\n          \"reducesPayable\": true,\n          \"taxTypeLabel\": \"Παρακράτηση φόρου 4%\"\n        },\n        {\n          \"taxType\": 2,\n          \"taxCategory\": 10,\n          \"underlyingValue\": 100,\n          \"taxAmount\": 2.0,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"Λοιπά τέλη\"\n        },\n        {\n          \"taxType\": 3,\n          \"taxCategory\": 17,\n          \"underlyingValue\": 100,\n          \"taxAmount\": 3.0,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"Λοιποί φόροι\"\n        },\n        {\n          \"taxType\": 4,\n          \"taxCategory\": 1,\n          \"underlyingValue\": 100,\n          \"taxAmount\": 1.2,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"Ψηφιακό τέλος συναλλαγής 1,2%\"\n        },\n        {\n          \"taxType\": 5,\n          \"underlyingValue\": 100,\n          \"taxAmount\": 0.5,\n          \"reducesPayable\": true,\n          \"taxTypeLabel\": \"Κρατήσεις\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 4.0,\n        \"totalFeesAmount\": 2.0,\n        \"totalStampDutyAmount\": 1.2,\n        \"totalOtherTaxesAmount\": 3.0,\n        \"totalDeductionsAmount\": 0.5,\n        \"totalGrossValue\": 125.7,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Μετρητά\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "3. Πιστωτικά",
      "description": "Το 3.2 πιστώνει το τιμολόγιο του 3.1: τρέξτε τα με τη σειρά.",
      "item": [
        {
          "name": "3.1 Αρχικό τιμολόγιο (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Το τιμολόγιο που θα πιστωθεί. Το MARK του κρατιέται στη μεταβλητή `originalMark`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('originalMark', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "3.2 Πιστωτικό συσχετιζόμενο (5.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Πιστώνει το τιμολόγιο του 3.1: το MARK του μπαίνει στο `correlatedInvoices`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"5.1\",\n        \"currency\": \"EUR\",\n        \"correlatedInvoices\": [\n          {{originalMark}}\n        ],\n        \"correlatedInvoicesLabel\": \"Τιμολόγιο Πώλησης A 1001\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Πιστωτικό Τιμολόγιο\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "3.3 Πιστωτικό μη συσχετιζόμενο (5.2)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Πίστωση χωρίς αναφορά σε συγκεκριμένο τιμολόγιο (π.χ. εκπτώσεις τζίρου).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"5.2\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Πιστωτικό Τιμολόγιο\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "3.4 Πιστωτικό λιανικής (11.4)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Επιστροφή σε ιδιώτη.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.4\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Πιστωτικό Στοιχείο Λιανικής\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 7,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "4. Κάρτα / IRIS μέσω POS",
      "description": "Υπογραφή Παρόχου για πληρωμή με κάρτα ή IRIS (Α.1155/2023). Τρέξτε τα με τη σειρά.\n\n- **4.1 → 4.2**: νέο παραστατικό που πληρώνεται με κάρτα.\n- **4.3 → 4.5**: εξόφληση με κάρτα ενός παλιού τιμολογίου επί πιστώσει.",
      "item": [
        {
          "name": "4.1 Απόδειξη με κάρτα (skipSignature=false)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices?skipSignature=false",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ],
              "query": [
                {
                  "key": "skipSignature",
                  "value": "false",
                  "description": "Επιστρέφει υπογραφή Παρόχου"
                }
              ]
            },
            "description": "Με `skipSignature=false` ο Πάροχος **δεν** εκδίδει ακόμη: επιστρέφει υπογραφή (`providerSignature`).\n\nΤο `token` το περνάτε αυτούσιο στο POS. Κρατιέται στη μεταβλητή `signatureToken`.\nΙσχύει 24 ώρες (2 ώρες στην εστίαση).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 7,\n          \"amount\": 124,\n          \"terminalId\": \"TID00001\",\n          \"posNspId\": 1\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 1,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Κάρτα\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "const sig = ((r.providerSignature || [])[0] || {}).signatures;",
                  "pm.test('Επέστρεψε υπογραφή Παρόχου', function () {",
                  "    pm.expect(sig && sig[0] && sig[0].token).to.be.a('string');",
                  "});",
                  "if (sig && sig[0]) {",
                  "    pm.collectionVariables.set('signatureToken', sig[0].token);",
                  "    console.log('token (για το POS):', sig[0].token, '| λήγει:', sig[0].expiryDate);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "4.2 Ολοκλήρωση μετά τη χρέωση (CompletionPosInvoices)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/CompletionPosInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "CompletionPosInvoices"
              ]
            },
            "description": "Μετά τη χρέωση στο POS στέλνετε το αποτέλεσμα και το παραστατικό διαβιβάζεται.\n\nΤο body είναι **πίνακας**. Το `transactionId` το δίνει το POS (εδώ βάζουμε τον ΑΑ για τη δοκιμή). `paymentType`: ο **τελικός** τύπος, 7 κάρτα ή 8 IRIS.",
            "body": {
              "mode": "raw",
              "raw": "[\n  {\n    \"signatureToken\": \"{{signatureToken}}\",\n    \"transactionId\": \"{{aa}}\",\n    \"paymentAmount\": 124,\n    \"tipAmount\": 0,\n    \"paymentType\": 7\n  }\n]",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "4.3 Τιμολόγιο επί πιστώσει (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Ένα τιμολόγιο που θα εξοφληθεί αργότερα με κάρτα. Το MARK κρατιέται στη μεταβλητή `oldInvoiceMark`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('oldInvoiceMark', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "4.4 Υπογραφή για παλιό τιμολόγιο (AskSignatureForOldInvoice)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/AskSignatureForOldInvoice?terminalId=TID00001&posNspId=1",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "AskSignatureForOldInvoice"
              ],
              "query": [
                {
                  "key": "terminalId",
                  "value": "TID00001",
                  "description": "Κωδικός τερματικού POS"
                },
                {
                  "key": "posNspId",
                  "value": "1",
                  "description": "Πάροχος POS (1 = Mellon)"
                }
              ]
            },
            "description": "Το **body είναι σκέτο το MARK** (αριθμός JSON). Τερματικό και πάροχος POS στο query string.\n\nΤο `token` της απάντησης κρατιέται στη μεταβλητή `oldSignatureToken`.",
            "body": {
              "mode": "raw",
              "raw": "{{oldInvoiceMark}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const j = pm.response.json();",
                  "if (j.token) { pm.collectionVariables.set('oldSignatureToken', j.token); }"
                ]
              }
            }
          ]
        },
        {
          "name": "4.5 Ολοκλήρωση πληρωμής (CompletionAskSignatureForOldInvoice)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/CompletionAskSignatureForOldInvoice?signatureToken={{oldSignatureToken}}&transactionId={{aa}}&paymentAmount=124&tipAmount=0&paymentType=7",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "CompletionAskSignatureForOldInvoice"
              ],
              "query": [
                {
                  "key": "signatureToken",
                  "value": "{{oldSignatureToken}}",
                  "description": "Από το 4.4"
                },
                {
                  "key": "transactionId",
                  "value": "{{aa}}",
                  "description": "Από το POS"
                },
                {
                  "key": "paymentAmount",
                  "value": "124",
                  "description": "Ποσό"
                },
                {
                  "key": "tipAmount",
                  "value": "0",
                  "description": "Φιλοδώρημα"
                },
                {
                  "key": "paymentType",
                  "value": "7",
                  "description": "7 κάρτα, 8 IRIS"
                }
              ]
            },
            "description": "Το **body είναι πάλι σκέτο το MARK**. Τα στοιχεία της συναλλαγής στο query string.",
            "body": {
              "mode": "raw",
              "raw": "{{oldInvoiceMark}}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "4.6 Απόδειξη Είσπραξης POS (8.4)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Είσπραξη μέσω POS που αφορά το τιμολόγιο του 4.3 (`multipleConnectedMarks`).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.4\",\n        \"currency\": \"EUR\",\n        \"multipleConnectedMarks\": [\n          {{oldInvoiceMark}}\n        ]\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 7,\n          \"amount\": 10,\n          \"terminalId\": \"TID00001\",\n          \"posNspId\": 1\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0001\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"LT\",\n          \"lineUnitPrice\": 20,\n          \"totalNetPriceBeforeDiscount\": 20,\n          \"totalDiscountValue\": 10,\n          \"netValue\": 10,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"lineDescription\": \"Είδος δοκιμής\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 10\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 10,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 10,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 10\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Είσπραξης POS\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"paymentMethodInvoiceLabel\": \"POS\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "4.7 Απόδειξη Επιστροφής POS (8.5)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Επιστροφή ποσού μέσω POS.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.5\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 7,\n          \"amount\": 10,\n          \"terminalId\": \"TID00001\",\n          \"posNspId\": 1\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0001\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"LT\",\n          \"lineUnitPrice\": 20,\n          \"totalNetPriceBeforeDiscount\": 20,\n          \"totalDiscountValue\": 10,\n          \"netValue\": 10,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"lineDescription\": \"Είδος δοκιμής\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 10\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 10,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 10,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 10\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Επιστροφής POS\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"paymentMethodInvoiceLabel\": \"POS\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "5. Εστίαση (8.6)",
      "description": "Ένα τραπέζι από την αρχή ως το τέλος: παραγγελία, ακύρωση είδους, κλείσιμο με απόδειξη. Και ένα δεύτερο τραπέζι που ακυρώνεται ολόκληρο. Τρέξτε τα με τη σειρά.\n\nΠροσοχή: ανοιχτά δελτία πάνω από 24 ώρες **μπλοκάρουν** όλη την εγκατάσταση.",
      "item": [
        {
          "name": "5.1 Νέα παραγγελία (8.6)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Δελτίο Παραγγελίας Εστίασης. Το `tableAA` είναι ένα GUID ανά τραπέζι (μεταβλητή `tableId`), το ίδιο σε όλα τα δελτία του μέχρι να κλείσει. Χωρίς `paymentMethods`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.6\",\n        \"currency\": \"EUR\",\n        \"tableAA\": \"{{tableId}}\"\n      },\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0131\",\n          \"itemDescr\": \"Χωριάτικη\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 2,\n          \"vatCategoryPercent\": 13,\n          \"vatAmount\": 13,\n          \"lineDescription\": \"Χωριάτικη\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 100\n            }\n          ]\n        },\n        {\n          \"lineNumber\": 2,\n          \"lineCode\": \"#0501\",\n          \"itemDescr\": \"ΤΖΑΤΖΙΚΙ\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 5,\n          \"totalNetPriceBeforeDiscount\": 5,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 5,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 1.2,\n          \"lineDescription\": \"ΤΖΑΤΖΙΚΙ\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 5\n            }\n          ]\n        },\n        {\n          \"lineNumber\": 3,\n          \"lineCode\": \"#0605\",\n          \"itemDescr\": \"ΦΕΤΑ\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 10,\n          \"totalNetPriceBeforeDiscount\": 10,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 10,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 2.4,\n          \"lineDescription\": \"ΦΕΤΑ\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 10\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 115,\n        \"totalVatAmount\": 16.6,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 131.6,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 115\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"ΔΕΛΤΙΟ ΠΑΡΑΓΓΕΛΙΑΣ\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 7,\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// Νέο τραπέζι: ένα GUID που κρατάτε μέχρι να κλείσει το τραπέζι",
                  "pm.collectionVariables.set('tableId', pm.variables.replaceIn('{{$guid}}'));"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('orderMark', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "5.2 Ακύρωση είδους (8.6 με recType 7)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Νέο 8.6 στο **ίδιο** τραπέζι, μόνο με τα είδη που ακυρώνονται και `recType: 7` σε κάθε γραμμή. Τα ποσά γράφονται θετικά.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.6\",\n        \"currency\": \"EUR\",\n        \"tableAA\": \"{{tableId}}\"\n      },\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0131\",\n          \"itemDescr\": \"Χωριάτικη\",\n          \"recType\": 7,\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 2,\n          \"vatCategoryPercent\": 13,\n          \"vatAmount\": 13,\n          \"lineDescription\": \"Χωριάτικη\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 13,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 113,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"ΔΕΛΤΙΟ ΠΑΡΑΓΓΕΛΙΑΣ - ΜΕΡΙΚΗ ΑΚΥΡΩΣΗ\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 7,\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('partialMark', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "5.3 Ανοιχτά τραπέζια",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/GetOpenTables?VatNumber={{issuerVat}}&Branch=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "GetOpenTables"
              ],
              "query": [
                {
                  "key": "VatNumber",
                  "value": "{{issuerVat}}",
                  "description": "ΑΦΜ"
                },
                {
                  "key": "Branch",
                  "value": "0",
                  "description": "Εγκατάσταση"
                }
              ]
            },
            "description": "Τα `tableAA` που έχουν ακόμη ανοιχτά δελτία."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "5.4 Ανοιχτά δελτία του τραπεζιού",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/GetOpenOrdersForTable?TableId={{tableId}}&VatNumber={{issuerVat}}&Branch=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "GetOpenOrdersForTable"
              ],
              "query": [
                {
                  "key": "TableId",
                  "value": "{{tableId}}",
                  "description": "Το τραπέζι του 5.1"
                },
                {
                  "key": "VatNumber",
                  "value": "{{issuerVat}}",
                  "description": "ΑΦΜ"
                },
                {
                  "key": "Branch",
                  "value": "0",
                  "description": "Εγκατάσταση"
                }
              ]
            },
            "description": "Τα δελτία του τραπεζιού, με την ποσότητα και την αξία που απομένουν."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });"
                ]
              }
            }
          ]
        },
        {
          "name": "5.5 Κλείσιμο τραπεζιού (11.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Η απόδειξη που **κλείνει** όλα τα δελτία του τραπεζιού: τα MARK τους στο `multipleConnectedMarks`, `specialInvoiceCategory: 12`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\",\n        \"multipleConnectedMarks\": [\n          {{orderMark}},\n          {{partialMark}}\n        ],\n        \"specialInvoiceCategory\": 12\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 18.6\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0501\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 5,\n          \"totalNetPriceBeforeDiscount\": 5,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 5,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 1.2,\n          \"lineDescription\": \"ΤΖΑΤΖΙΚΙ\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_3\",\n              \"amount\": 5\n            }\n          ]\n        },\n        {\n          \"lineNumber\": 2,\n          \"lineCode\": \"#0605\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 10,\n          \"totalNetPriceBeforeDiscount\": 10,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 10,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 2.4,\n          \"lineDescription\": \"ΦΕΤΑ\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_3\",\n              \"amount\": 10\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 15,\n        \"totalVatAmount\": 3.6,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 18.6,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_3\",\n            \"amount\": 15\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 7,\n          \"paymentMethodInvoiceLabel\": \"Μετρητά\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "5.6 Νέα παραγγελία σε άλλο τραπέζι",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Δεύτερο τραπέζι (μεταβλητή `tableId2`), για να δοκιμάσετε την ολική ακύρωση.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.6\",\n        \"currency\": \"EUR\",\n        \"tableAA\": \"{{tableId2}}\"\n      },\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0131\",\n          \"itemDescr\": \"Χωριάτικη\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 2,\n          \"vatCategoryPercent\": 13,\n          \"vatAmount\": 13,\n          \"lineDescription\": \"Χωριάτικη\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 100\n            }\n          ]\n        },\n        {\n          \"lineNumber\": 2,\n          \"lineCode\": \"#0501\",\n          \"itemDescr\": \"ΤΖΑΤΖΙΚΙ\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 5,\n          \"totalNetPriceBeforeDiscount\": 5,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 5,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 1.2,\n          \"lineDescription\": \"ΤΖΑΤΖΙΚΙ\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 5\n            }\n          ]\n        },\n        {\n          \"lineNumber\": 3,\n          \"lineCode\": \"#0605\",\n          \"itemDescr\": \"ΦΕΤΑ\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 10,\n          \"totalNetPriceBeforeDiscount\": 10,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 10,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 2.4,\n          \"lineDescription\": \"ΦΕΤΑ\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 10\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 115,\n        \"totalVatAmount\": 16.6,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 131.6,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 115\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"ΔΕΛΤΙΟ ΠΑΡΑΓΓΕΛΙΑΣ\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 7,\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "// Νέο τραπέζι: ένα GUID που κρατάτε μέχρι να κλείσει το τραπέζι",
                  "pm.collectionVariables.set('tableId2', pm.variables.replaceIn('{{$guid}}'));"
                ]
              }
            },
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('order2Mark', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "5.7 Ολική ακύρωση παραγγελίας",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "8.6 με `totalCancelDeliveryOrders: true` και τα δελτία που ακυρώνονται στο `multipleConnectedMarks`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"8.6\",\n        \"currency\": \"EUR\",\n        \"multipleConnectedMarks\": [\n          {{order2Mark}}\n        ],\n        \"tableAA\": \"{{tableId2}}\",\n        \"totalCancelDeliveryOrders\": true\n      },\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"#0\",\n          \"itemDescr\": \"ΚΑΘΟΛΙΚΗ ΑΚΥΡΩΣΗ\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 0,\n          \"totalNetPriceBeforeDiscount\": 0,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 0,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"lineDescription\": \"ΚΑΘΟΛΙΚΗ ΑΚΥΡΩΣΗ\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 0,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 0\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"ΔΕΛΤΙΟ ΠΑΡΑΓΓΕΛΙΑΣ - ΚΑΘΟΛΙΚΗ ΑΚΥΡΩΣΗ\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 7,\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "6. Διακίνηση",
      "description": "Τιμολόγιο που είναι και δελτίο αποστολής, σκέτο δελτίο αποστολής, κλείσιμο και ακύρωση δελτίου.",
      "item": [
        {
          "name": "6.1 Τιμολόγιο - Δελτίο Αποστολής (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Τιμολόγιο με `isDeliveryNote: true` και τα στοιχεία διακίνησης.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\",\n        \"isDeliveryNote\": true,\n        \"otherDeliveryNoteHeader\": {\n          \"loadingAddress\": {\n            \"street\": \"Οδός Αποθήκης\",\n            \"number\": \"5\",\n            \"postalCode\": \"19300\",\n            \"city\": \"Ασπρόπυργος\"\n          },\n          \"deliveryAddress\": {\n            \"street\": \"Οδός Πελάτη\",\n            \"number\": \"10\",\n            \"postalCode\": \"15772\",\n            \"city\": \"Ζωγράφου\"\n          },\n          \"startShippingBranch\": 0,\n          \"completeShippingBranch\": 0\n        }\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"itemDescr\": \"Αντικατάσταση Λέβητα\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης - Δελτίο Αποστολής_Διακίνηση Αγαθών\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\",\n          \"dispatchPlaceFrom\": \"Οδός Αποθήκης 5, 19300 Ασπρόπυργος\",\n          \"dispatchPlaceTo\": \"Οδός Πελάτη 10, 15772 Ζωγράφου\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "6.2 Απόδειξη - Δελτίο Αποστολής (11.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Απόδειξη λιανικής που είναι και δελτίο αποστολής.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\",\n        \"isDeliveryNote\": true,\n        \"otherDeliveryNoteHeader\": {\n          \"loadingAddress\": {\n            \"street\": \"Οδός Αποθήκης\",\n            \"number\": \"5\",\n            \"postalCode\": \"19300\",\n            \"city\": \"Ασπρόπυργος\"\n          },\n          \"deliveryAddress\": {\n            \"street\": \"Οδός Πελάτη\",\n            \"number\": \"10\",\n            \"postalCode\": \"15772\",\n            \"city\": \"Ζωγράφου\"\n          },\n          \"startShippingBranch\": 0,\n          \"completeShippingBranch\": 0\n        }\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"itemDescr\": \"Αντικατάσταση Λέβητα\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη λιανικής - Δελτίο Αποστολής\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "6.3 Δελτίο Αποστολής (9.3)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Σκέτο δελτίο αποστολής. Το MARK κρατιέται στη μεταβλητή `deliveryNoteMark`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"9.3\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"18:33:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"otherDeliveryNoteHeader\": {\n          \"loadingAddress\": {\n            \"street\": \"Οδός Αποθήκης\",\n            \"number\": \"5\",\n            \"postalCode\": \"19300\",\n            \"city\": \"Ασπρόπυργος\"\n          },\n          \"deliveryAddress\": {\n            \"street\": \"Οδός Πελάτη\",\n            \"number\": \"10\",\n            \"postalCode\": \"15772\",\n            \"city\": \"Ζωγράφου\"\n          },\n          \"startShippingBranch\": 0,\n          \"completeShippingBranch\": 0\n        },\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"itemDescr\": \"Είδος δοκιμής\",\n          \"lineCode\": \"#0001\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"LT\",\n          \"lineUnitPrice\": 0,\n          \"totalNetPriceBeforeDiscount\": 0,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 0,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"lineDescription\": \"Είδος δοκιμής\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category3\",\n              \"amount\": 0\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 0,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 0,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category3\",\n            \"amount\": 0\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Δελτίο Αποστολής_Διακίνηση Αγαθών\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\",\n          \"dispatchPlaceFrom\": \"Οδός Αποθήκης 5, 19300 Ασπρόπυργος\",\n          \"dispatchPlaceTo\": \"Οδός Πελάτη 10, 15772 Ζωγράφου\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('deliveryNoteMark', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "6.4 Τιμολόγιο που κλείνει το δελτίο (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Το τιμολόγιο αναφέρει το δελτίο του 6.3 στο `multipleConnectedMarks`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"multipleConnectedMarks\": [\n          {{deliveryNoteMark}}\n        ]\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης - Δελτίο Αποστολής\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "6.5 Δελτίο για ακύρωση (9.3)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Ένα ακόμη δελτίο, που θα ακυρωθεί στο 6.6.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"987654324\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"9.3\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"18:33:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"otherDeliveryNoteHeader\": {\n          \"loadingAddress\": {\n            \"street\": \"Οδός Αποθήκης\",\n            \"number\": \"5\",\n            \"postalCode\": \"19300\",\n            \"city\": \"Ασπρόπυργος\"\n          },\n          \"deliveryAddress\": {\n            \"street\": \"Οδός Πελάτη\",\n            \"number\": \"10\",\n            \"postalCode\": \"15772\",\n            \"city\": \"Ζωγράφου\"\n          },\n          \"startShippingBranch\": 0,\n          \"completeShippingBranch\": 0\n        },\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"itemDescr\": \"Είδος δοκιμής\",\n          \"lineCode\": \"#0001\",\n          \"quantity\": 1,\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"LT\",\n          \"lineUnitPrice\": 0,\n          \"totalNetPriceBeforeDiscount\": 0,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 0,\n          \"vatCategory\": 8,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"lineDescription\": \"Είδος δοκιμής\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category3\",\n              \"amount\": 0\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 0,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 0,\n        \"incomeClassification\": [\n          {\n            \"classificationCategory\": \"category3\",\n            \"amount\": 0\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Δελτίο Αποστολής_Διακίνηση Αγαθών\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\",\n          \"dispatchPlaceFrom\": \"Οδός Αποθήκης 5, 19300 Ασπρόπυργος\",\n          \"dispatchPlaceTo\": \"Οδός Πελάτη 10, 15772 Ζωγράφου\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));",
                  "",
                  "pm.collectionVariables.set('deliveryNoteToCancel', pm.collectionVariables.get('lastMark'));"
                ]
              }
            }
          ]
        },
        {
          "name": "6.6 Ακύρωση δελτίου (CancelDeliveryNote)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/CancelDeliveryNote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "CancelDeliveryNote"
              ]
            },
            "description": "Ακυρώνει το δελτίο του 6.5 χωρίς να εκδοθεί νέο. Η ακύρωση παίρνει δικό της MARK (`cancellationMark`).",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mark\": \"{{deliveryNoteToCancel}}\",\n  \"entityVatNumber\": \"{{issuerVat}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Ακυρώθηκε (cancellationMark)', function () {",
                  "    pm.expect(r.statusCode).to.equal('Success');",
                  "    pm.expect(r.cancellationMark).to.be.ok;",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "7. B2G (Δημόσιο)",
      "description": "Ηλεκτρονικά τιμολόγια προς φορείς του Δημοσίου (EN 16931).\n\nΧρειάζεται **ξεχωριστό δοκιμαστικό κλειδί B2G**: βάλτε το στη μεταβλητή `b2gApiKey`. Στις δοκιμές ο εκδότης είναι ο `177472438`, ο λήπτης ο `997875116` και η σειρά ο ΑΦΜ σας.",
      "item": [
        {
          "name": "7.1 Τιμολόγιο Πώλησης (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoicesB2G",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoicesB2G"
              ]
            },
            "description": "Με `providerB2gAdditionalInvoiceDetails` και CPV ανά γραμμή.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"177472438\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"997875116\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"{{issuerVat}}\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124.25\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        }\n      ],\n      \"taxesTotals\": [\n        {\n          \"taxType\": 3,\n          \"taxCategory\": 4,\n          \"underlyingValue\": 1,\n          \"taxAmount\": 0.25,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"ksenodoxeio 4.00\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0.25,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124.25,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      },\n      \"providerB2gAdditionalInvoiceDetails\": {\n        \"contractReference\": \"26SYMV000000001\",\n        \"buyerReference\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"buyerLegalRegistrationIdentifier\": \"123412312\",\n        \"credits\": [\n          {\n            \"accountIdentifier\": \"GR00 0000 0000 0000 0000 0000 000\",\n            \"accountName\": \"TEST ISSUER ΙΚΕ\",\n            \"serviceProviderIdentifier\": \"BANKGRAA\"\n          }\n        ],\n        \"partyName\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"dueDate\": \"2026-10-24\",\n        \"budget\": {\n          \"type\": 1,\n          \"identifier\": \"123412312\"\n        },\n        \"buyerIdentifiers\": [\n          {\n            \"buyerIdentifier\": \"1007.909.0001\"\n          }\n        ],\n        \"deliveryDetails\": {\n          \"street\": \"Οδός Φορέα 1\",\n          \"city\": \"Αθήνα\",\n          \"postalCode\": \"10431\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "7.2 Τιμολόγιο με απαλλαγή ΦΠΑ (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoicesB2G",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoicesB2G"
              ]
            },
            "description": "Γραμμή με απαλλαγή ΦΠΑ.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"177472438\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"997875116\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"{{issuerVat}}\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 112\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 50,\n          \"totalNetPriceBeforeDiscount\": 50,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 50,\n          \"vatCategory\": 7,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"vatExemptionCategory\": 6,\n          \"vatExemptionCategoryLabel\": \"Χωρίς ΦΠΑ - άρθρο 24 του Κώδικα ΦΠΑ\",\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 50\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        },\n        {\n          \"lineNumber\": 2,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 50,\n          \"totalNetPriceBeforeDiscount\": 50,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 50,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 12,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 50\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 12,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 112,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      },\n      \"providerB2gAdditionalInvoiceDetails\": {\n        \"contractReference\": \"26SYMV000000001\",\n        \"buyerReference\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"buyerLegalRegistrationIdentifier\": \"123412312\",\n        \"credits\": [\n          {\n            \"accountIdentifier\": \"GR00 0000 0000 0000 0000 0000 000\",\n            \"accountName\": \"TEST ISSUER ΙΚΕ\",\n            \"serviceProviderIdentifier\": \"BANKGRAA\"\n          }\n        ],\n        \"partyName\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"dueDate\": \"2026-10-24\",\n        \"budget\": {\n          \"type\": 1,\n          \"identifier\": \"123412312\"\n        },\n        \"buyerIdentifiers\": [\n          {\n            \"buyerIdentifier\": \"1007.909.0001\"\n          }\n        ],\n        \"deliveryDetails\": {\n          \"street\": \"Οδός Φορέα 1\",\n          \"city\": \"Αθήνα\",\n          \"postalCode\": \"10431\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "7.3 Τιμολόγιο καυσίμων (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoicesB2G",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoicesB2G"
              ]
            },
            "description": "Καύσιμα προς φορέα.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"177472438\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"997875116\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"{{issuerVat}}\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\",\n        \"fuelInvoice\": true\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124.25\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"fuelCode\": 40,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        }\n      ],\n      \"taxesTotals\": [\n        {\n          \"taxType\": 3,\n          \"taxCategory\": 4,\n          \"underlyingValue\": 1,\n          \"taxAmount\": 0.25,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"ksenodoxeio 4.00\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0.25,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124.25,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      },\n      \"providerB2gAdditionalInvoiceDetails\": {\n        \"contractReference\": \"26SYMV000000001\",\n        \"buyerReference\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"buyerLegalRegistrationIdentifier\": \"123412312\",\n        \"credits\": [\n          {\n            \"accountIdentifier\": \"GR00 0000 0000 0000 0000 0000 000\",\n            \"accountName\": \"TEST ISSUER ΙΚΕ\",\n            \"serviceProviderIdentifier\": \"BANKGRAA\"\n          }\n        ],\n        \"partyName\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"dueDate\": \"2026-10-24\",\n        \"budget\": {\n          \"type\": 1,\n          \"identifier\": \"123412312\"\n        },\n        \"buyerIdentifiers\": [\n          {\n            \"buyerIdentifier\": \"1007.909.0001\"\n          }\n        ],\n        \"deliveryDetails\": {\n          \"street\": \"Οδός Φορέα 1\",\n          \"city\": \"Αθήνα\",\n          \"postalCode\": \"10431\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "7.4 Τιμολόγιο - Δελτίο Αποστολής (1.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoicesB2G",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoicesB2G"
              ]
            },
            "description": "Τιμολόγιο που είναι και δελτίο αποστολής.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"177472438\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"997875116\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"{{issuerVat}}\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"1.1\",\n        \"currency\": \"EUR\",\n        \"dispatchDate\": \"{{today}}\",\n        \"dispatchTime\": \"10:00:00\",\n        \"vehicleNumber\": \"ABC-1234\",\n        \"movePurpose\": 1,\n        \"movePurposeLabel\": \"Πώληση\",\n        \"isDeliveryNote\": true,\n        \"otherDeliveryNoteHeader\": {\n          \"loadingAddress\": {\n            \"street\": \"Οδός Αποθήκης\",\n            \"number\": \"5\",\n            \"postalCode\": \"19300\",\n            \"city\": \"Ασπρόπυργος\"\n          },\n          \"deliveryAddress\": {\n            \"street\": \"Οδός Πελάτη\",\n            \"number\": \"10\",\n            \"postalCode\": \"15772\",\n            \"city\": \"Ζωγράφου\"\n          },\n          \"startShippingBranch\": 0,\n          \"completeShippingBranch\": 0\n        }\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124.25\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"itemDescr\": \"Αντικατάσταση Λέβητα\",\n          \"measurementUnit\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        }\n      ],\n      \"taxesTotals\": [\n        {\n          \"taxType\": 3,\n          \"taxCategory\": 4,\n          \"underlyingValue\": 1,\n          \"taxAmount\": 0.25,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"ksenodoxeio 4.00\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0.25,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124.25,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\",\n          \"dispatchPlaceFrom\": \"Οδός Αποθήκης 5, 19300 Ασπρόπυργος\",\n          \"dispatchPlaceTo\": \"Οδός Πελάτη 10, 15772 Ζωγράφου\"\n        }\n      },\n      \"providerB2gAdditionalInvoiceDetails\": {\n        \"contractReference\": \"26SYMV000000001\",\n        \"buyerReference\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"buyerLegalRegistrationIdentifier\": \"123412312\",\n        \"credits\": [\n          {\n            \"accountIdentifier\": \"GR00 0000 0000 0000 0000 0000 000\",\n            \"accountName\": \"TEST ISSUER ΙΚΕ\",\n            \"serviceProviderIdentifier\": \"BANKGRAA\"\n          }\n        ],\n        \"partyName\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"dueDate\": \"2026-10-24\",\n        \"budget\": {\n          \"type\": 1,\n          \"identifier\": \"123412312\"\n        },\n        \"buyerIdentifiers\": [\n          {\n            \"buyerIdentifier\": \"1007.909.0001\"\n          }\n        ],\n        \"deliveryDetails\": {\n          \"street\": \"Οδός Φορέα 1\",\n          \"city\": \"Αθήνα\",\n          \"postalCode\": \"10431\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "7.5 Τιμολόγιο Παροχής (2.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoicesB2G",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoicesB2G"
              ]
            },
            "description": "Παροχή υπηρεσιών προς φορέα.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"177472438\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"997875116\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"{{issuerVat}}\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"2.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124.25\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_3\",\n              \"amount\": 100\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        }\n      ],\n      \"taxesTotals\": [\n        {\n          \"taxType\": 3,\n          \"taxCategory\": 4,\n          \"underlyingValue\": 1,\n          \"taxAmount\": 0.25,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"ksenodoxeio 4.00\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0.25,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124.25,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_3\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      },\n      \"providerB2gAdditionalInvoiceDetails\": {\n        \"contractReference\": \"26SYMV000000001\",\n        \"buyerReference\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"buyerLegalRegistrationIdentifier\": \"123412312\",\n        \"credits\": [\n          {\n            \"accountIdentifier\": \"GR00 0000 0000 0000 0000 0000 000\",\n            \"accountName\": \"TEST ISSUER ΙΚΕ\",\n            \"serviceProviderIdentifier\": \"BANKGRAA\"\n          }\n        ],\n        \"partyName\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"dueDate\": \"2026-10-24\",\n        \"budget\": {\n          \"type\": 1,\n          \"identifier\": \"123412312\"\n        },\n        \"buyerIdentifiers\": [\n          {\n            \"buyerIdentifier\": \"1007.909.0001\"\n          }\n        ],\n        \"deliveryDetails\": {\n          \"street\": \"Οδός Φορέα 1\",\n          \"city\": \"Αθήνα\",\n          \"postalCode\": \"10431\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "7.6 Πιστωτικό (5.2)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoicesB2G",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoicesB2G"
              ]
            },
            "description": "Σε πιστωτικό το `contractReference` και το `budget.identifier` (τύποι 1, 3) μένουν κενά.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"177472438\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"counterpart\": {\n        \"vatNumber\": \"997875116\",\n        \"country\": \"GR\",\n        \"branch\": 0,\n        \"address\": {\n          \"street\": \"Οδός Πελάτη\",\n          \"number\": \"10\",\n          \"postalCode\": \"15772\",\n          \"city\": \"Ζωγράφου\"\n        }\n      },\n      \"invoiceHeader\": {\n        \"series\": \"{{issuerVat}}\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"5.2\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 5,\n          \"amount\": 124.25\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"QuantityUnitsUblCode\": \"EA\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_001\",\n              \"classificationCategory\": \"category1_3\",\n              \"amount\": 100\n            }\n          ],\n          \"itemClassificationIdentifiers\": [\n            {\n              \"classificationIdentifier\": \"15555100-4\",\n              \"classificationIdentifierScheme\": \"STI\",\n              \"classificationIdentifierSchemeVersion\": \"2008\"\n            }\n          ],\n          \"itemCodification\": \"ΓΙΑ.ΠΡ.ΠΑΡ.ΠΗΛ.950ΓΡ.\"\n        }\n      ],\n      \"taxesTotals\": [\n        {\n          \"taxType\": 3,\n          \"taxCategory\": 4,\n          \"underlyingValue\": 1,\n          \"taxAmount\": 0.25,\n          \"reducesPayable\": false,\n          \"taxTypeLabel\": \"ksenodoxeio 4.00\"\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0.25,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124.25,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_001\",\n            \"classificationCategory\": \"category1_3\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"counterpart\": {\n          \"code\": \"C-0001\",\n          \"name\": \"TEST CLIENT ΑΕ\",\n          \"profession\": \"Χονδρικό εμπόριο\",\n          \"taxoffice\": \"Ζωγράφου\",\n          \"addressStreet\": \"Οδός Πελάτη\",\n          \"addressNumber\": \"10\",\n          \"addressPostalCode\": \"15772\",\n          \"addressCity\": \"Ζωγράφου\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000001\",\n          \"email\": \"client@example.com\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Τιμολόγιο Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      },\n      \"providerB2gAdditionalInvoiceDetails\": {\n        \"contractReference\": \"\",\n        \"buyerReference\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"buyerLegalRegistrationIdentifier\": \"123412312\",\n        \"credits\": [\n          {\n            \"accountIdentifier\": \"GR00 0000 0000 0000 0000 0000 000\",\n            \"accountName\": \"TEST ISSUER ΙΚΕ\",\n            \"serviceProviderIdentifier\": \"BANKGRAA\"\n          }\n        ],\n        \"partyName\": \"ΔΟΚΙΜΑΣΤΙΚΟΣ ΦΟΡΕΑΣ\",\n        \"dueDate\": \"2026-10-24\",\n        \"budget\": {\n          \"type\": 1,\n          \"identifier\": \"\"\n        },\n        \"buyerIdentifiers\": [\n          {\n            \"buyerIdentifier\": \"1007.909.0001\"\n          }\n        ],\n        \"deliveryDetails\": {\n          \"street\": \"Οδός Φορέα 1\",\n          \"city\": \"Αθήνα\",\n          \"postalCode\": \"10431\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        }
      ],
      "auth": {
        "type": "apikey",
        "apikey": [
          {
            "key": "key",
            "value": "API-KEY",
            "type": "string"
          },
          {
            "key": "value",
            "value": "{{b2gApiKey}}",
            "type": "string"
          },
          {
            "key": "in",
            "value": "header",
            "type": "string"
          }
        ]
      }
    },
    {
      "name": "8. OSS",
      "description": "Πωλήσεις σε καταναλωτές άλλων κρατών μελών της ΕΕ.",
      "item": [
        {
          "name": "8.1 Απόδειξη λιανικής OSS (11.1)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Με τον ΦΠΑ της χώρας του αγοραστή.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 1,\n          \"amount\": 119\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 100,\n          \"totalNetPriceBeforeDiscount\": 100,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 100,\n          \"vatCategory\": 7,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"vatExemptionCategory\": 30,\n          \"vatExemptionCategoryLabel\": \"Χωρίς ΦΠΑ – άρθρο 57(πρώην 47γ)του Κώδικα ΦΠΑ (OSS_ενωσιακό καθεστώς\",\n          \"lineDescription\": \"ΠΩΛΗΣΗ ΕΜΠΟΡΕΥΜΑΤΟΣ\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_007\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        },\n        {\n          \"lineNumber\": 2,\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 19,\n          \"totalNetPriceBeforeDiscount\": 19,\n          \"totalDiscountValue\": 0,\n          \"netValue\": 19,\n          \"vatCategory\": 7,\n          \"vatCategoryPercent\": 0,\n          \"vatAmount\": 0,\n          \"vatExemptionCategory\": 30,\n          \"vatExemptionCategoryLabel\": \"Χωρίς ΦΠΑ – άρθρο 57(πρώην 47γ)του Κώδικα ΦΠΑ (OSS_ενωσιακό καθεστώς\",\n          \"lineDescription\": \"ΦΠΑ ΕΜΠΟΡΕΥΜΑΤΟΣ\",\n          \"incomeClassification\": [\n            {\n              \"classificationCategory\": \"category1_95\",\n              \"amount\": 19\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 119,\n        \"totalVatAmount\": 0,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 119,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_007\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          },\n          {\n            \"classificationCategory\": \"category1_95\",\n            \"amount\": 19\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης - OSS\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 0,\n          \"paymentMethodInvoiceLabel\": \"Κατάθεση στην τράπεζα\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "9. Σενάρια σφαλμάτων (για δοκιμή του χειρισμού σας)",
      "description": "Σκόπιμα λανθασμένες κλήσεις, για να δείτε πώς απαντά το API και να δοκιμάσετε τον δικό σας κώδικα. Τα ελέγχουμε και στην πιστοποίηση.",
      "item": [
        {
          "name": "401 — χωρίς API key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Χωρίς το header `API-KEY` το API απαντά `401`.",
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 1,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('401 Unauthorized', function () { pm.response.to.have.status(401); });"
                ]
              }
            }
          ]
        },
        {
          "name": "400 — πληρωμές ≠ σύνολο",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Το άθροισμα των `paymentMethods` δεν ισούται με το `totalGrossValue`.\n\nΟ Πάροχος απορρίπτει με **HTTP 400** και `{ \"errors\": [...] }`. Δεν στάλθηκε τίποτα στην ΑΑΔΕ, δεν χρεώθηκε τίποτα.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 100\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 1,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('400 από τον Πάροχο', function () { pm.response.to.have.status(400); });",
                  "pm.test('Εξηγεί το λάθος', function () {",
                  "    pm.expect(pm.response.json().errors).to.be.an('array').that.is.not.empty;",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "228 — (α) μια απόδειξη κανονικά",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Εκδίδει μια απόδειξη. Το επόμενο αίτημα στέλνει **την ίδια** ξανά.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{aa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 1,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = (pm.response.json().response || [])[0] || {};",
                  "pm.test('Εκδόθηκε (statusCode Success ή Offline)', function () {",
                  "    pm.expect(r.statusCode).to.be.oneOf(['Success', 'Offline']);",
                  "});",
                  "",
                  "// Κρατάμε τα στοιχεία του τελευταίου παραστατικού για τα επόμενα βήματα",
                  "if (r.invoiceMark) { pm.collectionVariables.set('lastMark', String(r.invoiceMark)); }",
                  "if (r.invoiceUid) { pm.collectionVariables.set('lastUid', r.invoiceUid); }",
                  "if (r.authenticationCode) { pm.collectionVariables.set('lastAuthCode', r.authenticationCode); }",
                  "pm.collectionVariables.set('lastAa', pm.collectionVariables.get('aa'));"
                ]
              }
            }
          ]
        },
        {
          "name": "228 — (β) η ίδια απόδειξη ξανά",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/v1/Provider/SendInvoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "Provider",
                "SendInvoices"
              ]
            },
            "description": "Ίδια σειρά, ΑΑ, ημερομηνία και τύπος με το (α).\n\nΗ ΑΑΔΕ απαντά `ValidationError` με σφάλμα **228**, και το μήνυμα περιέχει το MARK του αρχικού. Η εφαρμογή σας πρέπει να το αναγνωρίζει ως «ήδη εκδομένο» και όχι ως αποτυχία.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice\": [\n    {\n      \"issuer\": {\n        \"vatNumber\": \"{{issuerVat}}\",\n        \"country\": \"GR\",\n        \"branch\": 0\n      },\n      \"invoiceHeader\": {\n        \"series\": \"A\",\n        \"aa\": \"{{lastAa}}\",\n        \"issueDate\": \"{{today}}\",\n        \"invoiceType\": \"11.1\",\n        \"currency\": \"EUR\"\n      },\n      \"paymentMethods\": [\n        {\n          \"type\": 3,\n          \"amount\": 124\n        }\n      ],\n      \"invoiceDetails\": [\n        {\n          \"lineNumber\": 1,\n          \"lineCode\": \"655-000023\",\n          \"quantity\": 1,\n          \"measurementUnitLabel\": \"ΤΜΧ\",\n          \"lineUnitPrice\": 120,\n          \"totalNetPriceBeforeDiscount\": 120,\n          \"totalDiscountValue\": 20,\n          \"netValue\": 100,\n          \"vatCategory\": 1,\n          \"vatCategoryPercent\": 24,\n          \"vatAmount\": 24,\n          \"lineDescription\": \"Αντικατάσταση Λέβητα\",\n          \"incomeClassification\": [\n            {\n              \"classificationType\": \"E3_561_003\",\n              \"classificationCategory\": \"category1_1\",\n              \"amount\": 100\n            }\n          ]\n        }\n      ],\n      \"invoiceSummary\": {\n        \"totalNetValue\": 100,\n        \"totalVatAmount\": 24,\n        \"totalWithheldAmount\": 0,\n        \"totalFeesAmount\": 0,\n        \"totalStampDutyAmount\": 0,\n        \"totalOtherTaxesAmount\": 0,\n        \"totalDeductionsAmount\": 0,\n        \"totalGrossValue\": 124,\n        \"incomeClassification\": [\n          {\n            \"classificationType\": \"E3_561_003\",\n            \"classificationCategory\": \"category1_1\",\n            \"amount\": 100\n          }\n        ]\n      },\n      \"providerAdditionalInvoiceDetails\": {\n        \"issuer\": {\n          \"name\": \"TEST ISSUER ΙΚΕ\",\n          \"profession\": \"Εμπόριο ειδών θέρμανσης\",\n          \"taxoffice\": \"Α' Αθηνών\",\n          \"addressStreet\": \"Οδός Δοκιμής\",\n          \"addressNumber\": \"1\",\n          \"addressPostalCode\": \"10431\",\n          \"addressCity\": \"Αθήνα\",\n          \"addressCountry\": \"Ελλάδα\",\n          \"phone\": \"2100000000\",\n          \"email\": \"info@example.com\",\n          \"webSite\": \"www.example.com\",\n          \"registryNumber\": \"ΓΕΜΗ: 000000000000\",\n          \"emtyLine2\": \"IBAN: GR00 0000 0000 0000 0000 0000 000\"\n        },\n        \"additionalDetails\": {\n          \"documentLabel\": \"Απόδειξη Λιανικής Πώλησης\",\n          \"documentLanguageCode\": \"EL\",\n          \"documentSizeCode\": 1,\n          \"documentComments\": \"Εξόφληση εντός 30 ημερών.\",\n          \"paymentMethodInvoiceLabel\": \"Επί πιστώσει\"\n        }\n      }\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('HTTP 200', function () { pm.response.to.have.status(200); });",
                  "",
                  "const r = pm.response.json().response[0];",
                  "pm.test('Απορρίφθηκε ως διπλότυπο (228)', function () {",
                  "    pm.expect(r.statusCode).to.equal('ValidationError');",
                  "    pm.expect(JSON.stringify(r.errors)).to.include('228');",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}