Ira Module - Response
The Data object for a response from the Ira module is defined below, in the
order the fields are returned:
| Object | Fields |
|---|---|
🟥 Data | 🔸BeginBalance, 🔸Deposit, 🔸DepositFreq, 🔸Rate, 🔸CurrentAge, 🔸RetireAge, 🔸Term, 🔸TermUnits, 🔸FV, 🔸Gain, 🔸Yield |
🟥 Errors[] | |
🟥 Warnings[] |
🟥 Data
| Type | Required |
|---|---|
| Object | yes |
Fields:
🔸BeginBalance,🔸Deposit,🔸DepositFreq,🔸Rate,🔸CurrentAge,🔸RetireAge,🔸Term,🔸TermUnits,🔸FV,🔸Gain,🔸YieldObjects:
🟥 Errors[],🟥 Warnings[]
🔸 Data.BeginBalance
| Type | Required | Values |
|---|---|---|
| String | yes | Currency |
The beginning balance is the amount which is currently present in the IRA account. Interest accrues on this initial amount (plus the periodic deposit amounts), much like interest accrues on the principal balance of a loan.
🔸 Data.Deposit
| Type | Required | Values |
|---|---|---|
| String | yes | Currency |
The Deposit field specifies the periodic deposit amount to be made to the IRA
account.
🔸 Data.DepositFreq
| Type | Required | Values |
|---|---|---|
| String | yes | Annual, Semiannual, Quarterly, Bimonthly, Monthly |
This field specifies the periodicity of the deposit amount.
🔸 Data.Rate
| Type | Required | Values |
|---|---|---|
| String | yes | Number in [-99.999...600] |
The rate at which interest will accrue during the term of the IRA.
🔸 Data.CurrentAge
| Type | Required | Values | Default |
|---|---|---|---|
| String | yes | Integer | n/a |
The current age of the IRA account owner.
🔸 Data.RetireAge
| Type | Required | Values | Default |
|---|---|---|---|
| String | yes | Integer | n/a |
The desired retirement age of the IRA account owner.
🔸 Data.Term
| Type | Required | Values |
|---|---|---|
| String | yes | Integer |
The term is the number of years during which periodic deposit amounts and accrued interest are applied to the IRA account. It is equal to the individual's retirement age less current age.
🔸 Data.TermUnits
| Type | Required | Values |
|---|---|---|
| String | yes | Years |
The Term field is always expressed as a number of years.
🔸 Data.FV
| Type | Required | Values |
|---|---|---|
| String | yes | Currency |
The future value of the IRA at retirement age.
🔸 Data.Gain
| Type | Required | Values |
|---|---|---|
| String | yes | Currency |
The gain is the difference between the future value and the sum of the initial balance and all periodic deposits made. It is the amount of interest accrued over the term of the IRA.
🔸 Data.Yield
| Type | Required | Values |
|---|---|---|
| String | yes | Number in [-99.999...600] |
The APY (annual percentage yield) is the rate of return on an investment over the term of a year. The APY takes compounding into account, and if the compounding frequency is other than annual, the APY will differ from the interest rate.
🟥 Data.Errors[]
| Type | Required |
|---|---|
| Array of String | yes |
The Errors[] field contains an array of Strings which describe any errors
encountered while handling the request. If the length of the Errors[] Array is
zero (0), then the module processed the request successfully, and the Data
object can be further processed by the calling application for the returned
data.
On the other hand, if the length of the Errors[] Array is greater than zero
(0), then this indicates that an error condition has been detected, and the
calling application should not process the respons Data object further. In
this case, the contents of the Errors[] array will describe the error(s)
encountered.
Typical errors include the omission of 🟥 required fields, invalid field values, etc.
🟥 Data.Warnings[]
| Type | Required |
|---|---|
| Array of String | yes |
The Warnings[] field contains an array of Strings which describe any warnings
generated by the module handling the request. The most common warnings returned
by modules inform the calling application that the module does not recognize a
specified field (which may help to isolate a field name spelling error in the
calling application's code). Note that field names which start with "//" will
bre treated as comment fields by the SCE, and no warnings will be generated
for these unrecognized fields.
Example - Request and response illustrating warnings when passing unrecognized fields:
{
"Module" : "Ira",
"Data" : {
"//" : "This is a comment.",
"Hello" : "Friend!",
"How" : "are you?"
}
}
{
"Result" : 200,
"Module" : "Ira",
"Data" : {
"Errors" : [
"Data.Deposit (StringFloat) not found.",
"Data.Rate (StringFloat) not found.",
"Data.CurrentAge (StringInt) not found.",
"Data.RetireAge (StringInt) not found."
],
"Warnings" : [
"Request field Data.Hello (String) not recognized.",
"Request field Data.How (String) not recognized."
]
}
}