{
  "info": {
    "_postman_id": "8f2d31c0-3c58-4b7f-9d51-poliergaleio1",
    "name": "PoliErgaleio Public Calculation API",
    "description": "Cyprus income tax, state pension, retirement stress test and unemployment benefit engines.\n\nThe direct Supabase URL (https://gpkpjfdlbsuyevfdsnbq.supabase.co/functions/v1/public-api) is the official endpoint — no proxy setup needed.\n\nSet `apiKey` from https://poliergaleio.com/profile. Leave it blank to use the anonymous tier (stateless calculators only).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://gpkpjfdlbsuyevfdsnbq.supabase.co/functions/v1/public-api",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string"
    },
    {
      "key": "guestId",
      "value": "postman-demo",
      "type": "string"
    },
    {
      "key": "calculationId",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Discovery",
      "item": [
        {
          "name": "Verify my API key (whoami)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/whoami",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "whoami"
              ]
            },
            "description": "Confirms whether the key is valid, which tier applies, current usage and which tools you can call."
          }
        },
        {
          "name": "List tools",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools"
              ]
            },
            "description": "MCP-style tool descriptors."
          }
        },
        {
          "name": "All JSON Schemas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/schemas",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "schemas"
              ]
            },
            "description": "JSON Schema 2020-12 descriptors for every tool. Cacheable via ETag."
          }
        },
        {
          "name": "One tool schema",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/schemas/calculate_cyprus_income_tax",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "schemas",
                "calculate_cyprus_income_tax"
              ]
            },
            "description": "Schema for a single tool, including example request/response."
          }
        }
      ]
    },
    {
      "name": "Calculators",
      "item": [
        {
          "name": "calculate_cyprus_income_tax",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/calculate_cyprus_income_tax",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "calculate_cyprus_income_tax"
              ]
            },
            "description": "Computes Cyprus personal income tax, GESY (National Health System) contributions, social insurance, and net (take-home) salary.\n\nWhen to use: Use whenever you need an accurate Cyprus net salary or effective tax rate for a resident employee. Supports salary, rental, and dividend income with 2025/2026 legislation.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"salaryIncome\": 45000,\n  \"legislationVersion\": \"2026\",\n  \"employmentType\": \"private\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "calculate_cyprus_state_pension",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/calculate_cyprus_state_pension",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "calculate_cyprus_state_pension"
              ]
            },
            "description": "Estimates the Cyprus state (contributory) pension amount at retirement based on accumulated insurance units and contribution history.\n\nWhen to use: Use for retirement planning questions about the statutory Cyprus state pension floor.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"mode\": \"quick\",\n  \"currentAge\": 45,\n  \"retirementAge\": 65,\n  \"yearsWorked\": 22,\n  \"totalInsuranceUnits\": 132,\n  \"dependents\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "run_retirement_stress_test",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/run_retirement_stress_test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "run_retirement_stress_test"
              ]
            },
            "description": "Runs a deterministic projection plus Monte Carlo simulation of a retirement savings plan to estimate the probability of not running out of money.\n\nWhen to use: Use for 'will my savings last' or portfolio-longevity questions. Supports optional pension income, spending smile, and medical shock modelling.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"currentAge\": 40,\n  \"retirementAge\": 65,\n  \"endAge\": 90,\n  \"currentSavings\": 80000,\n  \"monthlyContribution\": 500,\n  \"expectedAnnualReturn\": 6,\n  \"expectedAnnualReturnRetirement\": 4,\n  \"monthlyDrawdown\": 2000,\n  \"inflationRate\": 2.5,\n  \"statePension\": 900\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "calculate_cyprus_unemployment_benefit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/calculate_cyprus_unemployment_benefit",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "calculate_cyprus_unemployment_benefit"
              ]
            },
            "description": "Calculates Cyprus unemployment benefit entitlement (weekly/monthly amount and duration) from recent insurable earnings and household circumstances.\n\nWhen to use: Use for redundancy or job-loss income support questions in Cyprus.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"applicationDate\": \"2026-01-15\",\n  \"annualGrossEarnings\": 32240,\n  \"dependentSpouse\": true,\n  \"dependentChildren\": 2\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "get_pension_reference_data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/get_pension_reference_data",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "get_pension_reference_data"
              ]
            },
            "description": "Returns official Cyprus Social Insurance reference tables for a given year.\n\nWhen to use: Use to ground pension/retirement calculations in the correct year's statutory figures, or to answer factual lookup questions.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"year\": 2026\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "parse_pension_statement",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/parse_pension_statement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "parse_pension_statement"
              ]
            },
            "description": "Extracts structured contribution history from pasted Cyprus Social Insurance Services pension statement text.\n\nWhen to use: Use to bootstrap calculate_cyprus_state_pension inputs from a real statement instead of manual entry.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"text\": \"Year 2020 units 4.5\\nYear 2021 units 5.2\\n\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Saved calculations",
      "item": [
        {
          "name": "list_saved_calculations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/saved-calculations?types=income-tax,state-pension&sort=recent&limit=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "saved-calculations"
              ],
              "query": [
                {
                  "key": "types",
                  "value": "income-tax,state-pension"
                },
                {
                  "key": "sort",
                  "value": "recent"
                },
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            },
            "description": "Requires an API key. Filter by type, sort, and page with cursor or offset."
          }
        },
        {
          "name": "load_saved_calculation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "x-api-key",
                "value": "{{apiKey}}",
                "description": "Omit for the anonymous tier (10/min, 50/day, 200/week)."
              },
              {
                "key": "x-guest-id",
                "value": "{{guestId}}",
                "description": "Optional opaque id so anonymous callers behind one IP are metered separately."
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/tools/load_saved_calculation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "tools",
                "load_saved_calculation"
              ]
            },
            "description": "Loads one saved calculation belonging to the authenticated API key's user.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"calculationId\": \"{{calculationId}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}
