FTOS_BP_GetAvailableProductDiscounts
Returns a product's available discounts based on its name or id and the specified filters.
Syntax
The FTOS_BP_GetAvailableProductDiscounts 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_GetAvailableProductDiscounts
Content-Type: application/json
{
"productCode":"<product_code>",
"filterList":[{"name":"<filter_name>",
"value":<filter_value>}]
}
Here's a list of the available parameters:
| Parameter | Description |
|---|---|
| host_address | URL of the FintechOS Platform server. |
| productCode | Mandatory when productId is not sent, string. The code of the banking product. |
| productId | Mandatory when productCode is not sent, string. The id of the banking product. |
| filterList | Optional, JSON array of objects. It filters the list according to the parameters sent within each object: name, string and value, numeric. |
Response
The response is an array of objects with details about the discounts available for the specified product, filtered according to your preferences.
Example
To view the details of a specific product's available discounts, send the following request, changing the product code and filters according to your needs.
Request
POST https://your_FintechOS_server/ftosapi/automation-processors/actions/FTOS_BP_GetAvailableProductDiscounts
Content-Type: application/json
{
"productCode":"TL_ADV",
"filterList":""
}
Response
{
"Discounts": [
{
"DiscountId": "84e63073-3392-4b06-96ee-ab8e0497df50",
"DiscountName": "Advanced Loan Discount - 1",
"DiscountType": "Commission discount",
"DiscountValue": 100.0,
"DiscountIsPercentage": false,
"DiscountIsOptional": false,
"UseBankingFormula": false,
"FormulaTypeId": null
},
{
"DiscountId": "b5bb8f4c-762b-4032-ba7b-b2a466a1c5d9",
"DiscountName": "Advanced Loan Discount - 2",
"DiscountType": "Interest Discount",
"DiscountValue": 1.0,
"DiscountIsPercentage": false,
"DiscountIsOptional": false,
"UseBankingFormula": false,
"FormulaTypeId": null
}
]
}
To view the details of a specific product's available discounts, send the following request, changing the product id and filters according to your needs.
Request
POST https://your_FintechOS_server/ftosapi/automation-processors/actions/FTOS_BP_GetAvailableProductDiscounts
Content-Type: application/json
{
"productId":"EEC720BA-6C32-47AC-9050-3D9D759F043E",
"filterList":""
}
Response
{
"Discounts": [
{
"DiscountId": "84e63073-3392-4b06-96ee-ab8e0497df50",
"DiscountName": "Advanced Loan Discount - 1",
"DiscountType": "Commission discount",
"DiscountValue": 100.0,
"DiscountIsPercentage": false,
"DiscountIsOptional": false,
"UseBankingFormula": false,
"FormulaTypeId": null
},
{
"DiscountId": "b5bb8f4c-762b-4032-ba7b-b2a466a1c5d9",
"DiscountName": "Advanced Loan Discount - 2",
"DiscountType": "Interest Discount",
"DiscountValue": 1.0,
"DiscountIsPercentage": false,
"DiscountIsOptional": false,
"UseBankingFormula": false,
"FormulaTypeId": null
}
]
}