Modify Loan Account
curl --request PUT \
--url https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": 3,
"createStandingInstructionAtDisbursement": true,
"createdDate": "5 October 2024",
"duration": 10,
"durationBy": "Month",
"expectedDisbursementDate": "6 October 2024",
"interestRate": 5,
"interestType": "Flat",
"linkDepositAccountId": 573,
"loanTermFrequency": 10,
"loanType": "individual",
"numberOfRepayments": 10,
"principal": 200000,
"productId": 2,
"repaymentEvery": 1,
"repaymentFrequency": "Monthly",
"repaymentStartingDate": "8 October 2024"
}
'import requests
url = "https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify"
payload = {
"clientId": 3,
"createStandingInstructionAtDisbursement": True,
"createdDate": "5 October 2024",
"duration": 10,
"durationBy": "Month",
"expectedDisbursementDate": "6 October 2024",
"interestRate": 5,
"interestType": "Flat",
"linkDepositAccountId": 573,
"loanTermFrequency": 10,
"loanType": "individual",
"numberOfRepayments": 10,
"principal": 200000,
"productId": 2,
"repaymentEvery": 1,
"repaymentFrequency": "Monthly",
"repaymentStartingDate": "8 October 2024"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: 3,
createStandingInstructionAtDisbursement: true,
createdDate: '5 October 2024',
duration: 10,
durationBy: 'Month',
expectedDisbursementDate: '6 October 2024',
interestRate: 5,
interestType: 'Flat',
linkDepositAccountId: 573,
loanTermFrequency: 10,
loanType: 'individual',
numberOfRepayments: 10,
principal: 200000,
productId: 2,
repaymentEvery: 1,
repaymentFrequency: 'Monthly',
repaymentStartingDate: '8 October 2024'
})
};
fetch('https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clientId' => 3,
'createStandingInstructionAtDisbursement' => true,
'createdDate' => '5 October 2024',
'duration' => 10,
'durationBy' => 'Month',
'expectedDisbursementDate' => '6 October 2024',
'interestRate' => 5,
'interestType' => 'Flat',
'linkDepositAccountId' => 573,
'loanTermFrequency' => 10,
'loanType' => 'individual',
'numberOfRepayments' => 10,
'principal' => 200000,
'productId' => 2,
'repaymentEvery' => 1,
'repaymentFrequency' => 'Monthly',
'repaymentStartingDate' => '8 October 2024'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify"
payload := strings.NewReader("{\n \"clientId\": 3,\n \"createStandingInstructionAtDisbursement\": true,\n \"createdDate\": \"5 October 2024\",\n \"duration\": 10,\n \"durationBy\": \"Month\",\n \"expectedDisbursementDate\": \"6 October 2024\",\n \"interestRate\": 5,\n \"interestType\": \"Flat\",\n \"linkDepositAccountId\": 573,\n \"loanTermFrequency\": 10,\n \"loanType\": \"individual\",\n \"numberOfRepayments\": 10,\n \"principal\": 200000,\n \"productId\": 2,\n \"repaymentEvery\": 1,\n \"repaymentFrequency\": \"Monthly\",\n \"repaymentStartingDate\": \"8 October 2024\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": 3,\n \"createStandingInstructionAtDisbursement\": true,\n \"createdDate\": \"5 October 2024\",\n \"duration\": 10,\n \"durationBy\": \"Month\",\n \"expectedDisbursementDate\": \"6 October 2024\",\n \"interestRate\": 5,\n \"interestType\": \"Flat\",\n \"linkDepositAccountId\": 573,\n \"loanTermFrequency\": 10,\n \"loanType\": \"individual\",\n \"numberOfRepayments\": 10,\n \"principal\": 200000,\n \"productId\": 2,\n \"repaymentEvery\": 1,\n \"repaymentFrequency\": \"Monthly\",\n \"repaymentStartingDate\": \"8 October 2024\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": 3,\n \"createStandingInstructionAtDisbursement\": true,\n \"createdDate\": \"5 October 2024\",\n \"duration\": 10,\n \"durationBy\": \"Month\",\n \"expectedDisbursementDate\": \"6 October 2024\",\n \"interestRate\": 5,\n \"interestType\": \"Flat\",\n \"linkDepositAccountId\": 573,\n \"loanTermFrequency\": 10,\n \"loanType\": \"individual\",\n \"numberOfRepayments\": 10,\n \"principal\": 200000,\n \"productId\": 2,\n \"repaymentEvery\": 1,\n \"repaymentFrequency\": \"Monthly\",\n \"repaymentStartingDate\": \"8 October 2024\"\n}"
response = http.request(request)
puts response.read_body{}Loan Account
Modify Loan Account
PUT
/
loans
/
{loanId}
/
modify
Modify Loan Account
curl --request PUT \
--url https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": 3,
"createStandingInstructionAtDisbursement": true,
"createdDate": "5 October 2024",
"duration": 10,
"durationBy": "Month",
"expectedDisbursementDate": "6 October 2024",
"interestRate": 5,
"interestType": "Flat",
"linkDepositAccountId": 573,
"loanTermFrequency": 10,
"loanType": "individual",
"numberOfRepayments": 10,
"principal": 200000,
"productId": 2,
"repaymentEvery": 1,
"repaymentFrequency": "Monthly",
"repaymentStartingDate": "8 October 2024"
}
'import requests
url = "https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify"
payload = {
"clientId": 3,
"createStandingInstructionAtDisbursement": True,
"createdDate": "5 October 2024",
"duration": 10,
"durationBy": "Month",
"expectedDisbursementDate": "6 October 2024",
"interestRate": 5,
"interestType": "Flat",
"linkDepositAccountId": 573,
"loanTermFrequency": 10,
"loanType": "individual",
"numberOfRepayments": 10,
"principal": 200000,
"productId": 2,
"repaymentEvery": 1,
"repaymentFrequency": "Monthly",
"repaymentStartingDate": "8 October 2024"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: 3,
createStandingInstructionAtDisbursement: true,
createdDate: '5 October 2024',
duration: 10,
durationBy: 'Month',
expectedDisbursementDate: '6 October 2024',
interestRate: 5,
interestType: 'Flat',
linkDepositAccountId: 573,
loanTermFrequency: 10,
loanType: 'individual',
numberOfRepayments: 10,
principal: 200000,
productId: 2,
repaymentEvery: 1,
repaymentFrequency: 'Monthly',
repaymentStartingDate: '8 October 2024'
})
};
fetch('https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clientId' => 3,
'createStandingInstructionAtDisbursement' => true,
'createdDate' => '5 October 2024',
'duration' => 10,
'durationBy' => 'Month',
'expectedDisbursementDate' => '6 October 2024',
'interestRate' => 5,
'interestType' => 'Flat',
'linkDepositAccountId' => 573,
'loanTermFrequency' => 10,
'loanType' => 'individual',
'numberOfRepayments' => 10,
'principal' => 200000,
'productId' => 2,
'repaymentEvery' => 1,
'repaymentFrequency' => 'Monthly',
'repaymentStartingDate' => '8 October 2024'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify"
payload := strings.NewReader("{\n \"clientId\": 3,\n \"createStandingInstructionAtDisbursement\": true,\n \"createdDate\": \"5 October 2024\",\n \"duration\": 10,\n \"durationBy\": \"Month\",\n \"expectedDisbursementDate\": \"6 October 2024\",\n \"interestRate\": 5,\n \"interestType\": \"Flat\",\n \"linkDepositAccountId\": 573,\n \"loanTermFrequency\": 10,\n \"loanType\": \"individual\",\n \"numberOfRepayments\": 10,\n \"principal\": 200000,\n \"productId\": 2,\n \"repaymentEvery\": 1,\n \"repaymentFrequency\": \"Monthly\",\n \"repaymentStartingDate\": \"8 October 2024\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": 3,\n \"createStandingInstructionAtDisbursement\": true,\n \"createdDate\": \"5 October 2024\",\n \"duration\": 10,\n \"durationBy\": \"Month\",\n \"expectedDisbursementDate\": \"6 October 2024\",\n \"interestRate\": 5,\n \"interestType\": \"Flat\",\n \"linkDepositAccountId\": 573,\n \"loanTermFrequency\": 10,\n \"loanType\": \"individual\",\n \"numberOfRepayments\": 10,\n \"principal\": 200000,\n \"productId\": 2,\n \"repaymentEvery\": 1,\n \"repaymentFrequency\": \"Monthly\",\n \"repaymentStartingDate\": \"8 October 2024\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spark.test.woodcore.co/api/v2/loans/{loanId}/modify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": 3,\n \"createStandingInstructionAtDisbursement\": true,\n \"createdDate\": \"5 October 2024\",\n \"duration\": 10,\n \"durationBy\": \"Month\",\n \"expectedDisbursementDate\": \"6 October 2024\",\n \"interestRate\": 5,\n \"interestType\": \"Flat\",\n \"linkDepositAccountId\": 573,\n \"loanTermFrequency\": 10,\n \"loanType\": \"individual\",\n \"numberOfRepayments\": 10,\n \"principal\": 200000,\n \"productId\": 2,\n \"repaymentEvery\": 1,\n \"repaymentFrequency\": \"Monthly\",\n \"repaymentStartingDate\": \"8 October 2024\"\n}"
response = http.request(request)
puts response.read_body{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"default"
Body
application/json
Example:
3
Example:
true
Example:
"5 October 2024"
Example:
10
Example:
"Month"
Example:
"6 October 2024"
Example:
5
Example:
"Flat"
Example:
573
Example:
10
Example:
"individual"
Example:
10
Example:
200000
Example:
2
Example:
1
Example:
"Monthly"
Example:
"8 October 2024"
Response
200 - application/json
{}
The response is of type object.
⌘I