Investing in loans – orders API
The orders API allows you to submit bid requests on Prosper listings. Once an order has been submitted, a unique order id is created, which you can use to retrieve information about the order.
The following table shows the types of tasks you can complete using the orders API. Select a task to jump directly to the API documentation for that task.
Desired task | Method call |
Submit a new investment order | POST /orders/ |
Retrieve details for a specific order or a group of orders | GET /orders/{order_id}
GET /orders/ |
Retrieve listings belonging to a specific order | GET /orders/{order_id}/listings |
Supported methods
GET, POST
Example URIs
Submit a new investment order
POST <prosper_base_address>/orders/ Authorization: bearer <access_token> Accept: application/json Content-Type: application/json
Retrieve details of a single investment order
GET <prosper_base_address>/orders/{order_id} Authorization: bearer <access_token> Accept: application/json
Retrieve details of all placed orders
GET <prosper_base_address>/orders/ Authorization: bearer <access_token> Accept: application/json
Retrieve listings associated with an investment order
GET <prosper_base_address>/orders/{order_id}/listings Authorization: bearer <access_token> Accept: application/json
Submit a new investment order – POST /orders/
Use the POST /orders/ method call to submit a new investment order with loan bid requests. When creating an investment order, you will pass in an array of bid requests. Each bid request must contain the listing number you want to bid on, and the amount you want to invest in each listing. You can make up to 100 bid requests in a single order. You cannot bid on the same listing more than once in a single order.
The POST /orders/ call is an asynchronous call. Prosper will process the bid requests within the order, and update the status of each bid as it is executed. To retrieve the status of the individual bid requests within the order, you can make a call later to GET orders/{order_id}. To retrieve the status for all your orders, you can make a call later to GET/orders/.
Once you place the order, the Prosper user’s account balance will be debited the total amount of the order immediately. If any bid within the order is not successfully placed, the Prosper user’s account balance will be credited the amount of the unsuccessful bid.
For a partial loan listing that is less than 24 hours old, you cannot bid more than 10% of the loan total (you will get LENDER_NOT_ELIGIBLE_TO_BID in your bid_result). After 24 hours, you can bid any amount of the loan listing total remaining.
If a bid request is larger than the amount remaining on the loan listing, Prosper will invest the remaining amount, credit the account with the note, and credit the account with the excess funds remaining after the note purchase. For example, if a loan listing only has $15 left to become fully invested, and a bid request has an amount of $25 when the note purchase transaction occurs, you will receive a note on that listing for $15, and your Prosper account’s cash balance will be credited $10.
About order validation and processing
When Prosper receives an order, an initial validation is performed to determine if any of the listing bid requests within the order are invalid. If initial order validation fails, the entire order will fail (even if some other parts of the order might still succeed). Initial order validation is an “all or nothing” validation.
If there are no errors, the order will proceed. Keep in mind that after the initial order validation, any of the bid requests within the order can expire during the processing of the order. Prosper will process the order, expiring any bid requests that are determined invalid during processing.
Example URI:
POST <prosper_base_address>/orders/ Authorization: bearer <access_token> Accept: application/json Content-Type: application/json
HTTP Headers
Field name | Expected value | Required? |
Authorization | bearer <access_token> | Y |
Accept | application/json | Y |
timezone | By default, all dates returned in the response are in UTC format. However, you can specify the timezone in full format.
Examples: America/Los_Angeles |
N |
order request object elements
When creating an investment order, you must pass the following elements in the request JSON body of the request:
Name | Type | Description |
bid_requests | array of listing bids | An array of listing bids to place in this order.
Note: Orders cannot exceed 100 bids. |
bid_amount | decimal | Amount to bid on this listing. For a partial loan listing that is less than 24 hours old, you cannot bid more than 10% of the loan total. After 24 hours, you can bid any amount of the loan listing total. |
listing_id | integer | The id of the listing you are bidding on |
order response object elements
Name | Type | Description |
order_id | string | A unique generated id for the order. |
order_date | date | The date the order was created. |
bid_requests | array of listing bids | An array of listing bids for the order. |
order_status | string | Status of order. Can be one of the following:
|
estimated_return | decimal | The estimated return of this order.
This element has been deprecated. |
estimated_loss | decimal | The estimated loss of this order.
This element has been deprecated. |
effective_yield | decimal | The effective yield of this order.
This element has been deprecated. |
source | string | The originating system that created the order. |
bid_request elements
Name | Type | Description |
bid_amount | decimal | Amount bid on the listing. |
bid_status | string | Status of the bid. There is only one status type returned by this call.
|
listing_id | integer | The id of the listing you are bidding on. |
Example
The following example creates an order with four bids.
Request
POST <prosper_base_address>/orders/ Authorization: bearer <access_token> Accept: application/json Content-Type: application/json
Request body
{ "bid_requests": [ {"listing_id":215032, "bid_amount":32}, {"listing_id":215045, "bid_amount":45.53}, {"listing_id":215050, "bid_amount":50.10}, {"listing_id":215998, "bid_amount":98.09} ] }
Response
{ "order_id": “067e6162-3b6f-4ae2-a171-2470b63dff00”, "bid_requests": [ { "listing_id": 215032, "bid_status": "PENDING", "bid_amount": 32 }, { "listing_id": 215045, "bid_status": "PENDING", "bid_amount": 45.53 }, { "listing_id": 215050, "bid_status": "PENDING", "bid_amount": 50.10 }, { "listing_id": 215998, "bid_status": "PENDING", "bid_amount": 98.09 } ], "source": "API", "order_status": "IN_PROGRESS", "order_date": "2018-08-14 19:54:58 +0000" }
Retrieve details for a specific order or a group of orders – GET /orders/{order_id} and GET /orders/
Use the GET /orders/{order_id} method to retrieve the details of a given order.
Use the GET /orders/ method to retrieve the details for all of your orders.
Use these methods after placing orders to poll the details of the placed orders. This call will return the bid_status and bid_result of all bid requests within your order(s), along with the order_status of your order.
For a detailed explanation of order_status, bid_result, and bid_status changes during the life of an order, see “About order_status, bid_result, and bid_status changes” at the bottom of this page.
Example URIs:
GET <prosper_base_address>/orders/{order_id} Authorization: bearer <access_token> Accept: application/json
GET <prosper_base_address>/orders/ Authorization: bearer <access_token> Accept: application/json
HTTP Headers
Field name | Expected value | Required? |
Authorization | bearer <access_token> | Y |
Accept | application/json | Y |
timezone | By default, all dates returned in the response are in UTC format. However, you can specify the timezone in full format.
Examples: America/Los_Angeles |
N |
Query parameters
General parameters
Name | Description |
offset | Defaults to 0.
The starting listing within the query result set when paginating. When making calls that may return a large result set, it is beneficial to page the result set. By paginating your result set, you will get a much faster response than when requesting a larger, potentially large, data set for the limit value. Example: If your first call specifies an offset of 0, and a limit of 25, your second call would have an offset value of 25. Your third call would have an offset value of 50. Your fourth call would have an offset value of 75, and so forth. |
limit | Determines how many listings objects to return in the result set. There may be less remaining objects than the value you specify for the limit.
The default is 25. |
Other query parameters
Field name | Description |
order_id | The unique id of the order generated by Prosper once the order has been placed.
This parameter is only required when you want to retrieve a specific order. |
order response object elements
Name | Type | Description |
order_id | string | Unique id of the order |
order_date | date | The date this order was placed |
order_amount | date | The total amount of all bid_amount in the bid_requests |
order_amount_placed | date | The total amount of all bid_amount_placed in the bid_requests |
order_amount_invested | date | The total amount of all bid_amount_placed for INVESTED bid_requests |
bid_requests | object | Array of bids to place |
saved_search | object | Contains id and name of saved search |
order_status | string | The status of order; may be IN_PROGRESS or COMPLETED |
source | string | Originating system |
estimated_return | decimal | The estimated return of this order.
This element has been deprecated. This element will only be returned for orders containing listings with a start date (listing_start_date in the listings object) through August 8, 2018. |
estimated_loss | decimal | The estimated loss of this order
This element has been deprecated. This element will only be returned for orders containing listings with a start date (listing_start_date in the listings object) through August 8, 2018. |
effective_yield | decimal | The effective yield of this order
This element has been deprecated. This element will only be returned for orders containing listings with a start date (listing_start_date in the listings object) through August 8, 2018. |
bid_request response object elements
Name | Type | Description |
listing_id | string | The id of the Prosper listing the bid was placed |
bid_amount | decimal | Bid amount requested |
bid_amount_placed | decimal | Amount placed on the listing |
bid_status | string | Status of the bid. One of the following:
|
bid_result | string | Status result of the bid. Will be one of the following:
|
Examples
Example one
The following example returns the status for an order with id 90cf709d-81d6-416a-89f2-ba6ab8146ef2.
Request
GET <prosper_base_address>/orders/90cf709d-81d6-416a-89f2-ba6ab8146ef2 Authorization: bearer <user_access_token> Accept: application/json
Response
{ "order_id": "90cf709d-81d6-416a-89f2-ba6ab8146ef2", "bid_requests": [ { "listing_id": 2211270, "bid_amount": 100, "bid_status": "INVESTED", "bid_result": "BID_SUCCEEDED", "bid_amount_placed": 100 }, { "listing_id": 2166428, "bid_amount": 400, "bid_status": "EXPIRED", "bid_result": "PARTIAL_BID_SUCCEEDED", "bid_amount_placed": 120 } ], "order_amount": 500, "order_amount_placed": 220, "order_amount_invested": 100, "source", "API", "order_date": "2018-08-14 19:54:58 +0000", "order_status": "COMPLETED" }
Example two
The following example returns the status for all orders, limiting the response to two orders.
Request
GET <prosper_base_address>/orders/?limit=2 Authorization: bearer <user_access_token> Accept: application/json
Response
{ "result": [ { "order_id": "50e8ae5a-b4dd-47d9-b80a-83b3ded5ec7a", "bid_requests": [ { "listing_id": 2983301, "bid_amount": 40, "bid_status": "INVESTED", "bid_result": "BID_SUCCEEDED", "bid_amount_placed": 40 }], "order_amount": 40, "order_amount_placed": 40, "order_amount_invested": 40, "order_status": "COMPLETED", "source": "API", "order_date": "2018-08-14 21:05:19 -0500" }, { "order_id": "4c14efad-436a-4d94-a71d-d48d36535753", "bid_requests": [ { "listing_id": 2983301, "bid_amount": 40, "bid_status": "INVESTED", "bid_result": "BID_SUCCEEDED", "bid_amount_placed": 40 }], "order_amount": 40, "order_amount_placed": 40, "order_amount_invested": 40, "order_status": "COMPLETED", "source": "API", "order_date": "2018-08-14 21:05:18 -0500" } ], "result_count": 2, "total_count": 4307 }
Retrieve listings belonging to a specific order – GET /orders/{order_id}/listings
Use the GET /orders/{order_id}/listings method to retrieve the set of listings within an investment order. You can paginate the response for an order with a large amount of bid requests.
Example URI:
GET <prosper_base_address>/orders/{order_id}/listings Authorization: bearer <access_token> Accept: application/json
HTTP Headers
Field name | Expected value | Required? |
Authorization | bearer <access_token> | Y |
Accept | application/json | Y |
timezone | By default, all dates returned in the response are in UTC format. However, you can specify the timezone in full format.
Examples: America/Los_Angeles |
N |
Query parameters
General parameters
Name | Description |
offset | Defaults to 0.
The starting listing within the query result set when paginating. When making calls that may return a large result set, it is beneficial to page the result set. By paginating your result set, you will get a much faster response than when requesting a larger, potentially large, data set for the limit value. Example: If your first call specifies an offset of 0, and a limit of 25, your second call would have an offset value of 25. Your third call would have an offset value of 50. Your fourth call would have an offset value of 75, and so forth. |
limit | Determines how many listings objects to return in the result set. There may be less remaining objects than the value you specify for the limit.
The default is 100. The maximum is 100. |
sort_by | You can sort your search results by the following return fields, in ascending or descending order. Descriptions of these fields appear later in this page.
By default, the returned set of listings will be sorted by listing_number in descending order.
The possible values of the sort_by setting are:
Note: The sort order value (asc or desc) should be preceded by a space. Example one: To sort the listings returned in descending order by listing amount total, you would enter the following: Example two: Performing a multiple sort. To sort the listings by the term of the loan in ascending order and then by listing amount total in descending order, you would enter the following: GET /notes/?sort_by=loan_term_months asc&listing_amount desc |
Filterable fields
Filterable field | Filter type | Description |
status | exact match | The status of the listings within the order. The filter accepts the following values:
Examples |
orders/{order_id}/listings response object elements
Name | Type | Description |
listing_title | string | Title of the listing as customized by the applicant |
invested_amount | decimal | The total amount you have invested in the listing. If you have purchased more than one note on the listing, this is the total amount of all notes owned. |
listing_amount | decimal | Loan amount requested |
loan_term_months | integer | The number of months of the loan term. Can be one of the following values:
|
current_yield | decimal | |
amount_funded | decimal | Amount of the listing funded |
prosper_rating | string | Prosper rating of the listing for the loan at the time the listing was created. Possible values:
|
verification_stage | integer | Verification stage |
percent_funded | decimal | Percent of the listing that has been funded |
effective_yield | decimal | Effective yield – borrower interest rate minus service fee rate minus uncollected interest on charge-off estimate plus estimated collected late fees
This element has been deprecated. This element will only be returned for listings with a start date (listing_start_date in the listings object) through August 8, 2018. |
estimated_loss | decimal | Estimated loss rate
This element has been deprecated. This element will only be returned for listings with a start date (listing_start_date in the listings object) through August 8, 2018. |
estimated_return | decimal | Estimated return rate.
This element has been deprecated. This element will only be returned for listings with a start date (listing_start_date in the listings object) through August 8, 2018. |
historical_return | decimal | Average historical return for all loans within this Prosper rating expressed as a decimal. |
historical_return_10th_pctl | decimal | Average historical return for all loans within this Prosper rating at the 10th percentile mark, expressed as a decimal. |
historical_return_90th_pctl | decimal | Average historical return for all loans within this Prosper rating at the 90th percentile mark, expressed as a decimal. |
listing_duration | integer | The amount of days the listing will be active |
listing_number | string | Listing number as found on the Prosper site |
status | string | Possible values:
|
status_reason | string | A textual description corresponding to the status above. |
estimated_end_date | date | The estimated date at which the listing ends |
listing_status | integer | Where the listing is within the Prosper Marketplace listings lifecycle:·
|
start_date | date | Listing Start Date date format ‘yyyy-MM-dd’ Example: 2015-12-24 |
note_number | string | This element will only have a value for a listing whose order status is INVESTED. |
listing_category_id | integer | Broad Category of the Listing (numeric) |
listing_category_name | string | The listing category name associated with the listing_category_id described above. |
Example
The following example retrieves a single Prosper listing from the order with id 2412507.
Request
GET <prosper_base_address>/orders/2412507/listings/?offset=0&limit=1 Authorization: bearer <user_access_token> Accept: application/json
Response
{ "result":[ { "listing_title": "Motorcycle", "invested_amount": 25, "listing_amount": 4000, "loan_term_months": 36, "current_yield": 0.1501, "amount_funded": 3600, "prosper_rating": "AA", "verification_stage": 3, "percent_funded": 0.9, "historical_return": 0.04828, "historical_return_10th_pctl": 0.0363, "historical_return_90th_pctl": 0.06536, "listing_duration": 14, "listing_number": "123456", "status": "INVESTED", "listing_status_reason": "Loan Originated", "note_number": "90000000" } ], "result_count": 1, "total_count": 10 }
About order_status, bid_result, and bid_status changes
Let’s examine some orders to see how order_status, bid_result, and bid_status values change through the life of an investment order.
Simplest investment order case: An order containing only one bid request
You submit an investment order with a single bid on a listing for $25.00 You know your bid is successful when the bid_result value equals BID_SUCCEEDED. Having a bid_result value of BID_SUCCEEDED does not mean that you have successfully invested in the listing, only that the initial bid on the listing succeeded. Your order_status will now be IN_PROGRESS and will remain so until the bid_status changes from PENDING to either INVESTED or EXPIRED.
At this point, you must still wait for the loan listing to originate. Origination can take up to 14 days from the date the listing was posted, as Prosper borrower verification and funding occur.
What can happen to a listing during this waiting period?
- Listing is withdrawn – If the listing is withdrawn for any reason, such as the borrower deciding not to take the loan, the listing expiring before being fully funded, or Prosper cancels the listing due to borrower verification or other issues, the bid_status will become EXPIRED and the order_status will be COMPLETED.Note: Even if the listing expires, the bid_result can still be BID_SUCCEEDED, as the bid_result status only tells you that the initial bid was successful.
- Listing originates – Listing origination will only occur when the borrower has successfully passed the three stages of Prosper verification, and the listing has become at least 70% funded. During this time, the bid_status will remain in the PENDING state. When the listing originates, the bid_status will change to INVESTED and the order will be COMPLETED.
After loan origination, the bid_status value will change from PENDING to INVESTED, and your order will change from IN_PROGRESS to COMPLETED.
In short, bid_result has nothing to do with listing status changes, but bid_status does.
If you don’t successfully invest in the listing, the bid_result will tell you why, and the bid_status will become EXPIRED when the result is known.
Note: Unless it’s your intention, once you submit a bid, do not submit another bid on the same listing until you get an Order ID and can confirm your bid’s bid_result. A bid with a bid_result status of NONE is still waiting to be processed.
More complex investment order case: An order containing more than one bid request
Now we’ll look at a more complex example where multiple bids have been placed, each bid for a single listing.
Initial investment order
For this example, we’ll provide a diagram. In the diagram below, the original POST /orders/ API calls contains four bids on listings, totaling $125. Three bids are for $25, and one bid is for $50. The account starting balance is $500.00
Note that the diagram refers to email notifications being sent when the following occurs:
- Order validation results in an error
- Order is processed
- Order is complete
A Prosper investor must register to receive these email notifications on the Prosper settings page.
Basic order validation occurs on the order.
At this point, Prosper performs some basic order validation on the order.
If validation passes, you’ll receive a 200 response, and the order is queued for processing.
If validation fails, you will receive a 400 error, with error code and description. You can then fix the error and resubmit the order using another POST /orders/ method call.
Note: As soon as an error is located, the error will be returned.
Now the initial order_status for order “xyz” is IN_PROGRESS, the initial bid_status for all bids is PENDING, and the account balance is $375.00
A call to GET /orders/xyx will return the status on the order before order processing.
The investment order is processed
Now that the order has been processed, a call to GET/orders/xyz returns new bid_result and bid_status values for the four listings bids.
- Listing 11101 for $25: bid_result is LISTING_NOT_BIDDABLE, because the listing is no longer active.
- Listing 11102 for $25: bid_result is BID_SUCCEEDED and the bid_status is PENDING as the listing is in the borrower verification and funding stage waiting for origination.
- Listing 11103 for $25: bid_result is BID_SUCCEEDED. However, the bid_status is EXPIRED. It’s possible that the listing was cencelled because the borrower did not pass the verification process or for some other reason.
- Listing 11104 for $50: bid_result is PARTIAL_BID_SUCCEEDED and the bid_status is PENDING as the listing is in the borrower verification and funding stage waiting for origination. In this example, the listing only had $25 remaining to be fully funded. You’ll notice that the bid_amount_placed has been changed to $25 from the original bid request of $50.
A GET call to your Prosper account will return an account balance of $450.00, as only $50 from the original bid is still committed to PENDING investments.
The order_status is still IN_PROGESS awaiting loan origination on listings.
The investment order completes
When borrower verification on listings 11102 and 11104 completes, and the loans originate, another call to GET /orders/xyz returns new bid_result and bid_status values for the four listings bids.
- Listing 11101 for $25: bid_result is LISTING_NOT_BIDDABLE, because the listing is no longer active.
- Listing 11102 for $25: bid_result is BID_SUCCEEDED and the bid_status is INVESTED as the listing has originated. You invested $25 in listing 11102.
- Listing 11103 for $25: bid_result is BID_SUCCEEDED. However, the bid_status is EXPIRED. It’s possible that the listing was cancelled because the borrower did not pass the verification process or for some other reason.
- Listing 11104 for $50: bid_result is PARTIAL_BID_SUCCEEDED and the bid_status is INVESTED as the listing has originated. You invested $25 in listing 11104.
A GET call to your Prosper account will return an account balance of $450.00, as only $50 from the original bid request was INVESTED in listings.
The order_status is now COMPLETED as all listing bids have either EXPIRED or INVESTED.
Errors
The orders API returns the following errors.
Error Code | Error Description | HTTP Status code |
---|---|---|
ORD0001 | Could not find InvestmentOrder in database for InvestmentOrderId [order_id] | 404 |
ORD0002 | Order Id [order_id] could not be split into known format | 404 |
ORD0003 | Could not find listing for given listingId [listing_id] | 404 |
ORD0004 | Order [order_id] for investor [user_id] was already processed | 400 |
ORD0005 | Bid request with bidRequestId=[bid_request] on listing with listingId=[listing] has an invalid bidAmount=[bid_amount] | 400 |
ORD0006 | Invalid reference id specified: | 400 |
ORD0008 | Order [order_id] for investor [user_id] does not contain any bid requests | 400 |
ORD0009 | Bid request with bidRequestId=[bid_request] does not specify a valid listing with listingId=[listing_id] | 400 |
ORD0010 | Bid request [bid_request] already processed | 400 |
ORD0011 | Investor with userId=[user_id] cannot bid on their own listing with listingId=[listing_id] | 400 |
ORD0012 | Investor with userId=[user_id] must be a whole loan investor to bid on whole listing with listingID=[listing_id] | 400 |
ORD0013 | Listing with listingId=[listing_id] has ended; it ended at [listing_end_time] | 400 |
ORD0014 | Bid request [bid_request] with amount of [bid_amount] exceeds order max amount [max_amount] | 400 |
ORD0015 | The bid amount [bid_amount] is not valid with the amount [listing_amount_remaining] remaining on the listing | 400 |
ORD0016 | Investor with userId=[user_id] is not authorized to invest in this listing with listingId=[listing_id] | 400 |
ORD0017 | A whole loan listing [listing_id] cannot be partially funded | 400 |
ORD0018 | The whole loan listing [listing_id] with a bid amount of [bid_amount] is not equal to the whole loan | 400 |
ORD0019 | Listing [listing_id] is in status [listing_status] and cannot currently accept bids. | 400 |
ORD0020 | Listing with listingID=[listing_id] has not started; it starts at listingStartTime=[listing_start_time] | 400 |
ORD0021 | Insufficient funds: debiting $[debit_amount] from account # [account_id] | 400 |
ORD0022 | Investor [user_id] in state [state] for $[investment_amount] does not meet financial suitability requirements. | 400 |
ORD0024 | Invalid userId [user_id] for order [order_id] | 400 |
ORD0025 | Could not update listing [listing_id] to Pending Complete status | 500 |
ORD0026 | Could not update BidRequestId [request_id] to SUCCESSFUL | 500 |
ORD0027 | Error in creating a new bid | 500 |
ORD0029 | Order [order_id] for user [user_id] exceeds maximum allowed bid count with [bid_count_total] bids | 400 |
ORD0030 | Listing [listing_id] has multiple bids. | 400 |
ORD0032 | The investment order is invalid | 400 |
ORD0033 | The bid request is invalid | 400 |
ORD0034 | Order [order_id] for investor [user_id] does not have a valid total order amount | 400 |
ORD0035 | The ledger amount is invalid [ledger_amount] | 400 |
ORD0036 | Investor [user_id] is ineligible to bid on a fractional listing [listing_id] | 400 |
ORD0037 | Listing [listing_id] has a NULL Investment Type Id | 400 |
ORD0038 | You are not authorized to invest because you are not an active investor. Please contact Prosper support. | 400 |
ORD0039 | You are not authorized to invest because there are unsigned agreements. You must log in to prosper.com and sign them in My Account screen before you can invest. | 400 |
ORD0040 | You are not authorized to invest because you do not live in a state that allows investing through Prosper. | 400 |
ORD0041 | You are not authorized to invest because you have one or more loan delinquencies. | 400 |
ORD0042 | You are not authorized to invest. Before you can invest, you must verify your email through the link Prosper sent when you registered.
Note: This error will only be shown to users who have not verified their email within the first 3 days of registering for a Prosper investment account. Users who try to use the orders API after more than 3 days will not be able to log in at all. |
400 |