Pension Calculator

POST retirementAnalysis [MEDIOR]


/pension/retirementanalysis

Description

This calculator provides users with pension predictions based on statistics like income, number of children, and others. Note that as laws are different in different countries, these statistics might differ as well.

Request

Request Body

Following are the parameters that should be in the body of the request:

 

Headers

No headers or authentication required for making the request for this mock API. In the real API, there is a database access token. If you feel like it, try implementing it into the example server with the endpoint that is linked above!

Example Request

An example request body for a customer:


{
  "dateOfBirth": "1990-01-01",
  "gender": 1,
  "professionType": 13,
  "income": {
    "net": {
      "monthly": 2000,
      "yearly": 0
    },
    "gross": {
      "monthly": 0,
      "yearly": 0
    }
  },
  "educationLevel": 1,
  "professionalDevelopment": 0,
  "socialInsuranceYears": 10,
  "desiredPensionNetMonthly": 3000,
  "desiredPensionAge": 65,
  "inflowFrequency": "monthly",
  "children": [
    {
      "dateOfBirth": "2020-01-01",
      "educationStatus": 0,
      "maternityLeave": 1,
      "childRaising": 0
    }
  ]
}

Response

Example

An example body of the response for the example request


{
  "currentIncome": {
    "net": {
      "monthly": 2000,
      "yearly": 28308.5
    },
    "gross": {
      "monthly": 2739.33,
      "yearly": 38350.62
    }
  },
  "lastIncome": {
    "net": {
      "monthly": 2551,
      "yearly": 36461
    },
    "gross": {
      "monthly": 3729,
      "yearly": 52208
    }
  },
  "desiredPension": {
    "net": {
      "monthly": 3000,
      "yearly": 43323.17
    },
    "gross": {
      "monthly": 4083.79,
      "yearly": 57173.2
    }
  },
  "gap": {
    "net": {
      "monthly": 1055.13,
      "yearly": 16175.71
    },
    "gross": {
      "monthly": 1863.92,
      "yearly": 26306.56
    }
  },
  "pensionCompulsory": {
    "benefitNet": {
      "monthly": 1836,
      "yearly": 25841
    },
    "benefitGross": {
      "monthly": 2111,
      "yearly": 29560
    },
    "socialInsuranceMonths": 120,
    "socialInsuranceYears": 10,
    "socialInsuranceYearsRange": {
      "minimum": 20,
      "maximum": 0
    },
    "socialInsuranceMonthsRange": {
      "minimum": 240,
      "maximum": 0
    }
  },
  "pensionComplementary": {
    "benefitNet": {
      "monthly": 108.87,
      "yearly": 1306.46
    },
    "benefitGross": {
      "monthly": 108.87,
      "yearly": 1306.46
    },
    "outflowEndAge": 0,
    "interestRate": 0.1,
    "interestRateRange": {
      "minimum": 0.1,
      "maximum": 0
    },
    "outflowEndAgeRange": {
      "minimum": 96,
      "maximum": 66
    },
    "effectiveInterestRate": null,
    "outflowInterestRate": null
  },
  "pensionSum": {
    "benefitNet": {
      "monthly": 1944.87,
      "yearly": 27147.46
    },
    "benefitGross": {
      "monthly": 2219.87,
      "yearly": 30866.46
    }
  },
  "retirement": {
    "officialRegularAge": 65,
    "officialRegularAgeMonths": 0,
    "officialEarlyAge": 64,
    "regularAge": 65,
    "regularAgeMonths": 0,
    "regularAgeRange": {
      "minimum": 90,
      "maximum": 64
    },
    "earlyAge": 64,
    "latestAge": 90,
    "dateOfPension": "2055-01-01",
    "dateOfPensionEarly": "2054-01-01",
    "yearsUntilRetirementRegularAge": 31,
    "yearsUntilRetirementEarlyAge": 30,
    "durationRegularAge": 15.3,
    "durationEarlyAge": 16.3
  },
}

Headers

No headers for this example request.

Example solutions of this API

No solutions yet. Be the first one to submit a solution and get featured!

Additional resources

  • An article explaining how pensions work in the EU.