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 Foundation
import ServiceStack

public class LeaderboardRequest : Codable
{
    public var startDate:String
    public var endDate:String
    public var leaderboardType:String

    required public init(){}
}

public class LeaderboardResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var allData:[Leaderboard] = []
    public var mvp:[Leaderboard] = []
    public var avp:[Leaderboard] = []
    public var rvp:[Leaderboard] = []
    public var agents:[Leaderboard] = []

    required public init(){}
}

public class Leaderboard : Codable
{
    public var position:Int
    public var name:String
    public var location:String
    public var lifeCashFlow:Double
    public var annuityCashFlow:Double
    public var totalCashFlow:Double
    public var premiumLife:Double
    public var premiumAnnuity:Double
    public var pointsLife:Double
    public var pointsAnnuity:Double
    public var totalPoints:Double
    public var isMVP:Bool
    public var isRVP:Bool
    public var isAVP:Bool
    public var isAgent:Bool
    public var phone:String
    public var upline1Name:String
    public var upline2Name:String

    required public init(){}
}


Swift LeaderboardRequest DTOs

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

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
Content-Length: length

{"StartDate":"String","EndDate":"String","LeaderboardType":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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"}]}