Ira Module - Response

The Data object for a response from the Ira module is defined below, in the order the fields are returned:

🟥 Data

TypeRequired
Objectyes

Fields: 🔸BeginBalance, 🔸Deposit, 🔸DepositFreq, 🔸Rate, 🔸CurrentAge, 🔸RetireAge, 🔸Term, 🔸TermUnits, 🔸FV, 🔸Gain, 🔸Yield

Objects: 🟥 Errors[], 🟥 Warnings[]


🔸 Data.BeginBalance

TypeRequiredValues
StringyesCurrency

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

TypeRequiredValues
StringyesCurrency

The Deposit field specifies the periodic deposit amount to be made to the IRA account.

🔸 Data.DepositFreq

TypeRequiredValues
StringyesAnnual, Semiannual, Quarterly, Bimonthly, Monthly

This field specifies the periodicity of the deposit amount.

🔸 Data.Rate

TypeRequiredValues
StringyesNumber in [-99.999...600]

The rate at which interest will accrue during the term of the IRA.

🔸 Data.CurrentAge

TypeRequiredValuesDefault
StringyesIntegern/a

The current age of the IRA account owner.

🔸 Data.RetireAge

TypeRequiredValuesDefault
StringyesIntegern/a

The desired retirement age of the IRA account owner.

🔸 Data.Term

TypeRequiredValues
StringyesInteger

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

TypeRequiredValues
StringyesYears

The Term field is always expressed as a number of years.

🔸 Data.FV

TypeRequiredValues
StringyesCurrency

The future value of the IRA at retirement age.

🔸 Data.Gain

TypeRequiredValues
StringyesCurrency

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

TypeRequiredValues
StringyesNumber 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[]

TypeRequired
Array of Stringyes

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[]

TypeRequired
Array of Stringyes

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."
    ]
  }
}