Endpoint APIs
The Endpoints category lists all the custom endpoints that can be called to access server side scripts through the API. Input parameters that were previously defined in the server side script are used in the request body to make the request.
Syntax
POST <host_address>/ftosapi/automation-processors/actions/<endpoint_name>
| Parameter | Description |
|---|---|
host_address
|
URL of the FintechOS platform server. |
endpoint_name
|
Name of the endpoint you wish to access. |
Response
The response indicates the result of the code execution, depending on the endpoint's function.
Examples
An equated monthly installment (EMI) is a type of payment made by borrowers to lenders on a monthly basis in a fixed amount.
In this example, we call the endpoint named EMI_endpoint. The Input parameters defined in the server side script are p, r, and n, where:
-
p is the principal amount borrowed
-
r is the periodic monthly interest rate
-
n is the total number of monthly payments
The script is configured to calculate the monthly payment rate, based on the below forumula:
The request is successful and returns the monthly payment rate for a 50000 loan, with a 0.5% interest rate over 36 months.
Request
POST /ftosapi/automation-processors/actions/emi_endpoint
{
"p": 50000,
"r": 0.005,
"n": 36
}
Response
1521.096872577786