{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://planeir.ie/agents/application.schema.json",
  "title": "Planeir workspace information",
  "description": "Fields for the Planeir demo request form. This schema does not grant permission or provide an assistant submission endpoint.",
  "type": "object",
  "additionalProperties": false,
  "required": [],
  "properties": {
    "topics": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "retirement",
          "mortgage",
          "buying",
          "education",
          "loans",
          "savings",
          "whole",
          "other"
        ]
      },
      "description": "What the person wants help with. \"retirement\" = Retirement and pensions, \"mortgage\" = My mortgage, \"buying\" = Buying a home, \"education\" = Children’s education, \"loans\" = Loans and credit cards, \"savings\" = Savings and a rainy day fund, \"whole\" = The whole picture, \"other\" = Something else."
    },
    "question": {
      "type": "string",
      "maxLength": 2000,
      "description": "What do you want to understand. For example: how would overpaying the mortgage compare with increasing pension contributions?. Text, up to 2000 characters. Never published.",
      "minLength": 1
    },
    "upcoming": {
      "type": "string",
      "maxLength": 600,
      "description": "Is anything coming up, and when. For example: our fixed rate ends in March. Text, up to 600 characters. Never published."
    },
    "goodOutcome": {
      "type": "string",
      "maxLength": 1000,
      "description": "What would a good outcome look like. For example: work less from 60 and feel confident we have enough. Text, up to 1000 characters. Never published."
    },
    "worries": {
      "type": "string",
      "maxLength": 1000,
      "description": "What worries you most. Optional. Describe what is on your mind. Text, up to 1000 characters. Never published."
    },
    "household": {
      "type": "object",
      "additionalProperties": false,
      "description": "Ages and household.",
      "properties": {
        "age": {
          "type": "integer",
          "minimum": 18,
          "maximum": 100,
          "description": "Your age. A whole number from 18 to 100."
        },
        "partner": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "description": "Are you planning with a partner. One of: \"yes\" (Yes), \"no\" (No)."
        },
        "partnerAge": {
          "type": "integer",
          "minimum": 16,
          "maximum": 100,
          "description": "Your partner’s age. A whole number from 16 to 100. Read when household.partner is \"yes\"."
        },
        "married": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "description": "Are you married or in a civil partnership. It changes how you are taxed. One of: \"yes\" (Yes), \"no\" (No). Read when household.partner is \"yes\"."
        },
        "children": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "description": "Do you have children. One of: \"yes\" (Yes), \"no\" (No)."
        }
      }
    },
    "children": {
      "type": "array",
      "maxItems": 8,
      "description": "One entry per child. Read when household.children is \"yes\".",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "age": {
            "type": "integer",
            "minimum": 0,
            "maximum": 30,
            "description": "Age. A whole number from 0 to 30."
          },
          "collegePlan": {
            "type": "string",
            "enum": [
              "away",
              "home",
              "unsure"
            ],
            "description": "College plans. One of: \"away\" (Away from home), \"home\" (From home), \"unsure\" (Not sure yet). Read when topics include \"education\" or \"whole\"."
          },
          "saved": {
            "type": "number",
            "minimum": 0,
            "description": "Saved for them so far. A number in euro, like 35000. Read when topics include \"education\" or \"whole\"."
          }
        }
      }
    },
    "income": {
      "type": "object",
      "additionalProperties": false,
      "description": "Pay before tax, type of work, and household take-home pay.",
      "properties": {
        "gross": {
          "type": "number",
          "minimum": 0,
          "description": "Your pay a year. After tax means the amount reaching your bank after personal pension deductions. A number in euro a year, like 35000."
        },
        "basis": {
          "type": "string",
          "enum": [
            "gross",
            "net"
          ],
          "default": "gross",
          "description": "Unit or tax basis for income.gross: \"gross\" = Before tax, \"net\" = After tax."
        },
        "partnerGross": {
          "type": "number",
          "minimum": 0,
          "description": "Your partner’s pay a year. After tax means the amount reaching their bank after personal pension deductions. A number in euro a year, like 35000. Read when household.partner is \"yes\"."
        },
        "partnerBasis": {
          "type": "string",
          "enum": [
            "gross",
            "net"
          ],
          "default": "gross",
          "description": "Unit or tax basis for income.partnerGross: \"gross\" = Before tax, \"net\" = After tax."
        },
        "work": {
          "type": "string",
          "enum": [
            "employee",
            "self_employed",
            "director",
            "not_working",
            "retired"
          ],
          "description": "Your work. One of: \"employee\" (Employee), \"self_employed\" (Self-employed), \"director\" (Company director), \"not_working\" (Not working), \"retired\" (Retired)."
        },
        "partnerWork": {
          "type": "string",
          "enum": [
            "employee",
            "self_employed",
            "director",
            "not_working",
            "retired"
          ],
          "description": "Your partner’s work. One of: \"employee\" (Employee), \"self_employed\" (Self-employed), \"director\" (Company director), \"not_working\" (Not working), \"retired\" (Retired). Read when household.partner is \"yes\"."
        },
        "sector": {
          "type": "string",
          "enum": [
            "public",
            "private"
          ],
          "description": "Your sector. One of: \"public\" (Public sector), \"private\" (Private sector). Read when income.work is \"employee\"."
        },
        "partnerSector": {
          "type": "string",
          "enum": [
            "public",
            "private"
          ],
          "description": "Your partner’s sector. One of: \"public\" (Public sector), \"private\" (Private sector). Read when household.partner is \"yes\" and income.partnerWork is \"employee\"."
        }
      }
    },
    "spending": {
      "type": "object",
      "additionalProperties": false,
      "description": "Whether the household saves most months, and monthly spending.",
      "properties": {
        "pattern": {
          "type": "string",
          "enum": [
            "save",
            "even",
            "more"
          ],
          "description": "Most months, do you. One of: \"save\" (Save some), \"even\" (Break even), \"more\" (Spend more than you earn)."
        },
        "saved": {
          "type": "number",
          "minimum": 0,
          "description": "Roughly how much you save a month. A number in euro a month, like 35000. Read when spending.pattern is not \"even\" or \"more\"."
        },
        "spend": {
          "type": "number",
          "minimum": 0,
          "description": "What you spend a month, not counting rent or mortgage. A recent bank statement helps. A number in euro a month, like 35000."
        }
      }
    },
    "home": {
      "type": "object",
      "additionalProperties": false,
      "description": "The housing situation.",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "mortgage",
            "owned",
            "rent",
            "family"
          ],
          "description": "Your home. One of: \"mortgage\" (Own with a mortgage), \"owned\" (Own outright), \"rent\" (Rent), \"family\" (Live with family)."
        },
        "value": {
          "type": "number",
          "minimum": 0,
          "description": "What it would sell for today. A number in euro, like 35000. Read when home.status is \"mortgage\" or \"owned\"."
        },
        "rent": {
          "type": "number",
          "minimum": 0,
          "description": "Rent a month. A number in euro a month, like 35000. Read when home.status is \"rent\"."
        }
      }
    },
    "mortgage": {
      "type": "object",
      "additionalProperties": false,
      "description": "The mortgage on the home. Read when home.status is \"mortgage\".",
      "properties": {
        "balance": {
          "type": "number",
          "minimum": 0,
          "description": "Balance left. A number in euro, like 35000. Read when home.status is \"mortgage\"."
        },
        "rate": {
          "type": "number",
          "minimum": 0,
          "maximum": 30,
          "description": "Interest rate. A percentage as a number, like 4.2 (up to 30). Read when home.status is \"mortgage\"."
        },
        "rateType": {
          "type": "string",
          "enum": [
            "tracker",
            "variable",
            "fixed"
          ],
          "description": "Rate type. One of: \"tracker\" (Tracker), \"variable\" (Variable), \"fixed\" (Fixed). Read when home.status is \"mortgage\"."
        },
        "fixedEnds": {
          "type": "string",
          "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
          "description": "When the fixed rate ends. Year and month, like 2027-03. Read when mortgage.rateType is \"fixed\"."
        },
        "trackerMargin": {
          "type": "number",
          "minimum": 0,
          "maximum": 10,
          "description": "Margin above the ECB rate. A percentage as a number, like 4.2 (up to 10). Read when mortgage.rateType is \"tracker\"."
        },
        "yearsLeft": {
          "type": "number",
          "minimum": 0,
          "maximum": 40,
          "description": "Years left. Not the original term. A number of years, like 22 or 22.5. Read when home.status is \"mortgage\"."
        },
        "repayment": {
          "type": "number",
          "minimum": 0,
          "description": "Repayment a month. A number in euro a month, like 35000. Read when home.status is \"mortgage\"."
        },
        "overpaying": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "description": "Are you overpaying now. One of: \"yes\" (Yes), \"no\" (No). Read when home.status is \"mortgage\"."
        },
        "overpayment": {
          "type": "number",
          "minimum": 0,
          "description": "Overpayment a month. A number in euro a month, like 35000. Read when mortgage.overpaying is \"yes\"."
        },
        "lender": {
          "type": "string",
          "maxLength": 60,
          "description": "Lender. Optional; its name is not needed for the comparison."
        }
      }
    },
    "buying": {
      "type": "object",
      "additionalProperties": false,
      "description": "For someone planning to buy a home.",
      "properties": {
        "price": {
          "type": "number",
          "minimum": 0,
          "description": "Price you are looking at. A number in euro, like 35000."
        },
        "firstTime": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "description": "First-time buyer. One of: \"yes\" (Yes), \"no\" (No)."
        },
        "deposit": {
          "type": "number",
          "minimum": 0,
          "description": "Deposit saved so far. A number in euro, like 35000."
        },
        "approval": {
          "type": "number",
          "minimum": 0,
          "description": "Approval in principle, if you have one. A number in euro, like 35000."
        },
        "scheme": {
          "type": "string",
          "enum": [
            "yes",
            "no",
            "unsure"
          ],
          "description": "Using Help to Buy or the First Home scheme. One of: \"yes\" (Yes), \"no\" (No), \"unsure\" (Not sure)."
        },
        "when": {
          "type": "string",
          "enum": [
            "6m",
            "12m",
            "24m",
            "later"
          ],
          "description": "When would you like to buy. One of: \"6m\" (Within 6 months), \"12m\" (6 to 12 months), \"24m\" (1 to 2 years), \"later\" (Later)."
        }
      }
    },
    "savings": {
      "type": "object",
      "additionalProperties": false,
      "description": "Cash, investments and shares in an employer.",
      "properties": {
        "cash": {
          "type": "number",
          "minimum": 0,
          "description": "Cash in the bank, all accounts. A number in euro, like 35000."
        },
        "investments": {
          "type": "number",
          "minimum": 0,
          "description": "Investments and shares. A number in euro, like 35000."
        },
        "employerShares": {
          "type": "number",
          "minimum": 0,
          "description": "Shares in your employer. A number in euro, like 35000."
        }
      }
    },
    "properties": {
      "type": "array",
      "maxItems": 4,
      "description": "Property owned apart from the home, one entry each. If there are none, put \"properties\" in the \"none\" list instead.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "number",
            "minimum": 0,
            "description": "Value. A number in euro, like 35000."
          },
          "mortgage": {
            "type": "number",
            "minimum": 0,
            "description": "Mortgage on it. A number in euro, like 35000."
          },
          "rent": {
            "type": "number",
            "minimum": 0,
            "description": "Rent a year. A number in euro a year, like 35000."
          },
          "costs": {
            "type": "number",
            "minimum": 0,
            "description": "Costs a year, not counting mortgage interest. A number in euro a year, like 35000."
          },
          "rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 30,
            "description": "Mortgage interest rate. A percentage as a number, like 4.2 (up to 30)."
          }
        }
      }
    },
    "pensions": {
      "type": "array",
      "maxItems": 6,
      "description": "One entry per pension, for the person or their partner. If there are none, put \"pensions\" in the \"none\" list instead.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "owner": {
            "type": "string",
            "enum": [
              "you",
              "partner"
            ],
            "description": "Whose pension. One of: \"you\" (Yours), \"partner\" (Your partner’s). Read when household.partner is \"yes\" (otherwise the pension is the applicant's)."
          },
          "type": {
            "type": "string",
            "enum": [
              "company",
              "public",
              "prsa",
              "personal",
              "bond",
              "unsure"
            ],
            "description": "Type. One of: \"company\" (Company pension), \"public\" (Public service or defined benefit), \"prsa\" (PRSA), \"personal\" (Personal pension), \"bond\" (Buy-out bond from an old job), \"unsure\" (Not sure)."
          },
          "value": {
            "type": "number",
            "minimum": 0,
            "description": "Value today. A number in euro, like 35000. Read when type is not \"public\"."
          },
          "youPay": {
            "type": "number",
            "minimum": 0,
            "description": "Personal contribution. A number: a percentage of salary like 5, or euro a month with youPayUnit set to \"eur\". Read when type is \"company\", \"prsa\", \"personal\" or \"unsure\"."
          },
          "youPayUnit": {
            "type": "string",
            "enum": [
              "pct",
              "eur"
            ],
            "default": "pct",
            "description": "Unit or tax basis for youPay: \"pct\" = % of salary, \"eur\" = € a month."
          },
          "employerPays": {
            "type": "number",
            "minimum": 0,
            "description": "Employer contribution. A number: a percentage of salary like 5, or euro a month with employerPaysUnit set to \"eur\". Read when type is \"company\", \"prsa\" or \"unsure\"."
          },
          "employerPaysUnit": {
            "type": "string",
            "enum": [
              "pct",
              "eur"
            ],
            "default": "pct",
            "description": "Unit or tax basis for employerPays: \"pct\" = % of salary, \"eur\" = € a month."
          },
          "contributing": {
            "type": "string",
            "enum": [
              "yes",
              "no"
            ],
            "description": "Still paying in. One of: \"yes\" (Yes), \"no\" (No). Read when type is \"company\", \"prsa\", \"personal\" or \"unsure\"."
          },
          "dbPension": {
            "type": "number",
            "minimum": 0,
            "description": "Expected pension a year. Your benefit statement shows this. A number in euro a year, like 35000. Read when type is \"public\"."
          },
          "dbLumpSum": {
            "type": "number",
            "minimum": 0,
            "description": "Expected lump sum. A number in euro, like 35000. Read when type is \"public\"."
          },
          "dbAge": {
            "type": "integer",
            "minimum": 50,
            "maximum": 75,
            "description": "From what age. A whole number from 50 to 75. Read when type is \"public\"."
          }
        }
      }
    },
    "planning": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "taxStatus": {
          "type": "string",
          "enum": [
            "single",
            "widowed_or_surviving_civil_partner",
            "separated"
          ],
          "description": "Are you single, widowed or separated. One of: \"single\" (Single), \"widowed_or_surviving_civil_partner\" (Widowed or surviving civil partner), \"separated\" (Separated). Read when household.partner is \"no\"."
        },
        "savingSeparate": {
          "type": "string",
          "enum": [
            "yes",
            "no"
          ],
          "description": "Does your spending figure exclude transfers to savings. One of: \"yes\" (Yes), \"no\" (No)."
        }
      }
    },
    "retirement": {
      "type": "object",
      "additionalProperties": false,
      "description": "Retirement ages and the income wanted.",
      "properties": {
        "age": {
          "type": "integer",
          "minimum": 40,
          "maximum": 80,
          "description": "Age you would like to stop working. A whole number from 40 to 80."
        },
        "partnerAge": {
          "type": "integer",
          "minimum": 40,
          "maximum": 80,
          "description": "Age your partner would like to stop working. A whole number from 40 to 80. Read when household.partner is \"yes\"."
        },
        "income": {
          "type": "number",
          "minimum": 0,
          "description": "Income you would like a year in retirement, in today’s money. For the household, in today’s money. The pension and tax engines convert the selected basis. A number in euro a year, like 35000."
        },
        "incomeBasis": {
          "type": "string",
          "enum": [
            "gross",
            "net"
          ],
          "default": "gross",
          "description": "Unit or tax basis for retirement.income: \"gross\" = Before tax, \"net\" = After tax."
        },
        "statePension": {
          "type": "string",
          "enum": [
            "yes",
            "partly",
            "none",
            "unsure"
          ],
          "description": "Your State Pension. Full uses the central maximum rate; None uses no State Pension. These are disclosed illustration inputs, not confirmation of entitlement. One of: \"yes\" (Full), \"partly\" (Partial), \"none\" (None), \"unsure\" (Not sure)."
        },
        "prsiYearsWorked": {
          "type": "number",
          "minimum": 0,
          "maximum": 60,
          "description": "Your years paying PRSI in Ireland so far. Count years paying PRSI in Ireland as an employee or self-employed, full-time or part-time. Part-time years count in full: an employee week earning €38 or more is a full contribution; a self-employed year with €5,000 or more of income is a full year. A number of years, like 22 or 22.5. Read when retirement.statePension is partial or not sure."
        },
        "prsiYearsCaring": {
          "type": "number",
          "minimum": 0,
          "maximum": 60,
          "description": "Your years at home caring. Optional. Years at home caring for a child under 12 or someone who needed care. HomeCaring can count up to 20 years; overlapping work and care cannot be counted twice. A number of years, like 22 or 22.5. Read when retirement.statePension is partial or not sure."
        },
        "prsiFutureWork": {
          "type": "string",
          "enum": [
            "ireland",
            "abroad",
            "not_working"
          ],
          "description": "Until you stop working, will you mostly be…. Years abroad are not counted in this Irish estimate. EU and UK years can combine for eligibility, but each country pays its own share. One of: \"ireland\" (Mostly working in Ireland), \"abroad\" (Mostly working abroad), \"not_working\" (Mostly not working). Read when retirement.statePension is partial or not sure."
        },
        "partnerStatePension": {
          "type": "string",
          "enum": [
            "yes",
            "partly",
            "none",
            "unsure"
          ],
          "description": "Your partner’s State Pension. One of: \"yes\" (Full), \"partly\" (Partial), \"none\" (None), \"unsure\" (Not sure). Read when household.partner is \"yes\"."
        },
        "partnerPrsiYearsWorked": {
          "type": "number",
          "minimum": 0,
          "maximum": 60,
          "description": "Your partner’s years paying PRSI in Ireland so far. Count years paying PRSI in Ireland as an employee or self-employed, full-time or part-time. Part-time years count in full: an employee week earning €38 or more is a full contribution; a self-employed year with €5,000 or more of income is a full year. A number of years, like 22 or 22.5. Read when partner present and retirement.partnerStatePension is partial or not sure."
        },
        "partnerPrsiYearsCaring": {
          "type": "number",
          "minimum": 0,
          "maximum": 60,
          "description": "Your partner’s years at home caring. Optional. Years at home caring for a child under 12 or someone who needed care. HomeCaring can count up to 20 years; overlapping work and care cannot be counted twice. A number of years, like 22 or 22.5. Read when partner present and retirement.partnerStatePension is partial or not sure."
        },
        "partnerPrsiFutureWork": {
          "type": "string",
          "enum": [
            "ireland",
            "abroad",
            "not_working"
          ],
          "description": "Until your partner stops working, will your partner mostly be…. Years abroad are not counted in this Irish estimate. EU and UK years can combine for eligibility, but each country pays its own share. One of: \"ireland\" (Mostly working in Ireland), \"abroad\" (Mostly working abroad), \"not_working\" (Mostly not working). Read when partner present and retirement.partnerStatePension is partial or not sure."
        }
      }
    },
    "creditCard": {
      "type": "object",
      "additionalProperties": false,
      "description": "How the credit card is used.",
      "properties": {
        "clears": {
          "type": "string",
          "enum": [
            "yes",
            "no",
            "none"
          ],
          "description": "Do you clear your credit card in full each month. One of: \"yes\" (Yes), \"no\" (No), \"none\" (No credit card)."
        },
        "balance": {
          "type": "number",
          "minimum": 0,
          "description": "Credit card balance. A number in euro, like 35000. Read when creditCard.clears is \"no\"."
        }
      }
    },
    "loans": {
      "type": "array",
      "maxItems": 6,
      "description": "One entry per loan. Not the home mortgage. If there are none, put \"loans\" in the \"none\" list instead.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "car",
              "personal",
              "credit_union",
              "student",
              "other"
            ],
            "description": "Type. One of: \"car\" (Car), \"personal\" (Personal), \"credit_union\" (Credit union), \"student\" (Student), \"other\" (Other)."
          },
          "balance": {
            "type": "number",
            "minimum": 0,
            "description": "Balance. A number in euro, like 35000."
          },
          "rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 60,
            "description": "Interest rate. A percentage as a number, like 4.2 (up to 60)."
          },
          "yearsLeft": {
            "type": "number",
            "minimum": 0,
            "maximum": 30,
            "description": "Years left. A number of years, like 22 or 22.5."
          },
          "payment": {
            "type": "number",
            "minimum": 0,
            "description": "Payment a month. A number in euro a month, like 35000."
          }
        }
      }
    },
    "cover": {
      "type": "object",
      "additionalProperties": false,
      "description": "Life cover and income protection.",
      "properties": {
        "life": {
          "type": "string",
          "enum": [
            "yes",
            "no",
            "unsure"
          ],
          "description": "Life cover. Including mortgage protection. One of: \"yes\" (Yes), \"no\" (No), \"unsure\" (Not sure)."
        },
        "incomeProtection": {
          "type": "string",
          "enum": [
            "yes",
            "no",
            "unsure"
          ],
          "description": "Income protection. One of: \"yes\" (Yes), \"no\" (No), \"unsure\" (Not sure)."
        }
      }
    },
    "anythingElse": {
      "type": "string",
      "maxLength": 2000,
      "description": "Anything else you want to add."
    },
    "unsure": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string"
      },
      "description": "Paths of figures the person said they do not know, left empty, like \"pensions.0.value\" or \"mortgage.yearsLeft\". Different from leaving a field out."
    },
    "none": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "properties",
          "pensions",
          "loans"
        ]
      },
      "description": "Sections the person confirmed do not apply: \"pensions\" (no pensions), \"loans\" (no loans), \"properties\" (no other property)."
    }
  }
}
