APY Module - Request
The fields of the Data object supported by a Apy module request are defined
in alphabetical order below:
🟥 Data
| Type | Required |
|---|---|
| Object | yes |
The Data object encapsulates the request data for a given module, and must always be provided.
Fields:
🔹Compounding,🔹Decimals,🔸Interest,🔹InvestDate,🔹MaturityDate,🔸Principal,🔹StatementObjects:
🟦 Format
The fields of the Data object supported are
defined in alphabetical order below:
🔹 Data.Compounding
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Annual, Semiannual, Quarterly, Bimonthly, Monthly, Biweekly, Weekly, Daily | Daily |
The Compounding field specifies the frequency that interest is compounded. If
the deposit compounds continuously, then specify a value of Daily.
🔹 Data.Decimals
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | 3, 4, 5 | 3 |
The number of decimal places of accuracy for the disclosed APY is determined by the value of this field.
🔸 Data.Interest
| Type | Required | Values | Default |
|---|---|---|---|
| String | yes | Currency | n/a |
The total interest earned on the principal
(a) for the entire duration of the deposit if the compounding frequency is greater than or equal to the statement disclosure frequency, or
(b) for the statement period if statements are disclosed more frequently than the deposit is compounded.
🔹 Data.InvestDate
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | YYYY-MM-DD | n/a |
The value of this optional field contains the date on which interest accrual begins. If statements are disbursed more frequently than interest is compounded, then you may omit this element. As an example, if interest is compunded annually and statements are disclosed monthly, then this element may be omitted.
🔹 Data.MaturityDate
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | YYYY-MM-DD | n/a |
This optional field holds the date on which the deposit matures. If statements are disbursed more frequently than interest is compounded, then you may omit this element. As an example, if interest is compunded annually and statements are disclosed monthly, then this element may be omitted.
🔸 Data.Principal
| Type | Required | Values | Default |
|---|---|---|---|
| String | yes | Currency >= 0 | n/a |
The value of this field specifies the total amount earning interest.
🔹 Data.Statement
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Annual, Semiannual, Quarterly, Bimonthly, Monthly | Monthly |
The Statement field determines the frequency that statements are provided to
the customer by the deposit institution.
The Data object for a response from the Apy module is defined below, in the
order the fields are returned:
🟦 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.
🔹 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.