Create Portfolio

This subresource allows investors to create a new portfolio.

Operation: POST

URL: https://api.lendingclub.com/api/investor/<version>/accounts/<investor id>/portfolios

URL Parameters: Investor Id — This can be obtained from the Account Summary section on LendingClub website when a user is logged in.

Query Parameters: None.

Supported Formats: JSON

Request Payload: JSON request for create portfolio

NameTypeNullableDescription
actorId integer No The id of the investor account
portfolioName String No Portfolio name
portfolioDescription String Yes Portfolio description


Sample request —

            {
            	"actorId":11111,
            	"portfolioName":"Porfolio 1",
            	"portfolioDescription":"Sample description"
            }
            

Returned value: Successful execution of the call will result in a JSON response. Cases where the input is invalid (ex. Portfolio name not provided or a portfolio with the same name already exists) will result in a HTTP Response code 400 (Bad Request)

An appropriate error message will be communicated back as a JSON payload along with every response with HTTP Response code 400.

NameTypeNullableDescription
portfolioId integer No Portfolio Id
portfolioName String No Portfolio name
portfolioDescription String Yes Portfolio description


Sample Successful response —

            {
            	"portfolioId":22222,
            	"portfolioName":"Portfolio 1",
            	"portfolioDescription":"Sample description "
            }
            

Sample Error response —

            {
            	"errors":[
            	{
            		"field":" arg1.portfolioName",
            		"code":"validation-error",
            		"message":"Portfolio name not present."
            	}]
            }