FTOS_BP_GetDiscountDetail
Returns the banking product's discount information based on its product discount id or its product discount name and product code.
Syntax
The FTOS_BP_GetDiscountDetail custom endpoint is called from within the Endpoint API endpoint. Visit the Endpoint API page for more details.
POST <host_address>/ftosapi/automation-processors/actions/ftos_bp_getdiscountdetail
Content-Type: application/json
{
"discountName": "<discount_name>",
"productCode": "<product_code>,
"discountInput": {
"Amount": <discount_input_amount>
}
}
Here's a list of the available parameters:
| Parameter | Description |
|---|---|
| host_address | URL of the FintechOS Platform server. |
| productDiscountId | Mandatory when discountName is not sent, string. The id of the product discount. |
| discountName | Mandatory when productDiscountId is not sent, string. The name of the product discount. |
| productCode | Mandatory to be sent along with discountName, string. The name of the banking product. |
| discountInput | Optional, json for formula input if necessary when no mapping was done for formula. The form of this json should look like the one in test formula. If use Banking Formula is checked, then the value is equal to the formula result. |
Response
The response is an object with details about the provided discount from FTOS_BP_BankingProductDiscount and associated FTOS_BP_Discount. If use Banking Formula is checked, then the value is equal to the formula result.
Example
To view the details of a specific discount, send the following request, changing the id of the discount record with the one you need.
Request
POST https://your_FintechOS_server/ftosapi/automation-processors/actions/ftos_bp_getdiscountdetail
Content-Type: application/json
{
"productDiscountId": "b5bb8f4c-762b-4032-ba7b-b2a466a1c5d9",
"discountInput": {
"Amount": 2000
}
}
Response
{
"DiscountDetail": [
{
"Id": "b5bb8f4c-762b-4032-ba7b-b2a466a1c5d9",
"Name": "Advanced Loan Discount - 2",
"DiscountTypeId": "f0da4a04-a513-4394-8b60-96d0a9409d7c",
"Value": 1.0,
"StartDate": {
"invariantDate": "2020-01-01"
},
"EndDate": {
"invariantDate": "2050-12-31"
},
"AppliedToDimension": "a16d6728-76ac-4d72-8fa7-a992e9a6a63f",
"InterestTypeId": "3a5ffd12-bfc6-4826-bb81-7e49d2f1c2c6",
"CommissionTypeId": null,
"InsuranceClassId": null,
"InsuranceId": null,
"IsOptionalDiscount": false,
"IsPercentage": false,
"UseFormula": false,
"FormulaTypeId": null
}
]
}
To view the details of a specific discount, send the following request, changing the name of the discount record and the banking product code with the ones you need.
Request
POST https://your_FintechOS_server/ftosapi/automation-processors/actions/ftos_bp_getdiscountdetail
Content-Type: application/json
{
"discountName": "Advanced Loan Discount - 2",
"productCode": "TL_ADV",
"discountInput": {
"Amount": 2000
}
}
Response
{
"DiscountDetail": [
{
"Id": "b5bb8f4c-762b-4032-ba7b-b2a466a1c5d9",
"Name": "Advanced Loan Discount - 2",
"DiscountTypeId": "f0da4a04-a513-4394-8b60-96d0a9409d7c",
"Value": 1.0,
"StartDate": {
"invariantDate": "2020-01-01"
},
"EndDate": {
"invariantDate": "2050-12-31"
},
"AppliedToDimension": "a16d6728-76ac-4d72-8fa7-a992e9a6a63f",
"InterestTypeId": "3a5ffd12-bfc6-4826-bb81-7e49d2f1c2c6",
"CommissionTypeId": null,
"InsuranceClassId": null,
"InsuranceId": null,
"IsOptionalDiscount": false,
"IsPercentage": false,
"UseFormula": false,
"FormulaTypeId": null
}
]
}