Close Loan Application
curl --request PATCH \
--url https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalInsurance": {
"carrier": "Example Insurance Co.",
"coverageA": 250000,
"premium": 1200
}
}
'import requests
url = "https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close"
payload = { "externalInsurance": {
"carrier": "Example Insurance Co.",
"coverageA": 250000,
"premium": 1200
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalInsurance: {carrier: 'Example Insurance Co.', coverageA: 250000, premium: 1200}
})
};
fetch('https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close', 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://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'externalInsurance' => [
'carrier' => 'Example Insurance Co.',
'coverageA' => 250000,
'premium' => 1200
]
]),
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://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close"
payload := strings.NewReader("{\n \"externalInsurance\": {\n \"carrier\": \"Example Insurance Co.\",\n \"coverageA\": 250000,\n \"premium\": 1200\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalInsurance\": {\n \"carrier\": \"Example Insurance Co.\",\n \"coverageA\": 250000,\n \"premium\": 1200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalInsurance\": {\n \"carrier\": \"Example Insurance Co.\",\n \"coverageA\": 250000,\n \"premium\": 1200\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Failed to close loan application"
}Endpoint Examples
Close Loan Application
Close a loan application, and optionally provide external insurance details
PATCH
/
v1
/
loans
/
{id}
/
close
Close Loan Application
curl --request PATCH \
--url https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalInsurance": {
"carrier": "Example Insurance Co.",
"coverageA": 250000,
"premium": 1200
}
}
'import requests
url = "https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close"
payload = { "externalInsurance": {
"carrier": "Example Insurance Co.",
"coverageA": 250000,
"premium": 1200
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
externalInsurance: {carrier: 'Example Insurance Co.', coverageA: 250000, premium: 1200}
})
};
fetch('https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close', 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://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'externalInsurance' => [
'carrier' => 'Example Insurance Co.',
'coverageA' => 250000,
'premium' => 1200
]
]),
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://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close"
payload := strings.NewReader("{\n \"externalInsurance\": {\n \"carrier\": \"Example Insurance Co.\",\n \"coverageA\": 250000,\n \"premium\": 1200\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalInsurance\": {\n \"carrier\": \"Example Insurance Co.\",\n \"coverageA\": 250000,\n \"premium\": 1200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.itscovered.com/lenders/v1/loans/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"externalInsurance\": {\n \"carrier\": \"Example Insurance Co.\",\n \"coverageA\": 250000,\n \"premium\": 1200\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Failed to close loan application"
}Authorizations
JWT Token
Path Parameters
The unique identifier of the loan application
Example:
"693f2f46-69ff-4f20-a4d9-abe982d34fd4"
Body
application/jsonmultipart/form-datatext/plain
External insurance details, when customer specified that they had obtained insurance elsewhere (if applicable)
Show child attributes
Show child attributes
Response
Indicates that the loan application was closed successfully
Example:
true
Was this page helpful?
⌘I