FTOS_CB_AddUpdateContractPaymentHoliday
Adds or updates a record in the FTOS_CB_ContractEvent entity representing a payment holiday request for a contract. The entire repayment schedule is recalculated considering the current event. The set of parameters sent via the request body determines the operation performed at the database level.
Syntax
The FTOS_CB_AddUpdateContractPaymentHoliday 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_CB_AddUpdateContractPaymentHoliday
Content-Type: application/json
{
"contractNo":"<contract_number>",
"eventDate":"<event_date>",
"gracePeriod":<grace_period>,
"graceTypeId":"<grace_type>",
"decreaseInstallment":<decrease_installment>,
"eventNo":"<event_number>",
"eventReason":"<event_reason>",
"holidayFee":<holiday_fee_value>,
"externalIdentifier":"<external_identifier_of_the_transaction>"
}
Here's a list of the available parameters:
| Parameter | Description |
|---|---|
| host_address | URL of the FintechOS Platform server. |
| contractNo | Mandatory if contractId is not filled. The number of the contract. |
| contractId | Mandatory if contractNo is not filled. The identifier of the contract. |
| eventDate | Mandatory. The date of the contract payment holiday event. |
| gracePeriod | Mandatory. The number of grace periods requested by the event. |
| graceTypeId | Mandatory. The type of grace periods requested by the event. Check the Dependencies page for possible values. |
| decreaseInstallment | The number of periods that decrease the installments number. |
| eventNo | Mandatory only for update operations. The number of the payment holiday event. |
| eventReason | Mandatory. Check the Dependencies page for possible values. |
| holidayFee | The payment holiday fee value. |
| externalIdentifier | Optional, string. The external identifier of the transaction. |
Response
The response indicates the result of the code execution, specifically the result of creating or updating a record in the FTOS_RequestContractEvent entity.
Example
To create or update an existing record in the FTOS_CB_ContractEvent entity, do not fill and send the eventNo parameter. If operation is successful, the eventNo is returned. The call returns the entire repayment schedule whilst considering the current event.
Request
POST https://FintechOSStudio/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateContractPaymentHoliday
Content-Type: application/json
{
"contractNo":"2766 TL_EUR",
"eventDate":"2021-07-05",
"gracePeriod":1,
"graceTypeId":"Both",
"decreaseInstallment":1,
"eventReason":"activitySuspended",
"holidayFee":150.00,
"externalIdentifier":"TR99990073953"
}
Response
{
"ContractPaymentHolidayIdentifier": "ECB 1826",
"JsonRequest": {
"ContractId": "8a0b2426-9c2c-43a1-ae22-f94b70254827",
"EventDate": "2021-07-05",
"GracePeriod": 1,
"GraceTypeId": "9c2d0a2e-d362-43c3-b50f-f43ddf96d40d",
"EventId": "109d809f-be14-447d-894e-ea117eaaa7c1",
"Simulate": 1,
"Commission": [],
"DecreaseInstallment": true,
"holidayFee": 150,
"TransactionTypeId": "1d9cc5b9-3c37-4f5f-8441-ae390ded10b4"
},
"JsonSchedule": [
{
"InstallmentNo": 1,
"DueDate": "2021-08-05T00:00:00Z",
"NoDays": 31,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 20000,
"pMT": 1579.15,
"interest": 0,
"principal": 0,
"totalInstallment": 0,
"GraceInterest": 77.5,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 2,
"DueDate": "2021-09-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 20000,
"pMT": 1585.05,
"interest": 75,
"principal": 1510.05,
"totalInstallment": 1585.05,
"GraceInterest": 152.5,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 3,
"DueDate": "2021-10-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 18489.95,
"pMT": 1585.05,
"interest": 69.34,
"principal": 1515.71,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 4,
"DueDate": "2021-11-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 16974.24,
"pMT": 1585.05,
"interest": 63.65,
"principal": 1521.4,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 5,
"DueDate": "2021-12-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 15452.84,
"pMT": 1585.05,
"interest": 57.95,
"principal": 1527.1,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 6,
"DueDate": "2022-01-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 13925.74,
"pMT": 1585.05,
"interest": 52.22,
"principal": 1532.83,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 7,
"DueDate": "2022-02-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 12392.91,
"pMT": 1585.05,
"interest": 46.47,
"principal": 1538.58,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 8,
"DueDate": "2022-03-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 10854.33,
"pMT": 1585.05,
"interest": 40.7,
"principal": 1544.35,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 9,
"DueDate": "2022-04-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 9309.98,
"pMT": 1585.05,
"interest": 34.91,
"principal": 1550.14,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 10,
"DueDate": "2022-05-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 7759.84,
"pMT": 1585.05,
"interest": 29.1,
"principal": 1555.95,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 11,
"DueDate": "2022-06-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 6203.89,
"pMT": 1585.05,
"interest": 23.26,
"principal": 1561.79,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 12,
"DueDate": "2022-07-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 4642.1,
"pMT": 1585.05,
"interest": 17.41,
"principal": 1567.64,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 13,
"DueDate": "2022-08-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 3074.46,
"pMT": 1585.05,
"interest": 11.53,
"principal": 1573.52,
"totalInstallment": 1585.05,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
},
{
"InstallmentNo": 14,
"DueDate": "2022-09-05T00:00:00Z",
"NoDays": 30,
"InstallmentTypeId": "de9ebf4e-d541-4742-8979-55182a4ff3ef",
"remainingValue": 1500.94,
"pMT": 1585.05,
"interest": 5.63,
"principal": 1500.94,
"totalInstallment": 1506.57,
"GraceInterest": null,
"scheduleTypeId": "62351c51-df4e-4bb7-ba62-683ae47a9a05",
"isEarlyRepayment": false,
"NotificationId": null
}
]
}