{
  "info": {
    "name": "AE Compliance Middleware",
    "description": "Health check, validate, and submit endpoints for the UAE PINT-AE e-invoicing compliance middleware. See docs/INTEGRATION_GUIDE.md for full request/response details.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "http://localhost:8000",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "your-api-key-here",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Health Check",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/healthz",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "healthz"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Validate Invoice",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{api_key}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"source_reference\": \"INV-2026-0001\",\n  \"payload\": {\n    \"invoiceNumber\": \"INV-2026-0001\",\n    \"issue_date\": \"2026-07-10\",\n    \"invoice_type_code\": \"380\",\n    \"currency\": \"AED\",\n    \"tax_currency\": \"AED\",\n    \"specification_identifier\": \"urn:peppol:pint:billing-1@ae-1\",\n    \"purchase_order\": \"PO-2026-4471\",\n    \"business_process_type\": \"P1\",\n    \"transaction_type_code\": \"00000000\",\n    \"seller_name\": \"Acme Trading LLC\",\n    \"seller_trn\": \"100000000000003\",\n    \"supplier_peppol_id\": \"0235:1000000000\",\n    \"supplier_scheme\": \"0235\",\n    \"supplier_street\": \"1 Sheikh Zayed Road\",\n    \"supplier_city\": \"Dubai\",\n    \"supplier_emirate\": \"DXB\",\n    \"supplier_country\": \"AE\",\n    \"supplier_trade_license\": \"DED-123456\",\n    \"supplier_legal_registration_identifier_type\": \"TL\",\n    \"supplier_tax_scheme\": \"VAT\",\n    \"buyer_name\": \"Beta Retail FZE\",\n    \"buyer_trn\": \"100000000100102\",\n    \"buyer_peppol_id\": \"0235:1000000001\",\n    \"buyer_scheme\": \"0235\",\n    \"buyer_street\": \"2 Al Maktoum Road\",\n    \"buyer_city\": \"Abu Dhabi\",\n    \"buyer_emirate\": \"AUH\",\n    \"buyer_country\": \"AE\",\n    \"buyer_legal_registration_identifier\": \"DED-654321\",\n    \"buyer_legal_registration_identifier_type\": \"TL\",\n    \"buyer_tax_scheme\": \"VAT\",\n    \"payment_method\": \"30\",\n    \"terms\": \"Net 30\",\n    \"due_date\": \"2026-08-09\",\n    \"tax_date\": \"2026-07-10\",\n    \"amount_due\": \"1050.00\",\n    \"taxable_amount\": \"1000.00\",\n    \"vat_breakdown_amount\": \"50.00\",\n    \"vat_category_summary\": \"S\",\n    \"vat_summary_rate\": \"5.00\",\n    \"lines\": [\n      {\n        \"line_id\": \"1\",\n        \"item_name\": \"Consulting services\",\n        \"quantity\": \"1\",\n        \"unit_code\": \"C62\",\n        \"unit_price\": \"1000.00\",\n        \"base_quantity\": \"1\",\n        \"gross_price\": \"1000.00\",\n        \"net_amount\": \"1000.00\",\n        \"vat_category\": \"S\",\n        \"vat_rate\": \"5.00\",\n        \"vat_amount\": \"50.00\",\n        \"gross_amount\": \"1050.00\",\n        \"vat_amount_aed\": \"50.00\",\n        \"line_amount_aed\": \"1050.00\"\n      }\n    ],\n    \"subtotal\": \"1000.00\",\n    \"vat_total\": \"50.00\",\n    \"grand_total\": \"1050.00\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/api/v1/compliance/validate",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "compliance",
            "validate"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Submit Invoice",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{api_key}}",
            "type": "text"
          },
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"source_reference\": \"INV-2026-0001\",\n  \"payload\": {\n    \"invoiceNumber\": \"INV-2026-0001\",\n    \"issue_date\": \"2026-07-10\",\n    \"invoice_type_code\": \"380\",\n    \"currency\": \"AED\",\n    \"tax_currency\": \"AED\",\n    \"specification_identifier\": \"urn:peppol:pint:billing-1@ae-1\",\n    \"purchase_order\": \"PO-2026-4471\",\n    \"business_process_type\": \"P1\",\n    \"transaction_type_code\": \"00000000\",\n    \"seller_name\": \"Acme Trading LLC\",\n    \"seller_trn\": \"100000000000003\",\n    \"supplier_peppol_id\": \"0235:1000000000\",\n    \"supplier_scheme\": \"0235\",\n    \"supplier_street\": \"1 Sheikh Zayed Road\",\n    \"supplier_city\": \"Dubai\",\n    \"supplier_emirate\": \"DXB\",\n    \"supplier_country\": \"AE\",\n    \"supplier_trade_license\": \"DED-123456\",\n    \"supplier_legal_registration_identifier_type\": \"TL\",\n    \"supplier_tax_scheme\": \"VAT\",\n    \"buyer_name\": \"Beta Retail FZE\",\n    \"buyer_trn\": \"100000000100102\",\n    \"buyer_peppol_id\": \"0235:1000000001\",\n    \"buyer_scheme\": \"0235\",\n    \"buyer_street\": \"2 Al Maktoum Road\",\n    \"buyer_city\": \"Abu Dhabi\",\n    \"buyer_emirate\": \"AUH\",\n    \"buyer_country\": \"AE\",\n    \"buyer_legal_registration_identifier\": \"DED-654321\",\n    \"buyer_legal_registration_identifier_type\": \"TL\",\n    \"buyer_tax_scheme\": \"VAT\",\n    \"payment_method\": \"30\",\n    \"terms\": \"Net 30\",\n    \"due_date\": \"2026-08-09\",\n    \"tax_date\": \"2026-07-10\",\n    \"amount_due\": \"1050.00\",\n    \"taxable_amount\": \"1000.00\",\n    \"vat_breakdown_amount\": \"50.00\",\n    \"vat_category_summary\": \"S\",\n    \"vat_summary_rate\": \"5.00\",\n    \"lines\": [\n      {\n        \"line_id\": \"1\",\n        \"item_name\": \"Consulting services\",\n        \"quantity\": \"1\",\n        \"unit_code\": \"C62\",\n        \"unit_price\": \"1000.00\",\n        \"base_quantity\": \"1\",\n        \"gross_price\": \"1000.00\",\n        \"net_amount\": \"1000.00\",\n        \"vat_category\": \"S\",\n        \"vat_rate\": \"5.00\",\n        \"vat_amount\": \"50.00\",\n        \"gross_amount\": \"1050.00\",\n        \"vat_amount_aed\": \"50.00\",\n        \"line_amount_aed\": \"1050.00\"\n      }\n    ],\n    \"subtotal\": \"1000.00\",\n    \"vat_total\": \"50.00\",\n    \"grand_total\": \"1050.00\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{base_url}}/api/v1/compliance/submit",
          "host": [
            "{{base_url}}"
          ],
          "path": [
            "api",
            "v1",
            "compliance",
            "submit"
          ]
        }
      },
      "response": []
    }
  ]
}
