Annuity Module - Request
The fields of the Data object supported by the Annuity module request are defined
in alphabetical order below:
| Object | Fields |
|---|---|
🟥 Data | 🔹Balance, 🔹Calculate, 🔹Income, 🔸Rate, 🔹Term |
🟦 Format | 🔹CurrencyDecimals, 🔹DateFormat, 🔹DateSeparator, 🔹DecimalSeparator, 🔹StrictDP, 🔹ThousandSeparator |
🟥 Data
| Type | Required |
|---|---|
| Object | yes |
The Data object encapsulates the request data for a given module, and must always be provided.
Fields:
🔹Balance,🔹Calculate,🔹Income,🔸Rate,🔹TermObjects:
🟦 Format
🔹 Data.Balance
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Currency >= 0 | n/a |
The beginning balance is the amount which is present in the retirment
account when the annuity starts. Interest will accrue monthly on this
amount, and the income stream is taken from this balance during the
term of the annuity. If you are computing the beginning balance
(e.g. "Calculate" : "Balance"), then this field may be omitted.
🔹 Data.Calculate
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Balance, Income, Term | Income |
This field informs the SCE which of the three basic variables involved in an
annuity calculation is to be calculated (e.g. Balance, Income, or Term).
In the sample above, the calculation type being requested is Income (the monthly
income amount). Thus, the Balance, and Term fields are included in the request,
whereas the Income field is omitted.
🔹 Data.Income
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Currency >= 0 | n/a |
The value of this field specifies the desired monthly income amount. If you are
computing the monthly income amount (e.g. "Calculate" : "Income"), then you
may omit this field from the request.
🔸 Data.Rate
| Type | Required | Values |
|---|---|---|
| String | yes | Number in [-99.999...600] |
This field dictates the rate at which interest accrues throughout the term of the annuity.
🔹 Data.Term
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Integer > 0 | n/a |
This field specifies the number of months in the term of the annuity.
This corresponds to the length of the monthly income stream which is
disbursed from the beginning balance. If you are computing the number
of months of income (e.g. "Calculate" : "Term"), then this field may
be omitted.
🟦 Data.Format
| Type | Required |
|---|---|
| Object | no |
The Format object is one of the first objects parsed from a request, as
various fields affect how date and numeric fields are parsed and validated.
Fields:
🔹CurrencyDecimals,🔹DateFormat,🔹DateSeparator,🔹DecimalSeparator,🔹StrictDP,🔹ThousandSeparatorObjects:
None
🔹 Data.Format.CurrencyDecimals
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | 0 or 2 | 2 |
When displaying and parsing Currency fields, this field determines the maximum
number of decimal places allowed after the
DecimalSeparator. If this field is not included,
the default value [Country](#data-the default value is 2.
🔹 Data.Format.DateFormat
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | YMD, MDY, or DMY | YMD |
When displaying and parsing Date fields, this field determines the expected
format for all Date fields. The following DateFormat options
are allowed:
YMD- All dates should be formated asYYYY-MM-DD.MDY- All dates should be formated asMM-DD-YYYY.DMY- All dates should be formated asDD-MM-YYYY.
Note that the character which separates the individual month, day, and year
portions of the date is configurable via the
DateSeparator field.
🔹 Data.Format.DateSeparator
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | empty or a single character | - |
When displaying and parsing Date fields, this field determines the character used to separate the individual month, day, and year portions of a date field.
🔹 Data.Format.DecimalSeparator
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | empty or a single character | . |
When displaying and parsing Currency, Percentage, or Floating numeric fields, this field determines the character used to separate the fractional part from the whole.
🔹 Data.Format.StrictDP
| Type | Required | Values | Default |
|---|---|---|---|
| Boolean | no | true, false | false |
If the value of this field is true, then the SCE will strictly verify the
number of decimal places allowed for currency input values. Thus, if the calling
application sends in a request with a currency amount of 1000.005, the SCE will
return an error code.
If the value of this field is set to false, then currency values sent in
with an invalid number of decimal places will be rounded to the correct number
of decimal places by the SCE (using five/four rounding), and a warning message
with this information will be returned with the response.
🔹 Data.Format.ThousandSeparator
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | empty or a single character | empty |
When displaying numeric fields, this field determines the character used to separate the thousands places from the hundreds. When parsing a numeric request field, if a thousand separator is specified in the request, then the SCE will now remove all occurrences of the specified thousand separator from the numeric field string before attempting to convert it to a number.