| All Verbs | /calculator/optimalportfolio |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ClientId | query | int | No | |
| CurrentSavings | query | double | No | |
| LifeExpectancyAge | query | int | No | |
| ExpectedInflationRate | query | double | No | |
| WithdrawalAmount | query | double | No | |
| WithdrawalGrowthRate | query | double | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| PortfolioId | form | int | No | |
| AgeRunOutOfMoneyPessimistic | form | int | No | |
| ClosingBalancePessimistic | form | double | No | |
| PortfolioReturn | form | double | No | |
| PortfolioStandardDeviation | form | double | No | |
| PortfolioName | form | string | No | |
| PortfolioShortName | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /calculator/optimalportfolio HTTP/1.1
Host: api.portfoliolink.co.za
Accept: application/json
Content-Type: application/json
Content-Length: length
{"clientId":0,"currentSavings":0,"lifeExpectancyAge":0,"expectedInflationRate":0,"withdrawalAmount":0,"withdrawalGrowthRate":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"portfolioId":0,"ageRunOutOfMoneyPessimistic":0,"closingBalancePessimistic":0,"portfolioReturn":0,"portfolioStandardDeviation":0,"portfolioName":"String","portfolioShortName":"String"}