201: Created An offer is created for that loan request. 403: Forbidden Permission Denied 400: Bad Request
Copy {
"id" : 1 ,
"offered_interest" : 0.03 ,
"offer_status" : "pending" ,
"lender" : {
// ...lender data...
} ,
"loan_request" : {
// ...loan request data...
} ,
"monthly_payment" : 100 ,
"loan_gain" : 100.02 ,
"created" : "2022-05-27T10:37:14.658672Z" ,
"offer_status_changed" : "2020-05-06 17:25:01 Etc/GMT" ,
"processed_on_dwolla" : true
}
If authentication credentials are invalid
Copy {
"detail" : "Authentication credentials were not provided."
}
If the investor is currently borrowing
Copy {
"message" : "Borrower can not offer."
}
Cases:
Offered interest is more than the loan request max interest rate
Copy {
"message" : "The maximum interest rate allowed for this loan request is {loan_request_max_interest_rate} "
}
The loan request has been canceled
Copy {
"message" : "This Loan Request has been Canceled"
}
The loan request has been signed
Copy {
"message" : "You can't make an offer to a Signed Loan Request"
}
The investor already made an offer for this loan request
Copy {
"message" : "You have already made an offer for this Loan Request"
}
Borrower accepted another offer
Copy {
"message" : "You can't make an offer as the borrower has already accepted another offer"
}
The investor has no verified bank account.
Copy {
"message": "We cannot process this request as it appears that your bank account has not been verified. Please verify your bank account and try again later."
}
cURL Python Java Ruby Node.Js PHP
Copy curl -X GET "https://api.lenmo.app/api/v3/loan_requests/" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "X-Timestamp: REQUEST_TIMESTAMP" \
-H "X-HMAC: REQUEST_HMAC"
Copy import requests
lq_id = 126315
url = "https://api.lenmo.app/api/v3/loan_requests/ {} /make_offer/" . format (lq_id)
headers = {
"Accept" : "application/json" ,
"X-API-KEY" : "YOUR_API_KEY" ,
"X-Timestamp" : "REQUEST_TIMESTAMP" ,
"X-HMAC" : "REQUEST_HMAC" ,
}
body = { "offered_interest" : 1 }
r = requests . post (url, json = body, headers = headers)
print (r.text)
Copy import java . io . OutputStream ;
import java . net . HttpURLConnection ;
import java . net . URL ;
public class Main {
public static void main ( String [] args) {
try {
int lqId = 126315 ;
String urlString = "https://api.lenmo.app/api/v3/loan_requests/" + lqId + "/make_offer/" ;
URL url = new URL(urlString) ;
HttpURLConnection connection = (HttpURLConnection) url . openConnection ();
connection . setRequestMethod ( "POST" );
connection . setRequestProperty ( "Accept" , "application/json" );
connection . setRequestProperty ( "X-API-KEY" , "YOUR_API_KEY" );
connection . setRequestProperty ( "X-Timestamp" , "REQUEST_TIMESTAMP" );
connection . setRequestProperty ( "X-HMAC" , "REQUEST_HMAC" );
connection . setRequestProperty ( "Content-Type" , "application/json; utf-8" );
connection . setDoOutput ( true );
String jsonInputString = "{\"offered_interest\": 1}" ;
try ( OutputStream os = connection . getOutputStream ()) {
byte [] input = jsonInputString . getBytes ( "utf-8" );
os . write (input , 0 , input . length );
}
BufferedReader in = new BufferedReader( new InputStreamReader( connection . getInputStream() , "utf-8" )) ;
String inputLine;
StringBuilder response = new StringBuilder() ;
while ((inputLine = in . readLine ()) != null ) {
response . append (inputLine);
}
in . close ();
System . out . println ( response . toString ());
} catch ( Exception e) {
e . printStackTrace ();
}
}
}
Copy require 'net/http'
require 'json'
require 'uri'
lq_id = 126315
url = URI ( "https://api.lenmo.app/api/v3/loan_requests/ #{lq_id} /make_offer/" )
http = Net :: HTTP . new (url . host , url . port)
http . use_ssl = true
request = Net :: HTTP :: Post . new (url)
request[ "Accept" ] = "application/json"
request[ "X-API-KEY" ] = "YOUR_API_KEY"
request[ "X-Timestamp" ] = "REQUEST_TIMESTAMP"
request[ "X-HMAC" ] = "REQUEST_HMAC"
request . body = { offered_interest: 1 } . to_json
response = http . request(request)
puts response . body
Copy const fetch = require ( 'node-fetch' );
const lqId = 126315 ;
const url = `https://api.lenmo.app/api/v3/loan_requests/ ${ lqId } /make_offer/` ;
const headers = {
"Accept" : "application/json" ,
"X-API-KEY" : "YOUR_API_KEY" ,
"X-Timestamp" : "REQUEST_TIMESTAMP" ,
"X-HMAC" : "REQUEST_HMAC" ,
"Content-Type" : "application/json" ,
};
const body = {
offered_interest : 1
};
fetch (url , {
method : 'POST' ,
headers : headers ,
body : JSON .stringify (body)
})
.then (response => response .text ())
.then (data => console .log (data))
.catch (error => console .error ( 'Error:' , error));
Copy <? php
$lqId = 126315 ;
$url = "https://api.lenmo.app/api/v3/loan_requests/$lqId/make_offer/" ;
$headers = [
"Accept: application/json" ,
"X-API-KEY: YOUR_API_KEY" ,
"X-Timestamp: REQUEST_TIMESTAMP" ,
"X-HMAC: REQUEST_HMAC" ,
"Content-Type: application/json"
];
$body = json_encode ( [
"offered_interest" => 1
] ) ;
$ch = curl_init () ;
curl_setopt ( $ch , CURLOPT_URL , $url ) ;
curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , true ) ;
curl_setopt ( $ch , CURLOPT_HTTPHEADER , $headers ) ;
curl_setopt ( $ch , CURLOPT_POST , true ) ;
curl_setopt ( $ch , CURLOPT_POSTFIELDS , $body ) ;
$response = curl_exec ( $ch ) ;
if ( curl_errno ( $ch ) ) {
echo 'Error:' . curl_error ( $ch ) ;
} else {
echo $response;
}
curl_close ( $ch ) ;
?>