Trendsic Platform Service

<back to all web services

LeaderboardRequest

The following routes are available for this service:
POST,OPTIONS/v1/Leaderboard
GET,OPTIONS/v1/Leaderboard/{LeaderboardType}/{StartDate}/{EndDate}
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class LeaderboardRequest
{
    open var StartDate:String? = null
    open var EndDate:String? = null
    open var LeaderboardType:String? = null
}

open class LeaderboardResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var AllData:ArrayList<Leaderboard> = ArrayList<Leaderboard>()
    open var MVP:ArrayList<Leaderboard> = ArrayList<Leaderboard>()
    open var AVP:ArrayList<Leaderboard> = ArrayList<Leaderboard>()
    open var RVP:ArrayList<Leaderboard> = ArrayList<Leaderboard>()
    open var Agents:ArrayList<Leaderboard> = ArrayList<Leaderboard>()
}

open class Leaderboard
{
    open var Position:Int? = null
    open var Name:String? = null
    open var Location:String? = null
    open var LifeCashFlow:BigDecimal? = null
    open var AnnuityCashFlow:BigDecimal? = null
    open var TotalCashFlow:BigDecimal? = null
    open var PremiumLife:BigDecimal? = null
    open var PremiumAnnuity:BigDecimal? = null
    open var PointsLife:BigDecimal? = null
    open var PointsAnnuity:BigDecimal? = null
    open var TotalPoints:BigDecimal? = null
    open var IsMVP:Boolean? = null
    open var IsRVP:Boolean? = null
    open var IsAVP:Boolean? = null
    open var IsAgent:Boolean? = null
    open var Phone:String? = null
    open var Upline1Name:String? = null
    open var Upline2Name:String? = null
}

Kotlin LeaderboardRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/Leaderboard HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	StartDate: String,
	EndDate: String,
	LeaderboardType: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	AllData: 
	[
		{
			Position: 0,
			Name: String,
			Location: String,
			LifeCashFlow: 0,
			AnnuityCashFlow: 0,
			TotalCashFlow: 0,
			PremiumLife: 0,
			PremiumAnnuity: 0,
			PointsLife: 0,
			PointsAnnuity: 0,
			TotalPoints: 0,
			IsMVP: False,
			IsRVP: False,
			IsAVP: False,
			IsAgent: False,
			Phone: String,
			Upline1Name: String,
			Upline2Name: String
		}
	],
	MVP: 
	[
		{
			Position: 0,
			Name: String,
			Location: String,
			LifeCashFlow: 0,
			AnnuityCashFlow: 0,
			TotalCashFlow: 0,
			PremiumLife: 0,
			PremiumAnnuity: 0,
			PointsLife: 0,
			PointsAnnuity: 0,
			TotalPoints: 0,
			IsMVP: False,
			IsRVP: False,
			IsAVP: False,
			IsAgent: False,
			Phone: String,
			Upline1Name: String,
			Upline2Name: String
		}
	],
	AVP: 
	[
		{
			Position: 0,
			Name: String,
			Location: String,
			LifeCashFlow: 0,
			AnnuityCashFlow: 0,
			TotalCashFlow: 0,
			PremiumLife: 0,
			PremiumAnnuity: 0,
			PointsLife: 0,
			PointsAnnuity: 0,
			TotalPoints: 0,
			IsMVP: False,
			IsRVP: False,
			IsAVP: False,
			IsAgent: False,
			Phone: String,
			Upline1Name: String,
			Upline2Name: String
		}
	],
	RVP: 
	[
		{
			Position: 0,
			Name: String,
			Location: String,
			LifeCashFlow: 0,
			AnnuityCashFlow: 0,
			TotalCashFlow: 0,
			PremiumLife: 0,
			PremiumAnnuity: 0,
			PointsLife: 0,
			PointsAnnuity: 0,
			TotalPoints: 0,
			IsMVP: False,
			IsRVP: False,
			IsAVP: False,
			IsAgent: False,
			Phone: String,
			Upline1Name: String,
			Upline2Name: String
		}
	],
	Agents: 
	[
		{
			Position: 0,
			Name: String,
			Location: String,
			LifeCashFlow: 0,
			AnnuityCashFlow: 0,
			TotalCashFlow: 0,
			PremiumLife: 0,
			PremiumAnnuity: 0,
			PointsLife: 0,
			PointsAnnuity: 0,
			TotalPoints: 0,
			IsMVP: False,
			IsRVP: False,
			IsAVP: False,
			IsAgent: False,
			Phone: String,
			Upline1Name: String,
			Upline2Name: String
		}
	]
}