Links

Fund Loan

API endpoints to fund loan for mobile users. This requires two consecutive calls for APIs, check_balance and fund APIs.

HTTPS Request

get
https://api.lenmo.app/api/v3
/accepted_offers/{id}/check_balance/
Before an investor initiates a fund towards and accepted offer, a check_balance request is required to verify if the investor can fund this loan.
Parameters
Path
id*
Long
The accepted offer id to be funded.
Header
Accept
String
The content type of the response.
Authorization*
String
The bearer token that give the user the authentication to perform this request.
Responses
200: OK
An investor can fund this loan
400: Bad Request
An investor cannot fund this offer
403: Forbidden
Permission Denied
post
https://api.lenmo.app/api/v3
/accepted_offers/{id}/fund/
We only fund loan using the user's balance now, not balance and bank as done previously. Validation needed for the API endpoint to work:
1. Offer has to be not processed on dwolla before; processed_on_dwolla attribute have to be False.
2. Offer has to be Accepted.
3. LoanRequest status has to be Offered.
4. Borrower has a primary funding resource.
5. Investor's Balance exceeds the total_amount attribute of the Loan.
Parameters
Path
id*
Long
The accepted offer id to be funded.
Header
Accept
String
The content type of the response.
Authorization*
String
The bearer token that give the user the authentication to perform this request.
Responses
201: Created
A loan is successfully funded
400: Bad Request
A loan cannot be funded
403: Forbidden
Permission Denied

Sample Request

Python
cURL
1
import requests
2
import json
3
4
offer_id = 126315
5
access_token = # Valid Token
6
7
headers = {
8
'Accept': 'application/json',
9
'Authorization' : 'Bearer {}'.format(access_token)
10
}
11
12
body = {}
13
14
url_check_balance='https://api.lenmo.app/api/v3/accepted_offers/{}/check_balance/'.format(offer_id)
15
16
r_1 = requests.get(url_check_balance, json = body, headers = headers)
17
18
url_fund='https://api.lenmo.app/api/v3/accepted_offers/{}/fund/'.format(offer_id)
19
20
r_2 = requests.post(url_fund, json = body, headers = headers)
curl -X GET "https://api.lenmo.app/api/v3/accepted_offers/125944/check_balance/"
-H "Accept: application/json"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
curl -X POST "https://api.lenmo.app/api/v3/accepted_offers/125944/fund/"
-H "Accept: application/json"
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Good to know: We advise that you refresh this en