cURL
curl --request DELETE \
--url https://api.finosu.com/loans/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.finosu.com/loans/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.finosu.com/loans/{id}', 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://api.finosu.com/loans/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.finosu.com/loans/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.finosu.com/loans/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.finosu.com/loans/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"deleted": true,
"servicingStatus": "NOT_SERVICING",
"cancelledScheduledPayments": 2,
"cancelledCalls": 3,
"cancelledEmails": 1,
"cancelledSms": 1
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Loans
Delete Loan
Soft-delete a loan. Sets servicing status to NOT_SERVICING, cancels scheduled payments and communications.
DELETE
/
loans
/
{id}
cURL
curl --request DELETE \
--url https://api.finosu.com/loans/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.finosu.com/loans/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.finosu.com/loans/{id}', 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://api.finosu.com/loans/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.finosu.com/loans/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.finosu.com/loans/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.finosu.com/loans/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"deleted": true,
"servicingStatus": "NOT_SERVICING",
"cancelledScheduledPayments": 2,
"cancelledCalls": 3,
"cancelledEmails": 1,
"cancelledSms": 1
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Overview
Soft-delete a loan by its external reference ID. This endpoint:- Sets the loan’s servicing status to
NOT_SERVICING - Cancels all scheduled payments for the loan
- Cancels all scheduled communications (calls, emails, SMS)
- Marks the loan as deleted (soft-delete)
Response
The response includes counts of all cancelled items:{
"id": "LOAN-12345",
"deleted": true,
"servicingStatus": "NOT_SERVICING",
"cancelledScheduledPayments": 2,
"cancelledCalls": 3,
"cancelledEmails": 1,
"cancelledSms": 1
}
Error Responses
| Status Code | Description |
|---|---|
| 404 | Loan not found |
| 500 | Internal server error |
Authorizations
Path Parameters
External reference ID of the loan