cURL
curl --request POST \
--url https://sandbox-api.itscovered.com/lenders/v1/loans/consent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "693f2f46-69ff-4f20-a4d9-abe982d34fd4",
"termsOfServiceId": "1.0",
"email": "email@example.com",
"phone": "6666666666"
}
'import requests
url = "https://sandbox-api.itscovered.com/lenders/v1/loans/consent"
payload = {
"id": "693f2f46-69ff-4f20-a4d9-abe982d34fd4",
"termsOfServiceId": "1.0",
"email": "email@example.com",
"phone": "6666666666"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '693f2f46-69ff-4f20-a4d9-abe982d34fd4',
termsOfServiceId: '1.0',
email: 'email@example.com',
phone: '6666666666'
})
};
fetch('https://sandbox-api.itscovered.com/lenders/v1/loans/consent', 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/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '693f2f46-69ff-4f20-a4d9-abe982d34fd4',
'termsOfServiceId' => '1.0',
'email' => 'email@example.com',
'phone' => '6666666666'
]),
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/consent"
payload := strings.NewReader("{\n \"id\": \"693f2f46-69ff-4f20-a4d9-abe982d34fd4\",\n \"termsOfServiceId\": \"1.0\",\n \"email\": \"email@example.com\",\n \"phone\": \"6666666666\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox-api.itscovered.com/lenders/v1/loans/consent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"693f2f46-69ff-4f20-a4d9-abe982d34fd4\",\n \"termsOfServiceId\": \"1.0\",\n \"email\": \"email@example.com\",\n \"phone\": \"6666666666\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.itscovered.com/lenders/v1/loans/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"693f2f46-69ff-4f20-a4d9-abe982d34fd4\",\n \"termsOfServiceId\": \"1.0\",\n \"email\": \"email@example.com\",\n \"phone\": \"6666666666\"\n}"
response = http.request(request)
puts response.read_body{
"consent": true,
"consentDateTime": "2023-12-25T10:30:00",
"email": "email@example.com",
"id": "693f2f46-69ff-4f20-a4d9-abe982d34fd4",
"phone": "6666666666",
"termsOfServiceId": "1.0"
}Endpoint Examples
Post Consent
POST
/
v1
/
loans
/
consent
cURL
curl --request POST \
--url https://sandbox-api.itscovered.com/lenders/v1/loans/consent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "693f2f46-69ff-4f20-a4d9-abe982d34fd4",
"termsOfServiceId": "1.0",
"email": "email@example.com",
"phone": "6666666666"
}
'import requests
url = "https://sandbox-api.itscovered.com/lenders/v1/loans/consent"
payload = {
"id": "693f2f46-69ff-4f20-a4d9-abe982d34fd4",
"termsOfServiceId": "1.0",
"email": "email@example.com",
"phone": "6666666666"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '693f2f46-69ff-4f20-a4d9-abe982d34fd4',
termsOfServiceId: '1.0',
email: 'email@example.com',
phone: '6666666666'
})
};
fetch('https://sandbox-api.itscovered.com/lenders/v1/loans/consent', 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/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '693f2f46-69ff-4f20-a4d9-abe982d34fd4',
'termsOfServiceId' => '1.0',
'email' => 'email@example.com',
'phone' => '6666666666'
]),
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/consent"
payload := strings.NewReader("{\n \"id\": \"693f2f46-69ff-4f20-a4d9-abe982d34fd4\",\n \"termsOfServiceId\": \"1.0\",\n \"email\": \"email@example.com\",\n \"phone\": \"6666666666\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox-api.itscovered.com/lenders/v1/loans/consent")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"693f2f46-69ff-4f20-a4d9-abe982d34fd4\",\n \"termsOfServiceId\": \"1.0\",\n \"email\": \"email@example.com\",\n \"phone\": \"6666666666\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.itscovered.com/lenders/v1/loans/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"693f2f46-69ff-4f20-a4d9-abe982d34fd4\",\n \"termsOfServiceId\": \"1.0\",\n \"email\": \"email@example.com\",\n \"phone\": \"6666666666\"\n}"
response = http.request(request)
puts response.read_body{
"consent": true,
"consentDateTime": "2023-12-25T10:30:00",
"email": "email@example.com",
"id": "693f2f46-69ff-4f20-a4d9-abe982d34fd4",
"phone": "6666666666",
"termsOfServiceId": "1.0"
}Authorizations
JWT Token
Body
application/jsonmultipart/form-datatext/plain
The request to record consent
The unique identifier of the loan application
Example:
"693f2f46-69ff-4f20-a4d9-abe982d34fd4"
Loan Platform version identifier of Terms of Service
Example:
"1.0"
Borrower email (optional)
Example:
"email@example.com"
Borrower phone number (optional)
Example:
"6666666666"
Response
The response to recording consent
Whether consent was successfully recorded
Example:
true
Consent timestamp
Example:
"2023-12-25T10:30:00"
Borrower email (optional)
Example:
"email@example.com"
The unique identifier of the loan application
Example:
"693f2f46-69ff-4f20-a4d9-abe982d34fd4"
Borrower phone number (optional)
Example:
"6666666666"
Loan Platform version identifier of Terms of Service
Example:
"1.0"
Was this page helpful?
⌘I