ruby shell python java csharp

Introduction

The Vestorly API provides a REST API for developers to synchronize their data with Vestorly. Vestorly also provides an embedable widget and RSS feed generator API that can be used for higher-level integrations. Together these can be used for CRM integrations, news readers, content curation, analytics, web site integrations and compliance monitoring software.

Our REST API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like OAUTH2 authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients, and we support cross-origin resource sharing to allow you to interact securely with our API from a client-side web application (though you should remember that you should never expose your secret API key in any public website’s client-side code). JSON will be returned in all responses from the API, including errors.

Try in the API

 __   __      _           _
 \ \ / /__ __| |_ ___ _ _| |_  _
  \ V / -_|_-<  _/ _ \ '_| | || |
   \_/\___/__/\__\___/_| |_|\_, |
                            |__/

Helper Libraries

A handful of libraries are available and are community maintained. Some of these libraries are auto-generated.

In addition, Vestorly offers a WordPress Plugin, embedable and several open source libraries that may be of use.

Making Requests

Several general concepts to remember when using this API:

Response Types

For REST API calls, JSON is always returned.

General response data types returned from the APIs:

Errors

The Vestorly API Uses the following HTTP error codes.

Error Code Meaning
400 Bad Request – Your http request was bad
401 Unauthorized – Your API key is wrong
403 Forbidden – The http request is hidden for administrators only
404 Not Found – The specified http request could not be found
405 Method Not Allowed – You tried to access a http request with an invalid method
406 Not Acceptable – You requested a format that isn’t json
410 Gone – The http request has been removed from our servers
429 Too Many Requests – You’re requesting too many kittens! Slown down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

Authentication

Vestorly provides authentication via the following methods :

When calling Vestorly APIs, care should be made that the token is passed with each call. There are two types of tokens supported, either the legacy vestorly token issued through the sessions API, or the OAUTH2 token issued via the OAUTH 2 flows.

OAuth

Vestorly provides authentication through standard OAUTH2 flow. After authentication, an access_token value is generated and can be passed to all Vestorly API routes. Note these routes are supported for auth flows :

Currently, Authorization code, Client Credentials, and Password auth flows are supported.


require 'oauth2'

client_id     = '...' # your client's app key
client_secret = '...' # your client's app secret
redirect_uri  = 'https://myclient.contoso.com/oauth2/callback' # your client's redirect URL
site          = "https://www.vestorly.com"

client = OAuth2::Client.new(client_id, client_secret, :site => site)
client = OAuth2::Client.new(application_key, application_secret) do |b|
b.request :url_encoded
b.adapter :rack, Rails.application
end

auth_url = client.auth_code.authorize_url(:redirect_uri => redirect_uri)

code = "..." # code you got in the redirect uri
token = client.auth_code.get_token(code, :redirect_uri => redirect_uri)


curl -X POST -d "client_id=YOUR_APP_KEY&amp;client_secret=YOUR_APP_SECRET&amp;grant_type=password&amp;username=fooman@contoso.com&amp;password=asimplepassword" https://www.vestorly.com/oauth/token

{"access_token":"2b347981729837198798712398798792318312378097890713c079d19b66a1","token_type":"bearer","expires_in":8000,"scope":"public","created_at":1223123103}

curl -X GET https://www.vestorly.com/api/v2/sessions/ping_with_auth?access_token=2b347981729837198798712398798792318312378097890713c079d19b66a1

Legacy Authentication

Vestorly also provides legacy authentication through a standard sessions REST call. After authentication, a vestorly_auth token must be passed, rather than an access_token.


sign_in_api = VestorlyApi::SignIn.new('my@user.com', 'password')

begin
authentication_token = sign_in_api.sign_in # vestorly-auth
rescue VestorlyApi::Exceptions::InvalidSignInCredentials
# Do rescue stuff...
end

curl -X POST https://www.vestorly.com/api/v2/sessions
-d "username=USERNAME"
-d "password=PASSWORD"

Getting Setup

How to run Ruby

How to run Python

How to run Java

How to run C-Sharp

Sessions

Used for accessing user session data.

Try in the API:

login logout

Login

Before interacting with the API, you must login using a username and password to obtain an authentication key. In addition to the samples to the right, the login call has been included in all other samples.

require 'VestorlyApi'

# login
api = VestorlyApi::SessionsApi
response = api.login(USERNAME, PASSWORD)

pp response
import vestorly

# login
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi()
response =  api.login(**{'username':USERNAME, 'password':PASSWORD})

print response
// login
SessionsApi sessionsApi = new SessionsApi();
Session response = sessionsApi.login(USERNAME, PASSWORD);

System.out.println(response);
// login
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
vestorly.model.Session response = sessionsApi.Login(USERNAME, PASSWORD);

Console.WriteLine(response);
curl -X POST https://www.vestorly.com/api/v2/sessions -d "username=USERNAME" -d "password=PASSWORD"

Example Response

{"current_user":
  {"_id":"17389798172398719823","picture_url":null,"user_type":"Client","name":null,"username":"joe1@abc.com","first_name":null,"last_name":null,"unsubscribed":false,"preferences":null,"advisor":null},"current_credential":{}}

Logout

When you login, the server returns a Session object. Your vestorly_auth and id fields (which are needed for logout) can be retrieved as indicated in the samples to the right.

require 'VestorlyApi'

auth = NAMEOFYOURSESSION.vestorly_auth
id = NAMEOFYOURSESSION.current_user._id

# logout
api = VestorlyApi::SessionsApi
response = api.logout(auth, id)

pp response
import vestorly

auth = NAMEOFYOURSESSION.vestorly_auth
id = NAMEOFYOURSESSION.current_user._id

# logout
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
response =  api.logout(**{'vestorly_auth':auth, 'id':id})

print response

String auth = NAMEOFYOURSESSION.getVestorlyAuth();
String id = NAMEOFYOURSESSION.getCurrentUser().getID();

// logout
SessionsApi sessionsApi = new SessionsApi();
SessionLogoutResponse response = sessionsApi.logout(auth, id);

System.out.println(response);

String auth = NAMEOFYOURSESSION.vestorlyAuth;
String id = NAMEOFYOURSESSION.currentUser.id;

// logout
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
vestorly.model.SessionLogoutResponse response = sessionsApi.Logout(auth, id);

System.out.println(response);
curl -H "x-vestorly-auth:$auth_token" -X DELETE https://www.vestorly.com/api/v2/sessions/m

Example response:

{"message":"Successfully logged out."}

Advisors

An advisor is the admin of their customized Vestorly. They can curate personalized content, manage their content libraries and readers (members), and publish their content via email, social media, and their website.

Advisors store Account data for a Vestorly publishing account.

Try in the API:

findAdvisorByID

Find Advisor By ID

Once logged in with a valid sign_in object, you can retrieve an advisor’s information by passing in the sign_in object and the advisor’s ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print advisor information
api = VestorlyApi::AdvisorsApi
response = api.find_advisor_by_id(auth, ID)

pp response
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/advisors/<ADVISOR_ID>" --insecure
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi()
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print advisor information
api = vestorly.AdvisorsApi(api_client=client)
response = api.find_advisor_by_id(vestorly_auth=auth, id=response.current_user._id)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print advisor information
AdvisorsApi advisorsApi = new AdvisorsApi();
Advisor response = advisorsApi.findAdvisorByID(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print advisor information
vestorly.api.AdvisorsApi advisorsApi = new vestorly.api.AdvisorsApi();
vestorly.model.Advisor response = advisorsApi.FindAdvisorByID(auth, ID);
Console.WriteLine(response);

Members

A member is a prospective lead or client of an advisor; any consumer of the content published by the advisor. (note: this represents leads that may not have signed up on Vestorly). Each member receives personalized content based on the content library (group) they are assigned.

Try in the API:

findMembers findMemberByID createMember updateMemberByID

Find Members

Members can be indexed and displayed as a standard list. All members associated with the current advisor will be returned.

Obtain the list of members for the logged in advisor

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of members
api = VestorlyApi::MembersApi
response = api.find_members(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of members
api = vestorly.MembersApi(api_client=client)
response = api.find_members(vestorly_auth=auth)
for member in response.members:
    print member
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of members
MembersApi membersApi = new MembersApi();
Members response = membersApi.findMembers(auth);
for (Member member : response.getMembers()) {
    System.out.println(member);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of members
vestorly.api.MembersApi membersApi = new vestorly.api.MembersApi();
vestorly.model.Members response = membersApi.FindMembers(auth);
foreach (vestorly.model.Member member in response.members) {
  Console.WriteLine(member);
}
curl -X GET "https://www.vestorly.com/api/v2/members.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Member By ID

We can search for a specific member using their ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print member information
api = VestorlyApi::MembersApi
response = api.find_member_by_id(ID, auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print member information
api = vestorly.MembersApi(api_client=client)
response = api.find_member_by_id(vestorly_auth=auth, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print member information
MembersApi membersApi = new MembersApi();
Memberresponse response = membersApi.findMemberByID(ID, auth);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print member information
vestorly.api.MembersApi membersApi = new vestorly.api.MembersApi();
vestorly.model.Memberresponse response = membersApi.FindMemberByID(ID, auth);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/members/<MEMBER_ID>" --insecure

Create Member

We can create a new member and upload them to the database. The fields below are the fields of the Member object that the user can set. Non-required fields are optional.

Field Type Required Notes
_id string false -
email string true -
first_name string false -
last_name string false -
phone string false -
address string false -
city string false -
state string false -
zip string false -
gender string false -
interest_consultation string false -
interest_in_new_advisor string false -
assets string false -
age string false -
data_estimated boolean false -
education string false -
high_net_worth boolean false -
home_market_value string false -
home_owner_status string false -
household_income string false -
marital_status string false -
occupation string false -
hometown string false -
family string false -
tags array[string] false -
subscribed_group_ids array[string] false -
unsubscribed boolean false -
unsubscribed_date boolean false -
user_type string false -
signed_up_with string false -
message string false -
location string false -
picture_url string false -
profile_url string false -
estimated_location string false -
estimated_zip string false -
register_ip_addr string false -
genuine_email boolean false -
last_active_date string false -
is_client boolean false -
is_hidden boolean false -
invited_on string false -
invited_by string false -
portfolio_size string false -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# create a member
api = VestorlyApi::MembersApi
memberInput = VestorlyApi::Member.new
memberInput.email = "EMAIL" # Set any other fields you want here; these are mandatory
response = api.create_member(auth, memberInput)
pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# create a member
api = vestorly.MembersApi(api_client=client)
memberInput = vestorly.Member()
memberInput.email = "EMAIL" # Set any other fields you want here; this is mandatory
response = api.create_member(vestorly_auth=auth, member=memberInput)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// create a member
MembersApi membersApi = new MembersApi();
Member member = new Member();
member.setEmail(EMAIL); // Set any other fields you want here; this is mandatory
Memberresponse response = membersApi.createMember(auth, member);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// create a member
vestorly.model.MembersApi membersApi = new vestorly.model.MembersApi();
vestorly.model.Member member = new vestorly.model.Member();
member.email = (EMAIL); // Set any other fields you want here; this is mandatory
vestorly.model.Memberresponse response = membersApi.CreateMember(auth, member);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X POST 'https://www.vestorly.com/api/v2/members' -d '{"member":{"email":"thisisnemail@gmail.com","first_name":"FIRSTNAME","last_name":"LASTNAME"}}'

Update Member By ID

We can update a member by referencing their ID. See the Create Member documentation for a list of fields that you can set when updating a member. (Note: no fields are mandatory when updating a member)

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# update a member
api = VestorlyApi::MembersApi
memberInput = VestorlyApi::Member.new
# Set fields you want updated
response = api.update_member_by_id(ID, auth, memberInput)
pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print member information
api = vestorly.MembersApi(api_client=client)
memberInput = vestorly.Member()
# Set fields you want updated
response = api.update_member_by_id(vestorly_auth=auth, member=memberInput, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print member information
MembersApi membersApi = new MembersApi();
Member member = new Member();
// Set fields you want updated
Memberresponse response = membersApi.updateMemberByID(auth, member);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print member information
vestorly.api.MembersApi membersApi = new vestorly.api.MembersApi();
vestorly.model.Member member = new vestorly.model.Member();
// Set fields you want updated
vestorly.model.Memberresponse response = membersApi.UpdateMemberByID(auth, member);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X PUT "https://www.vestorly.com/api/v2/members/<MEMBER_ID>" -d '{"city":"NEW CITY","address":"NEW ADDRESS"}'

Articles

Articles are shared pieces of content that can be reused between multiple advisor accounts. Articles can contain a diverse set of content from PDFs, external blog sites, etc. Articles become Posts when an advisor chooses to publish them to his/her content library (group).

Try in the API:

findArticles findArticleByID

Find Articles

We can extract all articles by omitting all parameters other than the vestorlyAuth paramater. Specific articles can be searched for using the textQuery parameter. The articles can be sorted by the fields of the Article model; useful fields to sort by are title, topic, and suitabilityScore. The suitabilityScore field indicates which articles are trending. (Note: ruby and python use underscores in contrast to java’s camel case for parameters, fields, and methods. This means that suitabilityScore would translate to suitability_score)

Parameter Type Required Description
vestorlyAuth string true Vestorly Auth Token
limit integer false Limit on the number of articles to return
textQuery string false Search query parameter
sortDirection string false Direction of sort (used with sortBy parameter). Value should be “asc” or “desc”.
sortBy string false Field on model to sort by
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print a list of articles
api = VestorlyApi::ArticlesApi
response = api.find_articles(auth)
pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print member information
api = vestorly.ArticlesApi(api_client=client)
response = api.find_articles(vestorly_auth=auth)
for article in response.articles:
    print article
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print member information
ArticlesApi articlesApi = new ArticlesApi();
// vestorlyAuth param is mandatory, others can be null
Articles response = articlesApi.findArticles(auth, null, null, null, null);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print member information
vestorly.api.ArticlesApi articlesApi = new vestorly.api.ArticlesApi();
// vestorlyAuth param is mandatory, others can be null
vestorly.model.Articles response = articlesApi.FindArticles(auth, null, null, null, null);
Console.WriteLine(response);
curl -X GET "https://www.vestorly.com/api/v2/articles.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Article By ID

We can search for a specific article using its unique ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print a list of articles
api = VestorlyApi::ArticlesApi
response = api.find_article_by_id(auth, ID)
pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print member information
api = vestorly.ArticlesApi(api_client=client)
response = api.find_article_by_id(vestorly_auth=auth, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print member information
ArticlesApi articlesApi = new ArticlesApi();
Articleresponse response = articlesApi.findArticleByID(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print member information
vestorly.api.ArticlesApi articlesApi = new vestorly.api.ArticlesApi();
vestorly.model.Articleresponse response = articlesApi.FindArticleByID(auth, ID);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/articles/<ARTICLES_ID>" --insecure

Posts

Represents an individual article or blog post that is displayed with an advisor’s content page.

Try in the API:

findPosts createPost getPostByID updatePostByID

Find Posts

Posts can be indexed and displayed as a standard list. If vestorlyAuth is the only parameter passed in, then the api will return all posts. Additionally, the list can be filtered or searched through using the parameters below.

Parameter Type Required Description
vestorlyAuth string true Vestorly Auth Token
textQuery string false Search query parameter
externalUrl string false Filter posts by url
isPublished string false Can have a value of 'true’ or 'false’, or no value at all. Without a value, both published and unpublished posts will be returned.
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of posts
api = VestorlyApi::PostsApi
response = api.find_posts(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of posts
api = vestorly.PostsApi(api_client=client)
response = api.find_posts(vestorly_auth=auth)
for post in response.posts:
    print post
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of posts
PostsApi postsApi = new PostsApi();
Posts response = postsApi.findPosts(auth);
for (Post post : response.getPosts()) {
    System.out.println(post);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of posts
vestorly.api.PostsApi postsApi = new vestorly.api.PostsApi();
vestorly.model.Posts response = postsApi.FindPosts(auth);
foreach (vestorly.model.Post post in response.posts) {
  Console.WriteLine(post);
}
curl -X GET "https://www.vestorly.com/api/v2/posts.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Post By ID

We can search for a specific post using its unique ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print post information
api = VestorlyApi::PostsApi
response = api.get_post_by_id(auth, ID)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print post information
api = vestorly.PostsApi(api_client=client)
response = api.get_post_by_id(vestorly_auth=auth, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print post information
PostsApi postsApi = new PostsApi();
Postresponse response = postsApi.getPostByID(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print post information
vestorly.api.PostsApi postsApi = new vestorly.api.PostsApi();
vestorly.model.Postresponse response = postsApi.GetPostByID(auth, ID);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/posts/<POST_ID>" --insecure

Create Post

You can create your own Post or publish an article into a Post. By Publishing a Post, it becomes part of advisor’s content library and gets exposed to the Advisors’s Members, so they can read and share that content. The fields below can be set before creating a post; only those marked required have to be set for the create post call to succeed.

Field Type Required Notes
created_at string false -
updated_at string false -
external_url string false -
external_url_source string false -
external_url_type string false -
image_path string false -
image_url string false -
image_height string false -
image_width string false -
logo_url string false -
square_logo_url string false -
needs_sanitize string false -
summary string false -
topic string false -
approval_status string false -
approval_transactions array[string] false -
group_ids array[string] false -
slug string false -
article_id string false -
comment string false -
newsletter_ids array[string] false -
is_featured boolean false -
advisor_id string false -
is_published boolean false -
is_responsive boolean false -
is_proxy_needed boolean false -
is_mobile_proxy_needed boolean false -
proxy_url string false -
video string false -
pdf_attachment_url string false -
post_date string true -
display_date string false -
suitability_score string false -
video_id string false -
display_tag string false -
display_summary string false -
vestorly_url string false -
title string true -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# create a post
api = VestorlyApi::PostsApi
postInput = VestorlyApi::PostInput.new
# Set any other fields you want here; these are mandatory
postInput.title = "TITLE" 
postInput.post_date = "POST DATE"
response = api.create_post(auth, postInput)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# create a post
api = vestorly.PostsApi(api_client=client)
postInput = vestorly.PostInput()
# Set any other fields you want here; these are mandatory
postInput.title = "TITLE" 
postInput.post_date = "POST DATE"
response = api.create_post(vestorly_auth=auth, post=postInput)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// create a post
PostsApi postsApi = new PostsApi();
PostInput postInput = new PostInput();
// Set any other fields you want here; this is mandatory
postInput.setTitle("TITLE");
postInput.setPostDate("POST DATE");
Postresponse response = postsApi.createPost(auth, postInput);

System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// create a post
vestorly.api.PostsApi postsApi = new vestorly.api.PostsApi();
vestorly.model.PostInput postInput = new vestorly.model.PostInput();
// Set any other fields you want here; this is mandatory
postInput.title = ("TITLE");
postInput.postDate = ("POST DATE");
vestorly.model.Postresponse response = postsApi.CreatePost(auth, postInput);

Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token"  \
-H "Content-Type: application/json" \
-X POST 'https://www.vestorly.com/api/v2/posts' \
-d '{"post":{"article_id":null,"body":null,"comment":"Hello World","created_at":"2015-04-03T15:18:14.069Z","display_tag":null,"display_summary":null,"external_url":null,"external_url_type":null,"external_url_source":"custom-content","image_url":null,"image_height":null,"image_path":null,"image_width":null,"is_featured":false,"is_responsive":false,"logo_url":null,"square_logo_url":null,"needs_sanitize":false,"post_date":"2015-04-03T15:18:14.059Z","proxy_url":null,"slug":null,"suitability_score":null,"summary":null,"title":"My Test Post","video_id":null,"is_proxy_needed":false,"is_mobile_proxy_needed":false,"approval_status":"not_required","group_ids":["GROUPID"],"newsletter_ids":[]}}'

Example Response:

{"post":{"_id":"551eb12590a0ece31800000c","body":null,"created_at":"2015-04-03T15:26:29Z","external_url":null,"external_url_source":"custom-content","external_url_type":"basic","image_path":null,"image_url":null,"image_height":null,"image_width":null,"logo_url":null,"square_logo_url":null,"needs_sanitize":false,"summary":"","title":"My Test Post","topic":null,"approval_status":"not_required","group_ids":["551ad323c98f132913000050"],"slug":"my-test-post-1","article_id":null,"comment":"Hello World","newsletter_ids":[],"is_featured":false,"advisor_id":"551ad2edc98f134364000044","is_published":true,"is_responsive":false,"is_proxy_needed":false,"is_mobile_proxy_needed":false,"proxy_url":"http://contoso.com","video":null,"pdf_attachment_url":null,"post_date":"2015-04-03T15:18:14+00:00","suitability_score":null,"video_id":"","display_tag":null,"display_summary":"Hello World"}}

Update Post By ID

We can update a post by referencing its unique ID. See the Create Post documentation for a list of fields that you can set when updating a post. (Note: no fields are mandatory when updating a post)

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# update a post
api = VestorlyApi::PostsApi
postUpdate = VestorlyApi::Post.new
# Set fields you want updated here
response = api.update_post_by_id(auth, ID, postUpdate)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# update a post
api = vestorly.PostsApi(api_client=client)
postUpdate = vestorly.Post()
# Set fields you want updated here
response = api.update_post_by_id(vestorly_auth=auth, post=postUpdate, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// update a post
PostsApi postsApi = new PostsApi();
Post postUpdate = new Post();
// Set fields you want updated
Postresponse response = postsApi.updatePostByID(auth, ID, postUpdate);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// update a post
vestorly.api.PostsApi postsApi = new vestorly.api.PostsApi();
vestorly.model.Post postUpdate = new vestorly.model.Post();
// Set fields you want updated
vestorly.model.Postresponse response = postsApi.UpdatePostByID(auth, ID, postUpdate);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X PUT "https://www.vestorly.com/api/v2/posts/<POST_ID>" -d '{"summary":"UPDATED SUMMARY","topic":"UPDATED TOPIC"}'

Sources

Any content library that is organized and curated within Vestorly can be exported and used as an RSS feed within other sites.

Try in the API:

createSource getSourceByID UpdateSourceByID findSources

Find Sources

Sources can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of sources
api = VestorlyApi::SourcesApi
response = api.find_sources(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of posts
api = vestorly.SourcesApi(api_client=client)
response = api.find_sources(vestorly_auth=auth)
for source in response.sources:
    print source
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of posts
SourcesApi sourcesApi = new SourcesApi();
Sources response = sourcesApi.findSources(auth);
for (Source source : response.getSources()) {
    System.out.println(source);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of posts
vestorly.api.SourcesApi sourcesApi = new vestorly.api.SourcesApi();
vestorly.model.Sources response = sourcesApi.FindSources(auth);
foreach (vestorly.model.Source source in response.sources) {
  Console.WriteLine(source);
}
curl -X GET "https://www.vestorly.com/api/v2/sources.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Source By ID

We can search for a specific source using its unique ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print source information
api = VestorlyApi::SourcesApi
response = api.get_source_by_id(auth, ID)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print post information
api = vestorly.SourcesApi(api_client=client)
response = api.get_source_by_id(vestorly_auth=auth, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print post information
SourcesApi sourcesApi = new SourcesApi();
Source response = sourcesApi.getSourceByID(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print post information
vestorly.api.SourcesApi sourcesApi = new vestorly.api.SourcesApi();
vestorly.model.Source response = sourcesApi.GetSourceByID(auth, ID);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/sources/<SOURCE_ID>" --insecure

Create Source

You can create your own source. The fields below refer to fields of the SourceInput model. All non-required fields are optional.

Field Type Required Notes
name string true Note: name must be unique for call to succeed
url string true -
logo_url string false -
enabled boolean false -
custom_rss_feed boolean false -
rss_publisher string true -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# create a source
api = VestorlyApi::SourcesApi
sourceInput = VestorlyApi::SourceInput.new
# Set any other fields you want here; these are mandatory
sourceInput.name = "NAME" 
sourceInput.rss_publisher = "RSS PUBLISHER"
sourceInput.url = "URL"
response = api.create_source(auth, sourceInput)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# create a source
api = vestorly.SourcesApi(api_client=client)
sourceInput = vestorly.SourceInput()
# Set any other fields you want here; these are mandatory
sourceInput.name = "NAME" 
sourceInput.rss_publisher = "RSS PUBLISHER"
sourceInput.url = "URL"
response = api.create_source(vestorly_auth=auth, source=sourceInput)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// create a source
SourcesApi sourcesApi = new SourcesApi();
SourceInput sourceInput = new SourceInput();
// Set any other fields you want here; these are mandatory
source.setName("NAME");
source.setRssPublisher("RSS PUBLISHER");
source.setUrl("URL");
Sourceresponse response = sourcesApi.createSource(auth, sourceInput);

System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// create a source
vestorly.api.SourcesApi sourcesApi = new vestorly.api.SourcesApi();
vestorly.model.SourceInput sourceInput = new vestorly.model.SourceInput();
// Set any other fields you want here; these are mandatory
source.name = ("NAME");
source.rssPublisher = ("RSS PUBLISHER");
source.url = ("URL");
vestorly.model.Sourceresponse response = sourcesApi.CreateSource(auth, sourceInput);

Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token"  \
-H "Content-Type: application/json" \
-X POST 'https://www.vestorly.com/api/v2/sources' \
-d '{"source":{"name":"iReport","category":null,"enabled":true,"is_responsive":false,"rss_publisher":"CNN1","url":"http://rss.ireport.com/feeds/oncnn.rss","logo_url":null,"article_count":null,"has_paywall":false,"custom_rss_feed":true,"crawling":false}}'

Update Source By ID

We can update a source by referencing its unique ID. See the Create Source documentation for a list of fields that you can set when updating a source. (Note: no fields are mandatory when updating a source)

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# update a source
api = VestorlyApi::SourcesApi
sourceUpdate = VestorlyApi::SourceInput.new
# Set fields you want updated here
response = api.update_source_by_id(auth, ID, sourceUpdate)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# update a source
api = vestorly.SourcesApi(api_client=client)
sourceUpdate = vestorly.SourceInput()
# Set fields you want updated here
response = api.update_source_by_id(vestorly_auth=auth, source=sourceUpdate, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// update a source
SourcesApi sourcesApi = new SourcesApi();
SourceInput sourceUpdate = new SourceInput();
// Set fields you want updated
Sourceresponse response = sourcesApi.updateSourceByID(auth, ID, sourceUpdate);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// update a source
vestorly.api.SourcesApi sourcesApi = new vestorly.api.SourcesApi();
vestorly.model.SourceInput sourceUpdate = new vestorly.model.SourceInput();
// Set fields you want updated
vestorly.model.Sourceresponse response = sourcesApi.UpdateSourceByID(auth, ID, sourceUpdate);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X PUT "https://www.vestorly.com/api/v2/sources/<SOURCE_ID>" -d '{"logo_url":"NEW LOGO URL","custom_rss_feed":"NEW CRF"}'

Events

Create or View events.

Members’ actions in Vestorly are captured as events. Some examples of events include signing up to view, sharing content, and viewing content.

Try in the API:

findEvents findEventByID createEvent

Find Events

Events can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of events
api = VestorlyApi::EventsApi
response = api.find_events(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of events
api = vestorly.EventsApi(api_client=client)
response = api.find_events(vestorly_auth=auth)
for event in response.events:
    print event
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of events
EventsApi eventsApi = new EventsApi();
Events response = eventsApi.findEvents(auth);
for (Event event : response.getEvents()) {
    System.out.println(event);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of events
vestorly.api.EventsApi eventsApi = new vestorly.api.EventsApi();
vestorly.model.Events response = eventsApi.FindEvents(auth);
foreach (vestorly.model.Event event in response.events) {
  Console.WriteLine(event);
}
curl -X GET "https://www.vestorly.com/api/v2/events.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Event By ID

We can also search for a specific event using its ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print event information
api = VestorlyApi::EventsApi
response = api.find_event_by_id(ID, auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print event information
api = vestorly.EventsApi(api_client=client)
response = api.find_event_by_id(vestorly_auth=auth, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print event information
EventsApi eventsApi = new EventsApi();
Eventresponse response = sourcesApi.findEventByID(ID, auth);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print event information
vestorly.api.EventsApi eventsApi = new vestorly.api.EventsApi();
vestorly.model.Eventresponse response = sourcesApi.FindEventByID(ID, auth);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/events/<EVENT_ID>" --insecure

Create Event

Creating events allows us to track user behavior across Vestorly and external systems. The fields below are the fields of the EventInput object that the user can set. Non-required fields are optional.

Field Type Required Notes
type string false -
referer string false -
original_url string false -
originator_email string false -
subject_email string false -
parent_event_id string false -
originator_id string false -
advisor_id string false -
subject_id string false -
event_content EventContent false -
created_at string false -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# create an event
api = VestorlyApi::EventsApi
eventInput = VestorlyApi::EventInput.new
# Set any other fields you want here
response = api.create_event(auth, eventInput)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# create an event
api = vestorly.SourcesApi(api_client=client)
eventInput = vestorly.EventInput()
# Set any other fields you want here
response = api.create_event(vestorly_auth=auth, event=eventInput)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// create an event
EventsApi eventsApi = new EventsApi();
EventInput eventInput = new EventInput();
// Set any other fields you want here
Eventcreateresponse response = eventsApi.createEvent(auth, eventInput);

System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// create an event
vestorly.api.EventsApi eventsApi = new vestorly.api.EventsApi();
vestorly.model.EventInput eventInput = new vestorly.model.EventInput();
// Set any other fields you want here
vestorly.model.Eventcreateresponse response = eventsApi.CreateEvent(auth, eventInput);

Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -X POST "https://www.vestorly.com/api/v2/events" -d '{"event":{"type":"page_view","source":null,"parent_event_id":null,"context":"members-report","created_at":null,"advisor_id":"joeadvisor"},"advisor_id":"21389312331000013"}'

Groups

Groups are specifically connected with content libraries and control which Posts content is displayed within an advisor’s Vestorly.

Try in the API:

findGroups findGroupByID createGroup updateGroupById deleteGroup

Find Groups

Groups can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of groups
api = VestorlyApi::GroupsApi
response = api.find_groups(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of groups
api = vestorly.GroupsApi(api_client=client)
response = api.find_groups(vestorly_auth=auth)
for group in response.groups:
    print group
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of groups
GroupsApi groupsApi = new GroupsApi();
Groups response = groupsApi.findGroups(auth);
for (Group group : response.getGroups()) {
    System.out.println(group);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of groups
vestorly.api.GroupsApi groupsApi = new vestorly.api.GroupsApi();
vestorly.model.Groups response = groupsApi.FindGroups(auth);
foreach (vestorly.model.Group group in response.groups) {
  Console.WriteLine(group);
}
curl -X GET "https://www.vestorly.com/api/v2/groups.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Group By ID

We can also search for a specific group using its ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print group information
api = VestorlyApi::GroupsApi
response = api.find_group_by_id(auth, ID)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print group information
api = vestorly.GroupsApi(api_client=client)
response = api.find_group_by_id(vestorly_auth=auth, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print group information
GroupsApi groupsApi = new GroupsApi();
Groupresponse response = groupsApi.findGroupByID(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print group information
vestorly.api.GroupsApi groupsApi = new vestorly.api.GroupsApi();
vestorly.model.Groupresponse response = groupsApi.FindGroupByID(auth, ID);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/groups/<GROUP_ID>" --insecure

Create Group

You can create your own group. The fields below are the fields of the GroupInput object that the user can set. Non-required fields are optional.

Field Type Required Notes
_id string false -
name string true -
is_default boolean false -
is_hidden boolean false -
new_weekly_mailer_content string false -
newsletter_subject string false -
autopublish boolean false -
number_articles_per_group int false -
number_articles_per_newsletter int false -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# create a group
api = VestorlyApi::GroupsApi
groupInput = VestorlyApi::GroupInput.new
# Set any other fields you want here
response = api.create_group(auth, groupInput)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# create a group
api = vestorly.GroupsApi(api_client=client)
groupInput = vestorly.GroupInput()
# Set any other fields you want here
response = api.create_post(vestorly_auth=auth, group=groupInput)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// create a group
GroupsApi groupsApi = new GroupsApi();
GroupInput groupInput = new GroupInput();
// Set any other fields you want here
Groupresponse response = groupsApi.createGroup(auth, groupInput);

System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// create a group
vestorly.api.GroupsApi groupsApi = new vestorly.api.GroupsApi();
vestorly.model.GroupInput groupInput = new vestorly.model.GroupInput();
// Set any other fields you want here
vestorly.model.Groupresponse response = groupsApi.CreateGroup(auth, groupInput);

Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X POST 'https://www.vestorly.com/api/v2/groups' -d '{"group":{"name":"NAMEHERE","is_default":"false","is_hidden":"false"}}'

Update Group By ID

We can update a group by referencing its unique ID. See the Create Group documentation for a list of fields that you can set when updating a group. (Note: no fields are mandatory when updating a group)

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# update a group
api = VestorlyApi::GroupsApi
groupUpdate = VestorlyApi::GroupInput.new
# Set fields you want updated here
response = api.update_group_by_id(auth, ID, groupUpdate)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# update a group
api = vestorly.GroupsApi(api_client=client)
groupUpdate = vestorly.GroupUpdate()
# Set fields you want updated here
response = api.update_group_by_id(vestorly_auth=auth, group=groupUpdate, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// update a group
GroupsApi groupsApi = new GroupsApi();
GroupInput groupUpdate = new GroupInput();
// Set fields you want updated
Groupresponse response = groupsApi.updateGroupById(auth, ID, groupUpdate);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// update a group
vestorly.api.GroupsApi groupsApi = new vestorly.api.GroupsApi();
vestorly.model.GroupInput groupUpdate = new vestorly.model.GroupInput();
// Set fields you want updated
vestorly.model.Groupresponse response = groupsApi.UpdateGroupById(auth, ID, groupUpdate);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X PUT "https://www.vestorly.com/api/v2/groups/<GROUP_ID>" -d '{"is_default":"true","is_hidden":"true","newsletter_subject":"MY SUBJECT"}'

Delete Group

We can delete a group.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# delete a group
api = VestorlyApi::GroupsApi
response = api.delete_group(auth, ID)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# delete a group
api = vestorly.GroupsApi(api_client=client)
response = api.delete_group(vestorly_auth=auth, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// delete a group
GroupsApi groupsApi = new GroupsApi();
Groupresponse response = groupsApi.deleteGroup(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// delete a group
vestorly.api.GroupsApi groupsApi = new vestorly.api.GroupsApi();
vestorly.model.Groupresponse response = groupsApi.DeleteGroup(auth, ID);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -X DELETE "https://www.vestorly.com/api/v2/groups/<GROUP_ID>"

Newsletters

Newsletters allow users to schedule and create special roundups that can be sent out via email or social media.

Try in the API:

findNewsletters getNewsletterByID updateNewsletter

Find Newsletters

Newsletters can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of newsletters
api = VestorlyApi::NewslettersApi
response = api.find_newsletters(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of newsletters
api = vestorly.NewslettersApi(api_client=client)
response = api.find_newsletters(vestorly_auth=auth)
for newsletter in response.newsletters:
    print newsletter
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of newsletters
NewslettersApi newslettersApi = new NewslettersApi();
Newsletters response = newslettersApi.findNewsletters(auth);
for (Newsletter newsletter : response.getNewsletters()) {
    System.out.println(newsletter);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of newsletters
vestorly.api.NewslettersApi newslettersApi = new vestorly.api.NewslettersApi();
vestorly.mode.Newsletters response = newslettersApi.FindNewsletters(auth);
foreach (vestorly.model.Newsletter newsletter in response.newsletters) {
  Console.WriteLine(newsletter);
}
curl -X GET "https://www.vestorly.com/api/v2/newsletters.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Newsletter By ID

We can also search for a specific newsletter using its ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print newsletter information
api = VestorlyApi::NewslettersApi
response = api.get_newsletter_by_id(auth, ID)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print newsletter information
api = vestorly.NewslettersApi(api_client=client)
response = api.get_newsletters_by_id(vestorly_auth=auth, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print newsletter information
NewslettersApi newslettersApi = new NewsletterApi();
Newsletterresponse response = newslettersApi.getNewsletterByID(auth, ID);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print newsletter information
vestorly.api.NewslettersApi newslettersApi = new vestorly.api.NewsletterApi();
vestorly.model.Newsletterresponse response = newslettersApi.GetNewsletterByID(auth, ID);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/newsletters/<NEWSLETTER_ID>" --insecure

Update Newsletter By ID

We can update a newsletter by referencing its unique ID. The fields below are the fields of the NewsletterInput object that the user can set. Non-required fields are optional.

Field Type Required Notes
is_sent boolean false -
is_default boolean false -
click_count int false -
unique_click_count int false -
total_click_count int false -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# update a newsletter
api = VestorlyApi::NewslettersApi
newsletterUpdate = VestorlyApi::NewsletterInput.new
# Set fields you want updated here
response = api.update_newsletter_by_id(auth, ID, newsletterUpdate)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# update a newsletter
api = vestorly.NewslettersApi(api_client=client)
newslettersUpdate = vestorly.NewsletterInput()
# Set fields you want updated here
response = api.update_newsletter_by_id(vestorly_auth=auth, newsletter=newsletterUpdate, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// update a newsletter
NewslettersApi newslettersApi = new NewslettersApi();
NewsletterInput newsletterUpdate = new NewsletterInput();
// Set fields you want updated
Newsletterreponse response = newslettersApi.updateNewsletterByID(auth, ID, newsletterUpdate);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// update a newsletter
vestorly.api.NewslettersApi newslettersApi = new vestorly.api.NewslettersApi();
vestorly.model.NewsletterInput newsletterUpdate = new vestorly.model.NewsletterInput();
// Set fields you want updated
vestorly.model.Newsletterreponse response = newslettersApi.UpdateNewsletterByID(auth, ID, newsletterUpdate);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X PUT "https://www.vestorly.com/api/v2/newsletters/<NEWSLETTER_ID>" -d '{"is_default":"true","click_count":"234234232"}'

Newsletter Settings

Newsletters allow users to schedule and create special roundups that can be sent out via email or social media. You can adjust the settings associated with newsletters using the API calls outlined below.

Try in the API:

findNewsletters getNewsletterByID updateNewsletter

Find Newsletter Settings

Newsletter Settings can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of newsletter settings
api = VestorlyApi::NewslettersettingsApi
response = api.find_newsletter_settings(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of newsletter settings
api = vestorly.NewslettersettingsApi(api_client=client)
response = api.find_newsletter_settings(vestorly_auth=auth)
for newslettersetting in response.newsletter_settings:
    print newsletter
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of newsletter settings
NewslettersettingsApi newslettersettingsApi = new NewslettersettingsApi();
NewsletterSettings response = newslettersettingsApi.findNewsletterSettings(auth);
for (Newslettersetting newslettersetting : response.getNewsletterSettings()) {
    System.out.println(newslettersetting);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of newsletter settings
vestorly.model.NewslettersettingsApi newslettersettingsApi = new vestorly.model.NewslettersettingsApi();
vestorly.model.NewsletterSettings response = newslettersettingsApi.FindNewsletterSettings(auth);
foreach (vestorly.model.Newslettersetting newslettersetting in response.newsletterSettings) {
  Console.WriteLine(newslettersetting);
}
curl -X GET "https://www.vestorly.com/api/v2/newsletter_settings.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Find Newsletter Setting By ID

We can also search for a specific set newsletter settings using their unique ID.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print newsletter settings information
api = VestorlyApi::NewslettersettingsApi
response = api.find_newsletter_settings_by_id(ID, auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print newsletter settings information
api = vestorly.NewslettersettingsApi(api_client=client)
response = api.find_newsletter_settings_by_id(vestorly_auth=auth, id=ID)
print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print newsletter settings information
NewslettersettingsApi newslettersettingsApi = new NewslettersettingsApi();
Newslettersettingresponse response = newslettersApi.findNewsletterSettingsByID(ID, auth);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print newsletter settings information
vestorly.api.NewslettersettingsApi newslettersettingsApi = new vestorly.api.NewslettersettingsApi();
vestorly.model.Newslettersettingresponse response = newslettersApi.FindNewsletterSettingsByID(ID, auth);
Console.WriteLine(response);
curl -H "x-vestorly-auth:$auth_token" -X GET "https://www.vestorly.com/api/v2/newsletter_settings/<NEWSLETTER_SETTINGS_ID>" --insecure

Update Newsletter Settings By ID

We can update newsletter settings by referencing their ID. The fields below are the fields of the NewsletterSetting object that the user can set. The NewsletterSettingInput object which is passed in to the updateNewsletterSettingsByID method consists of a single field of the type NewsletterSetting. This means that when setting fields, you must set the field of the NewsletterSetting object (i.e. myNewsletterSetting.newsletter_setting.email_hour = 1).

Field Type Required Notes
_id string false -
email_day_of_week int false Value should be between 1 and 7
email_hour int false Value should be between 1 and 24
email_status string false -
facebook_active_wall string false -
facebook_day_of_week int false Value should be between 1 and 7
facebook_hour int false Value should be between 1 and 24
facebook_status string false -
linkedin_active_wall string false -
linkedin_day_of_week int false Value should be between 1 and 7
linkedin_hour int false Value should be between 1 and 24
linkedin_status string false -
social_title string false -
social_subtitle string false -
social_description string false -
twitter_day_of_week int false Value should be between 1 and 7
twitter_hour int false Value should be between 1 and 24
twitter_status string false -
social_posting_text string false -
newsletter_type string false -
group_id string false -
montage_enabled boolean false -
montage_title string false -
montage_facebook_image_url string false -
montage_linkedin_image_url string false -
montage_twitter_image_url string false -
newsletter_ids array[string] false -
primary_email_font string false -
footer_email_font string false -
email_accent_color string false -
render_version string false -
header_image_url string false -
header_background_color string false -
banner_color string false -
title_color string false -
footer_html string false -
intro_text string false -
footer_image_url string false -
subject string false -
salutation_text string false -
body_html string false -
require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# update a newsletter
api = VestorlyApi::NewslettersettingsApi
newslettersettingsUpdate = VestorlyApi::NewsletterSettingsInput.new
# Set fields you want updated here
response = api.update_newsletter_settings_by_id(ID, auth, newslettersettingsUpdate)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# update newsletter settings
api = vestorly.NewslettersettingsApi(api_client=client)
newslettersettingsUpdate = vestorly.NewsletterSettingsInput()
# Set fields you want updated here
response = api.update_newsletter_settings_by_id(vestorly_auth=auth, newsletter_setting=newslettersettingsUpdate, id=ID)

print response
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// update newsletter settings
NewslettersettingsApi newslettersettingsApi = new NewslettersettingsApi();
NewsletterSettingsInput newslettersettingsUpdate = new NewsletterSettingsInput();
// Set fields you want updated
Newslettersettingreponse response = newslettersettingsApi.updateNewsletterSettingsByID(ID, auth, newslettersettingsUpdate);
System.out.println(response);
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// update newsletter settings
vestorly.api.NewslettersettingsApi newslettersettingsApi = new vestorly.api.NewslettersettingsApi();
vestorly.model.NewsletterSettingsInput newslettersettingsUpdate = new vestorly.model.NewsletterSettingsInput();
// Set fields you want updated
vestorly.modelNewslettersettingreponse response = newslettersettingsApi.UpdateNewsletterSettingsByID(ID, auth, newslettersettingsUpdate);
Console.WriteLine(response);
curl -H "x-vestorly-auth:<TOKEN>" -H "Content-Type: application/json" -X PUT "https://www.vestorly.com/api/v2/newsletter_settings/<NEWSLETTERSETTING_ID>" -d '{"email_day_of_week":"4","email_hour":"4","social_title":"MY TITLE"}'

Member Events

Try in the API:

findMemberEvents

Find Member Events

Member Events can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of member events
api = VestorlyApi::MembereventsApi
response = api.find_member_events(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of member events
api = vestorly.MembereventsApi(api_client=client)
response = api.find_member_events(vestorly_auth=auth)
for member_event in response.member_events:
    print member_event
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of member events
MembereventsApi membereventsApi = new MembereventsApi();
MemberEvents response = membereventsApi.findMemberEvents(auth);
for (MemberEvent memberevent : response.getMemberEvents()) {
    System.out.println(memberevent);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of member events
vestorly.api.MembereventsApi membereventsApi = new vestorly.api.MembereventsApi();
vestorly.model.MemberEvents response = membereventsApi.FindMemberEvents(auth);
foreach (vestorly.model.MemberEvent memberevent in response.memberEvents) {
  Console.WriteLine(memberevent);
}
curl -X GET "https://www.vestorly.com/api/v2/member_events.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Member Reports

Try in the API:

findMemberReports

Find Member Reports

Member reports can be indexed and displayed as a standard list.

require 'VestorlyApi'

# login and retrieve authentication token
api = VestorlyApi::SessionsApi
auth = api.login(USERNAME, PASSWORD).vestorly_auth

# retrieve and print list of member reports
api = VestorlyApi::MemberreportsApi
response = api.find_member_reports(auth)

pp response
import vestorly

# login and retrieve authentication token
client = vestorly.ApiClient(host="http://dev.vestorly.com/api/v2", header_name='x-vestorly-auth', header_value="")
api = vestorly.SessionsApi(api_client=client)
auth =  api.login(**{'username':USERNAME, 'password':PASSWORD}).vestorly_auth

# retrieve and print list of member events
api = vestorly.MemberreportsApi(api_client=client)
response = api.find_member_reports(vestorly_auth=auth)
for member_report in response.member_reports:
    print member_report
// login and retrieve authentication token
SessionsApi sessionsApi = new SessionsApi();
String auth = sessionsApi.login(USERNAME, PASSWORD).getVestorlyAuth();

// retrieve and print list of member events
MemberreportsApi memberreportsApi = new MemberreportsApi();
MemberReports response = memberreportsApi.findMemberReports(auth);
for (MemberReport memberreport : response.getMemberReports()) {
    System.out.println(memberreport);
}
// login and retrieve authentication token
vestorly.api.SessionsApi sessionsApi = new vestorly.api.SessionsApi();
String auth = sessionsApi.Login(USERNAME, PASSWORD).vestorlyAuth;

// retrieve and print list of member events
vestorly.api.MemberreportsApi memberreportsApi = new vestorly.api.MemberreportsApi();
vestorly.model.MemberReports response = memberreportsApi.FindMemberReports(auth);
foreach (vestorly.model.MemberReport memberreport in response.memberReports()) {
  Console.WriteLine(memberreport);
}
curl -X GET "https://www.vestorly.com/api/v2/member_reports.json" -H "Accept: application/json" -d "vestorly-auth=<TOKEN>"

Embed Widget

The Embed

The Vestorly Embed provides an easy-to-use Iframe that can be embed on any HTML4/5 page. Various options can be configured through simple URL parameters.

The embed tiles are designed to be fully re-sizable to fit any space given. They also work responsively, so on mobile devices the display will fit appropriately.

Image

Embed URL

Various options can be configured through simple URL parameters.

http://www.vestorly.com/embed?advisor_id=testmeout

Parameter Required Description
advisor_id true Specifies the Id of the Advisor. This can be found as the same ID value on our client app under http://standard.vestorly.com/reader/xyz/discover - here joeadvisor xyz be the correct advisor_id.
group_id false This specifies the correct content library associated with the content. Again this can be obtained from our client, for example the URL: https://standard.vestorly.com/publisher/content/manage/feed?groupId=53719f5d869833000200009b contains the associated group_id as the last parameter.
embed_type false choose between: vertical, carousel, basic
limit false this is the number of tiles to load, not all of these tiles may be visible if the screen area available does not fit or you are using a carousel type
skip false defaults to 0. This skips X number of articles before showing content. Use this value to start at a different index from the start of the content library.
auto false defaults to left. This simulates auto-scrolling the articles of a carousel either to left or right. The delay is 3 seconds: left, right
client_email false Email of the member. This will be used to auto-track/bypass prompt, so a member can view Vestorly without a prompt. Allows auto-tracking to work with a host web site.
new_user false if set to ‘true’ will auto-login and track a new user anonymously within Vestorly
layout false if set to true, disables styling, leaving an unstyled set of html
iframeresizer false if set to true, allows use of IFrameResizer
animation false if set to 'fade’, allows for fade and effect when changing
callback false used for JSONP requests

Embed Types

The Embed itself is divided into several types:

As a rule of thumb it’s recommended to use % widths rather than absolute pixel widths when preparing the html. But as a reference our tiles generally fit these widths.

To embed a library using (Standard Carousel):

http://www.vestorly.com/embed?group_id=53719f5d869833000200009f&advisor_id=joeadvisor& embed_type=carousel&skip=0&limit=12
curl -H "x-vestorly-auth:$auth_token"  \
-X GET 'https://www.vestorly.com/embed?group_id=<GROUP_ID>&advisor_id=<ADVISOR_ID>&t=1428083348485&embed_type=carousel&skip=0&limit=12&animation=fade'

To embed a library using (Vertical):

http://www.vestorly.com/embed?group_id=53719f5d869833000200009f&advisor_id=joeadvisor& embed_type=vertical&skip=0&limit=12
curl -H "x-vestorly-auth:$auth_token"  \
-X GET 'https://www.vestorly.com/embed?group_id=<GROUP_ID>&advisor_id=<ADVISOR_ID>&t=1428083348485&embed_type=vertical&skip=0&limit=12&animation=fade'

To embed a library using (Custom Grid layout):

http://www.vestorly.com/embed?group_id=53719f5d869833000200009f&advisor_id=joeadvisor& embed_type=custom&skip=0&limit=12
curl -H "x-vestorly-auth:$auth_token"  \
-X GET 'https://www.vestorly.com/embed?group_id=<GROUP_ID>&advisor_id=<ADVISOR_ID>&t=1428083348485&embed_type=custom&skip=0&limit=12&animation=fade'

HTML Examples

Here are some samples for using these URLS within a web page. Note that it is generally recommended to use an Iframe.

<iframe scrolling="no" frameborder="0" allowtransparency="true" style="minwidth:
275px;max-width:99%;min-height:260px;maxheight:
100%;overflow:hidden;position:relative;border:none;margin:8px;height:260px;width:10
0%;"
src="//www.vestorly.com/embed?group_id=23729ffd869833000200009f&amp;advisor_id=demo
&amp;t=1417679264888&amp;embed_type=carousel&amp;skip=0&amp;limit=12&amp;a
nimation=fade"></iframe>

Export URLs

Vestorly supports the ability to export directly via a URL. Using an exported RSSFeed, you can import Vestorly content directly into 3rd party systems, and the Vestorly links can be used to collect event data directly within Vestorly.

 | _ \/ __/ __|
 |   /\__ \__ \
 |_|_\|___/___/

RSSFeed Export

Vestorly can also generate and export an RSSFeed. To do this, a simple URL that maps to an advisor’s content library or group is all that is needed.

http://www.vestorly.com/embed.rss?group_id=53719f5d869833000200009f&advisor_id=joe advisor&skip=0&limit=12

Parameter Required Description
advisor_id true Specifies the Id of the Advisor. This can be found as the same ID value on our client app under http://standard.vestorly.com/reader/xyz/discover - here joeadvisor xyz be the correct advisor_id.
group_id false This specifies the correct content library associated with the content. Again this can be obtained from our client, for example the URL: https://standard.vestorly.com/publisher/content/manage/feed?groupId=53719f5d869833000200009b contains the associated group_id as the last parameter.
limit false this is the number of tiles to load, not all of these tiles may be visible if the screen area available does not fit or you are using a carousel type
skip false defaults to 0. This skips X number of articles before showing content. Use this value to start at a different index from the start of the content library.
auto false defaults to left. This simulates auto-scrolling the articles of a carousel either to left or right. The delay is 3 seconds: left, right
client_email false Email of the member. This will be used to auto-track/bypass prompt, so a member can view Vestorly without a prompt. Allows auto-tracking to work with a host web site.
new_user false if set to ‘true’ will auto-login and track a new user anonymously within Vestorly
disable_image_injection false if set to ‘true’ will remove the image urls from the description of the RSS feed, used by some services which do not expect HTML withinthe description txt of the RSS feed
curl http://www.vestorly.com/embed.rss?group_id=53719f5d869833000200009f&advisor_id=joe
advisor&skip=0&limit=12


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:vestorly="http://www.vestorly.com/rss/">
<channel>
  <title>Community Update</title>
  <description>Krane Shares Collection of Content</description>
  <link>https://www.vestorly.com/embed.rss?group_id=53719f5d869833000200009f&am
  p;advisor_id=joeadvisor&amp;t=1417676817598&amp;embed_type=basic&amp;skip=0&amp;
  limit=12</link>
  <atom:link
  href="https://www.vestorly.com/embed.rss?group_id=31331231231&am
  p;advisor_id=joeadvisor&amp;t=1417676817598&amp;embed_type=basic&amp;skip=0&amp;
  limit=12" rel="self" type="application/rss+xml"/>
  <generator>http://www.vestorly.com</generator>
  <language>en</language>
  <vestorly:server>www.vestorly.com</vestorly:server>
  <vestorly:group>31331231231</vestorly:group>

Email Export

Vestorly can generate emails which can later be sent through email sites or email clients.

This URL can be used to generate emails for a given advisor.

Parameter Required Description
advisor_id true Specifies the ID of the Advisor. This can be found as the same ID value on our client app under http://standard.vestorly.com/reader/xyz/discover - here joeadvisor xyz be the correct advisor_id.
newsletter_id true This specifies the correct newsletter to export.
attachment false True if the email should use relative links for it’s image URLs
curl -H "x-vestorly-auth:$auth_token" \
-X GET 'https://wwww.vestorly.com/embed/email?advisor_id=<ADVISOR_ID_>&newsletter_id=<NEWSLETTER_ID_>&t=<TIME>&attachment=true'

Example Response

{"source":{"_id":"551ed07090a0eccd08000017","name":"iReport","url":"http://rss.ireport.com/feeds/oncnn.rss","enabled":true,"rss_publisher":"CNN1","has_paywall":false,"custom_rss_feed":true}}