In the second version of our API we introduced session based authentication for added security, the ability to purchase fractional loans, view pending orders, as well as various key name changes to make identifying fields easier and expose new fields. See the Accessing our API and V2 Changes below for more information.
Accessing the API
Credential Security
In order to make sure that your credentials stay secure, you will only be shown the password for API Authentication when it is first generated. If you lose or forget the password you will need to reset it on the API Management page and change any credentials you may have already setup, to use the new password.
Starting with Version 2, Funding Circle uses session based token authentication for users to connect to our API. To begin using the API you will need to login using the API ID and Password that you have received from the API Management section of the investor portal (sandbox link) (production link).
To test your account POST the follow code snippet (use your own API ID and Password) to:
https://investor-api.fc-sandbox.us/api/v2/login
When you are ready for production, you can POST your API ID and Password to:
https://investor-api.fundingcircle.us/api/v2/login
POST https://investor-api.fundingcircle.us/api/v2/login
POST {"username": "475f8c42-68o8-4191-a79e-492e2696b386", "password":"2212027e5cf7e5936394303eaod459722b"}
You will be returned with a Bearer Token which will allow you access to the API for 2 hours before having to re-authenticate.
Using your Bearer token
Here is an example of how to use the Bearer token in cURL. Remember to use the correct environment.
For Sandbox:
GET /listings/fbac75ae-ac1b-417e-ad0o-80f1e94b97d0 HTTP/1.1
Host: investor-api.fc-sandbox.us/api/v2
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGcqiJIUzI1NiJ9.eyJpc3MiOiJogHRwczovL2ZjZGV2ZWxvcG1lbnQuYXV0aDAuY22tLyIsInN1YiI6ImF1dGgwfDf1OWM3YWJkNDg5N2IzYWIxMDFmZGVkNCIsImF1ZCI6IkN5S09MOWNOWlM1dE5DVDhSMjdJa0tQeUJDc01GcjBJIiwiZXhwIjoxNDM2NTg4MzMwLCJpYXQiOjE0MzY1NTIzMzB9.C8pNavn3E4LsOPNFE1s1DR4agwE4t25nXHNU8xppI2M
For Production:
GET /listings/fbac75ae-ac1b-417e-ad0o-80f1e94b97d0 HTTP/1.1
Host: investor-api.fundingcircle.us/api/v2/
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGcqiJIUzI1NiJ9.eyJpc3MiOiJogHRwczovL2ZjZGV2ZWxvcG1lbnQuYXV0aDAuY22tLyIsInN1YiI6ImF1dGgwfDf1OWM3YWJkNDg5N2IzYWIxMDFmZGVkNCIsImF1ZCI6IkN5S09MOWNOWlM1dE5DVDhSMjdJa0tQeUJDc01GcjBJIiwiZXhwIjoxNDM2NTg4MzMwLCJpYXQiOjE0MzY1NTIzMzB9.C8pNavn3E4LsOPNFE1s1DR4agwE4t25nXHNU8xppI2M
Changes from Version 1
We've made multiple changes in version 2 to enable faster and easier usage of our API.
Major changes from version 1 include:
Session based authentication
- Increases the security of your account,
Token Expiration
Bearer tokens will expire after 2 hours.
Ability to purchase fractional loans
- Previously only whole loans could be purchased via the API. This enhancement allows you to purchase loans listed on the fractional market as well
Ability to view pending orders
- Whole loans that require a three day curing period will show up in this endpoint, giving you faster access to loans that you have purchased and are not yet in your holding account
- Fractional loans may not be moved into your holding account until the entire loan is purchased. In the interim, those loans will show as pending. This endpoint gives you faster insight into which loans you have ordered, but are not yet in your holding account
Ability to see all loans
- [UNDER DEVELOPMENT] You will now be able to access all of the loans that Funding Circle has listed
Ability to see financial information for any loan
- [UNDER DEVELOPMENT] You will now be able to access financial information on all of the loans that Funding Circle has listed
New keys (see table below)
- New keys have been added to provide you with more information about your holdings and listings
Key renaming (see table below)
- Key names now more clearly indicate the purpose of the value stored within them
Key deprecation (see table below)
- Removed keys that were no longer necessary for cleaner API access
Rate Limiting
- Access for API POSTs is limited to 40 times per second. Your POST will be distributed across a one second period allowing fair access to all investors who want to purchase listings.
An important note of rate limiting
Rate limiting is done at 40 calls/second, however, the calls must be spaced out to be more than 25ms apart. You cannot make 40 calls, wait the remainder of the second, and then make another 40 calls.
Better / Standardized error messaging
- Our error messaging has been made consistent across the platform, as well as adding new error types and more important information about those errors. For more information on API Errors, please see the 'Errors' section
Endpoint Name Changes
The following endpoints have changed
Old (v1) | New (v2) |
---|---|
/holdings/:id/repayments | /holdings/:id/payments |
/portfolio | /summary |
New Endpoints
We've added the following Endpoint
Name | |
---|---|
/orders | Returns all pending orders (orders you have made but are not yet part of your account). These will be archived once the order settles. |
API key name changes
The following keys have been renamed
Endpoint | Old key name | New key name |
---|---|---|
/holdings | loan_part_id | id |
/holdings/:id | what_loan_is_for | use_of_funds |
/holdings/:id | why_you_should_lend_to_us | reason_for_borrowing |
/holdings/:id | business_total_outstanding_debt_cents | total_outstanding_debt_cents |
/holdings/:id | business_outstanding_debt_monthly_payment_cents | outstanding_debt_monthly_payment_cents |
/holdings/:id | website | website_url |
/holdings/:id | start_date | origination_date |
/holdings/:id/payments | paid_count | count_of_payments_made |
/holdings/:id/payments | settled_date | settled_at |
/listings | loan_id | id |
/listings | loan_type | type |
/listings:id | what_loan_is_for (Note: this is now an array of strings) | use_of_funds |
/listings:id | business_total_outstanding_debt_cents | total_outstanding_debt_cents |
/listings:id | business_outstanding_debt_monthly_payment_cents | outstanding_debt_monthly_payment_cents |
/listings:id | loan_id | id |
/listings:id | why_should_you_lend_to_us | reason_for_borrowing |
/listings:id | loan_type | type |
/listings:id | website | website_url |
/listings/:id/financials | year | provided_for_year |
/transactions | transaction_type | transaction_code |
/transactions | description | comment |
Key deprication
The following keys have been depricated
Endpoint | Key |
---|---|
/holdings/:id/payments | active |
/listings/:id | additional_guarantors_provided |
/holdings/:id | additional_guarantors_provided |
/holdings/:id | city (Note: removed from fractional loans only.) |
New keys
The following keys have been added
Endpoint | Key |
---|---|
/holdings:id | total_cost_cents accrued_interest_days accrued_interest_cents business_name owed_interest_cents owed_investor_fee_cents |
/holdings/:id/financials | holding_id total_cost_cents accrued_interest_days accrued_interest_cents business_name |
/listings:id | status |
/summary | annualized_net_return_ratio |