金子さん
金子さん · GPT アクション
APIs for Financial Planning💰 [WIP]
Easy pension estimations, income predictions, etc.
POST /income/predict給与・賞与の手取額から年収を推定給与振り込み口座などに記録された給与や賞与の振込金額の年間合計値から年金などの計算の基礎となる税込年収を推定
POST /income/simulate生涯収入のシミュレーション結果の取得現在の年収や将来の見込み年収などから生涯にわたる給与および賞与をシミュレートし、その結果を一覧として取得
POST /pension/calculate年金受給額の計算結果の取得給与・賞与の一覧から年金受給額を計算
POST /pension/simulate年金受給額のシミュレーション結果の取得現在の年収や将来の見込み年収などから生涯にわたる給与および賞与をシミュレートし、その結果を用いて年金受給額を計算
元の API スキーマ
{
"openapi": "3.0.2",
"info": {
"title": "APIs for Financial Planning\ud83d\udcb0 [WIP]",
"description": "Easy pension estimations, income predictions, etc.",
"version": "0.1.0"
},
"servers": [
{
"url": "https://unagiken.com/calc-pension",
"description": "This Server"
}
],
"paths": {
"/income/predict": {
"post": {
"tags": [
"\u53ce\u5165"
],
"summary": "\u7d66\u4e0e\u30fb\u8cde\u4e0e\u306e\u624b\u53d6\u984d\u304b\u3089\u5e74\u53ce\u3092\u63a8\u5b9a",
"description": "\u7d66\u4e0e\u632f\u308a\u8fbc\u307f\u53e3\u5ea7\u306a\u3069\u306b\u8a18\u9332\u3055\u308c\u305f\u7d66\u4e0e\u3084\u8cde\u4e0e\u306e\u632f\u8fbc\u91d1\u984d\u306e\u5e74\u9593\u5408\u8a08\u5024\u304b\u3089\u5e74\u91d1\u306a\u3069\u306e\u8a08\u7b97\u306e\u57fa\u790e\u3068\u306a\u308b\u7a0e\u8fbc\u5e74\u53ce\u3092\u63a8\u5b9a",
"operationId": "predict_income_income_predict_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PredictIncomeRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PredictIncomeResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/income/simulate": {
"post": {
"tags": [
"\u53ce\u5165"
],
"summary": "\u751f\u6daf\u53ce\u5165\u306e\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u7d50\u679c\u306e\u53d6\u5f97",
"description": "\u73fe\u5728\u306e\u5e74\u53ce\u3084\u5c06\u6765\u306e\u898b\u8fbc\u307f\u5e74\u53ce\u306a\u3069\u304b\u3089\u751f\u6daf\u306b\u308f\u305f\u308b\u7d66\u4e0e\u304a\u3088\u3073\u8cde\u4e0e\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u4e00\u89a7\u3068\u3057\u3066\u53d6\u5f97",
"operationId": "simulate_income_income_simulate_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SimulateLifetimeIncomeRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SimulateLifetimeIncomeResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/pension/calculate": {
"post": {
"tags": [
"\u5e74\u91d1"
],
"summary": "\u5e74\u91d1\u53d7\u7d66\u984d\u306e\u8a08\u7b97\u7d50\u679c\u306e\u53d6\u5f97",
"description": "\u7d66\u4e0e\u30fb\u8cde\u4e0e\u306e\u4e00\u89a7\u304b\u3089\u5e74\u91d1\u53d7\u7d66\u984d\u3092\u8a08\u7b97",
"operationId": "calculate_pension_pension_calculate_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CalculatePensionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CalculatePensionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/pension/simulate": {
"post": {
"tags": [
"\u5e74\u91d1"
],
"summary": "\u5e74\u91d1\u53d7\u7d66\u984d\u306e\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u7d50\u679c\u306e\u53d6\u5f97",
"description": "\u73fe\u5728\u306e\u5e74\u53ce\u3084\u5c06\u6765\u306e\u898b\u8fbc\u307f\u5e74\u53ce\u306a\u3069\u304b\u3089\u751f\u6daf\u306b\u308f\u305f\u308b\u7d66\u4e0e\u304a\u3088\u3073\u8cde\u4e0e\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u7528\u3044\u3066\u5e74\u91d1\u53d7\u7d66\u984d\u3092\u8a08\u7b97",
"operationId": "simulate_pension_pension_simulate_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SimulatePensionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SimulatePensionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"CalculatePensionRequest": {
"title": "CalculatePensionRequest",
"required": [
"salary",
"bonus"
],
"type": "object",
"properties": {
"salary": {
"title": "Lifetime salary",
"type": "array",
"items": {
"$ref": "#/components/schemas/Income"
},
"description": "\u751f\u6daf\u306b\u652f\u7d66\u3055\u308c\u308b\u7d66\u4e0e\u306e\u4e00\u89a7"
},
"bonus": {
"title": "Lifetime bonus",
"type": "array",
"items": {
"$ref": "#/components/schemas/Income"
},
"description": "\u751f\u6daf\u306b\u652f\u7d66\u3055\u308c\u308b\u8cde\u4e0e\u306e\u4e00\u89a7"
},
"basic_premium_period": {
"title": "Basic premium period",
"type": "integer",
"description": "\u8001\u9f62\u57fa\u790e\u5e74\u91d1\u306e\u4fdd\u967a\u6599\u652f\u6255\u6708\u6570"
}
}
},
"CalculatePensionResponse": {
"title": "CalculatePensionResponse",
"required": [
"basic_pension",
"employee_pension"
],
"type": "object",
"properties": {
"basic_pension": {
"title": "Basic pension",
"allOf": [
{
"$ref": "#/components/schemas/Pension"
}
],
"description": "\u8001\u9f62\u57fa\u790e\u5e74\u91d1"
},
"employee_pension": {
"title": "Employee pension",
"allOf": [
{
"$ref": "#/components/schemas/Pension"
}
],
"description": "\u8001\u9f62\u539a\u751f\u5e74\u91d1"
}
}
},
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"Income": {
"title": "Income",
"required": [
"amount",
"payday",
"fiscal_year",
"age",
"is_bonus"
],
"type": "object",
"properties": {
"amount": {
"title": "Amount",
"type": "integer",
"description": "\u7d66\u4e0e\u307e\u305f\u306f\u8cde\u4e0e\u306e\u652f\u7d66\u984d"
},
"payday": {
"title": "Payday",
"maxLength": 8,
"minLength": 8,
"type": "string",
"description": "yyyymmdd\u5f62\u5f0f\u3067\u8868\u73fe\u3057\u305f\u652f\u7d66\u65e5\u3002\u8a08\u7b97\u4fbf\u5b9c\u4e0a\u3059\u3079\u30661\u65e5\u306b\u8a2d\u5b9a",
"example": "20220701"
},
"fiscal_year": {
"title": "Fiscal year",
"type": "integer",
"description": "\u5e74\u5ea6\u3002\u5e74\u91d1\u5236\u5ea6\u3092\u8003\u616e\u3057\u4e00\u5f8b4\u6708\u59cb\u307e\u308a\u3067\u8a08\u7b97"
},
"age": {
"title": "Age",
"type": "integer",
"description": "\u652f\u7d66\u65e5\u306e\u5e74\u9f62"
},
"is_bonus": {
"title": "Is bonus",
"type": "boolean",
"description": "\u3053\u306e\u53ce\u5165\u304c\u8cde\u4e0e\u304b\u5426\u304b"
}
}
},
"Pension": {
"title": "Pension",
"required": [
"name",
"annual_amount",
"monthly_amount"
],
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"description": "\u5e74\u91d1\u306e\u540d\u79f0"
},
"annual_amount": {
"title": "Annual amount",
"type": "integer",
"description": "\u5e74\u9593\u53d7\u7d66\u984d"
},
"monthly_amount": {
"title": "Monthly amount",
"type": "integer",
"description": "1\u30f6\u6708\u3042\u305f\u308a\u306e\u53d7\u7d66\u984d"
}
}
},
"PredictIncomeRequest": {
"title": "PredictIncomeRequest",
"required": [
"net_income"
],
"type": "object",
"properties": {
"net_income": {
"title": "Annual net income",
"type": "integer",
"description": "\u7d66\u4e0e\u632f\u8fbc\u53e3\u5ea7\u7b49\u306b\u8a18\u9332\u3055\u308c\u305f\u7d66\u4e0e\u30fb\u8cde\u4e0e\u306e\u624b\u53d6\u308a\u306e\u5e74\u9593\u5408\u8a08\u91d1\u984d",
"example": "3987654"
}
}
},
"PredictIncomeResponse": {
"title": "PredictIncomeResponse",
"required": [
"gross_income"
],
"type": "object",
"properties": {
"gross_income": {
"title": "Annual gross income",
"type": "integer",
"description": "\u624b\u53d6\u308a\u984d\u304b\u3089\u63a8\u5b9a\u3055\u308c\u305f\u7a0e\u8fbc\u5e74\u53ce",
"example": "5000000"
}
}
},
"SimulateLifetimeIncomeRequest": {
"title": "SimulateLifetimeIncomeRequest",
"required": [
"current_annual_income"
],
"type": "object",
"properties": {
"birthday": {
"title": "Birthday",
"maxLength": 8,
"minLength": 8,
"type": "string",
"description": "yyyymmdd\u5f62\u5f0f\u3067\u8868\u73fe\u3057\u305f\u751f\u5e74\u6708\u65e5",
"default": "20000101",
"example": "19890718"
},
"current_annual_income": {
"title": "Current annual income",
"type": "integer",
"description": "\u4eca\u5e74\u306e\u898b\u8fbc\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"example": "5000000"
},
"current_annual_bonus": {
"title": "Current annual bonus",
"type": "integer",
"description": "\u4eca\u5e74\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u898b\u8fbc\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "1500000"
},
"initial_age": {
"title": "Initial age",
"type": "integer",
"description": "\u7d66\u4e0e\u6240\u5f97\u304c\u59cb\u307e\u3063\u305f\u5e74\u9f62",
"default": 22,
"example": "22"
},
"initial_annual_income": {
"title": "Initial annual income",
"type": "integer",
"description": "\u521d\u5e74\u5ea6\u306e\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "3000000"
},
"initial_annual_bonus": {
"title": "Initial annual bonus",
"type": "integer",
"description": "\u521d\u5e74\u5ea6\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "1500000"
},
"retire_age": {
"title": "Retire age",
"type": "integer",
"description": "\u9000\u8077\u3059\u308b\u5e74\u9f62",
"default": 60,
"example": "60"
},
"retire_annual_income": {
"title": "Retire annual income",
"type": "integer",
"description": "\u9000\u8077\u3059\u308b\u5e74\u306e\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "7000000"
},
"retire_annual_bonus": {
"title": "Retire annual bonus",
"type": "integer",
"description": "\u9000\u8077\u3059\u308b\u5e74\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "2000000"
},
"max_age": {
"title": "Max age",
"type": "integer",
"description": "\u5e74\u53ce\u304c\u6700\u9ad8\u984d\u306b\u9054\u3059\u308b\u5e74\u9f62\u3002\u305f\u3068\u3048\u307055\u6b73\u306b\u5f79\u8077\u5b9a\u5e74\u304c\u3042\u308b\u5834\u5408\u306a\u3069\u306b\u8a2d\u5b9a",
"default": 0,
"example": "55"
},
"max_annual_income": {
"title": "Max annual income",
"type": "integer",
"description": "\u6700\u9ad8\u984d\u306e\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "8000000"
},
"max_annual_bonus": {
"title": "Max annual income",
"type": "integer",
"description": "\u6700\u9ad8\u984d\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "8000000"
}
}
},
"SimulateLifetimeIncomeResponse": {
"title": "SimulateLifetimeIncomeResponse",
"required": [
"salary",
"bonus"
],
"type": "object",
"properties": {
"salary": {
"title": "Salary",
"type": "array",
"items": {
"$ref": "#/components/schemas/Income"
},
"description": "\u751f\u6daf\u306b\u652f\u7d66\u3055\u308c\u308b\u7d66\u4e0e\u306e\u4e00\u89a7"
},
"bonus": {
"title": "Bonus",
"type": "array",
"items": {
"$ref": "#/components/schemas/Income"
},
"description": "\u751f\u6daf\u306b\u652f\u7d66\u3055\u308c\u308b\u8cde\u4e0e\u306e\u4e00\u89a7"
}
}
},
"SimulatePensionRequest": {
"title": "SimulatePensionRequest",
"required": [
"current_annual_income"
],
"type": "object",
"properties": {
"birthday": {
"title": "Birthday",
"maxLength": 8,
"minLength": 8,
"type": "string",
"description": "yyyymmdd\u5f62\u5f0f\u3067\u8868\u73fe\u3057\u305f\u751f\u5e74\u6708\u65e5",
"default": "20000101",
"example": "19890718"
},
"current_annual_income": {
"title": "Current annual income",
"type": "integer",
"description": "\u4eca\u5e74\u306e\u898b\u8fbc\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"example": "5000000"
},
"current_annual_bonus": {
"title": "Current annual bonus",
"type": "integer",
"description": "\u4eca\u5e74\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u898b\u8fbc\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "1500000"
},
"initial_age": {
"title": "Initial age",
"type": "integer",
"description": "\u7d66\u4e0e\u6240\u5f97\u304c\u59cb\u307e\u3063\u305f\u5e74\u9f62",
"default": 22,
"example": "22"
},
"initial_annual_income": {
"title": "Initial annual income",
"type": "integer",
"description": "\u521d\u5e74\u5ea6\u306e\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "3000000"
},
"initial_annual_bonus": {
"title": "Initial annual bonus",
"type": "integer",
"description": "\u521d\u5e74\u5ea6\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "1500000"
},
"retire_age": {
"title": "Retire age",
"type": "integer",
"description": "\u9000\u8077\u3059\u308b\u5e74\u9f62",
"default": 60,
"example": "60"
},
"retire_annual_income": {
"title": "Retire annual income",
"type": "integer",
"description": "\u9000\u8077\u3059\u308b\u5e74\u306e\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "7000000"
},
"retire_annual_bonus": {
"title": "Retire annual bonus",
"type": "integer",
"description": "\u9000\u8077\u3059\u308b\u5e74\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "2000000"
},
"max_age": {
"title": "Max age",
"type": "integer",
"description": "\u5e74\u53ce\u304c\u6700\u9ad8\u984d\u306b\u9054\u3059\u308b\u5e74\u9f62\u3002\u305f\u3068\u3048\u307055\u6b73\u306b\u5f79\u8077\u5b9a\u5e74\u304c\u3042\u308b\u5834\u5408\u306a\u3069\u306b\u8a2d\u5b9a",
"default": 0,
"example": "55"
},
"max_annual_income": {
"title": "Max annual income",
"type": "integer",
"description": "\u6700\u9ad8\u984d\u306e\u5e74\u53ce\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "8000000"
},
"max_annual_bonus": {
"title": "Max annual income",
"type": "integer",
"description": "\u6700\u9ad8\u984d\u306e\u5e74\u53ce\u306e\u3046\u3061\u3001\u8cde\u4e0e\u306e\u91d1\u984d\u3002\u7a0e\u8fbc\u306e\u7dcf\u652f\u7d66\u984d",
"default": 0,
"example": "8000000"
},
"basic_premium_period": {
"title": "Basic premium period",
"type": "integer",
"description": "\u8001\u9f62\u57fa\u790e\u5e74\u91d1\u306e\u4fdd\u967a\u6599\u652f\u6255\u6708\u6570",
"example": 480
}
}
},
"SimulatePensionResponse": {
"title": "SimulatePensionResponse",
"required": [
"basic_pension",
"employee_pension"
],
"type": "object",
"properties": {
"basic_pension": {
"title": "Basic pension",
"allOf": [
{
"$ref": "#/components/schemas/Pension"
}
],
"description": "\u8001\u9f62\u57fa\u790e\u5e74\u91d1"
},
"employee_pension": {
"title": "Employee pension",
"allOf": [
{
"$ref": "#/components/schemas/Pension"
}
],
"description": "\u8001\u9f62\u539a\u751f\u5e74\u91d1"
}
}
},
"ValidationError": {
"title": "ValidationError",
"required": [
"loc",
"msg",
"type"
],
"type": "object",
"properties": {
"loc": {
"title": "Location",
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
}
}
}
}
}