Trendsic Platform Service

<back to all web services

ActivityDataRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/ActivityData/{AgentId}/{DateFrom}/{DateTo}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ActivityDataRequest
    {
        public Integer AgentId = null;
        public Date DateFrom = null;
        public Date DateTo = null;
        
        public Integer getAgentId() { return AgentId; }
        public ActivityDataRequest setAgentId(Integer value) { this.AgentId = value; return this; }
        public Date getDateFrom() { return DateFrom; }
        public ActivityDataRequest setDateFrom(Date value) { this.DateFrom = value; return this; }
        public Date getDateTo() { return DateTo; }
        public ActivityDataRequest setDateTo(Date value) { this.DateTo = value; return this; }
    }

    public static class ActivityPlanResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<ActivityPlan> ActivityPlans = new ArrayList<ActivityPlan>();
        public ActivityPlanExtended ActivityData = null;
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ActivityPlanResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<ActivityPlan> getActivityPlans() { return ActivityPlans; }
        public ActivityPlanResponse setActivityPlans(ArrayList<ActivityPlan> value) { this.ActivityPlans = value; return this; }
        public ActivityPlanExtended getActivityData() { return ActivityData; }
        public ActivityPlanResponse setActivityData(ActivityPlanExtended value) { this.ActivityData = value; return this; }
    }

    public static class ActivityPlan
    {
        public Integer Id = null;
        public Integer AgentId = null;
        public Integer EventTypeId = null;
        public Integer Goal = null;
        public Date DateFrom = null;
        public Date DateTo = null;
        public Date DateCreated = null;
        public Integer MthlyCashFlow = null;
        public Integer YTDCashFlow = null;
        public Integer Recruit = null;
        public String EventTypeName = null;
        public Integer Actual = null;
        
        public Integer getId() { return Id; }
        public ActivityPlan setId(Integer value) { this.Id = value; return this; }
        public Integer getAgentId() { return AgentId; }
        public ActivityPlan setAgentId(Integer value) { this.AgentId = value; return this; }
        public Integer getEventTypeId() { return EventTypeId; }
        public ActivityPlan setEventTypeId(Integer value) { this.EventTypeId = value; return this; }
        public Integer getGoal() { return Goal; }
        public ActivityPlan setGoal(Integer value) { this.Goal = value; return this; }
        public Date getDateFrom() { return DateFrom; }
        public ActivityPlan setDateFrom(Date value) { this.DateFrom = value; return this; }
        public Date getDateTo() { return DateTo; }
        public ActivityPlan setDateTo(Date value) { this.DateTo = value; return this; }
        public Date getDateCreated() { return DateCreated; }
        public ActivityPlan setDateCreated(Date value) { this.DateCreated = value; return this; }
        public Integer getMthlyCashFlow() { return MthlyCashFlow; }
        public ActivityPlan setMthlyCashFlow(Integer value) { this.MthlyCashFlow = value; return this; }
        public Integer getYtdCashFlow() { return YTDCashFlow; }
        public ActivityPlan setYtdCashFlow(Integer value) { this.YTDCashFlow = value; return this; }
        public Integer getRecruit() { return Recruit; }
        public ActivityPlan setRecruit(Integer value) { this.Recruit = value; return this; }
        public String getEventTypeName() { return EventTypeName; }
        public ActivityPlan setEventTypeName(String value) { this.EventTypeName = value; return this; }
        public Integer getActual() { return Actual; }
        public ActivityPlan setActual(Integer value) { this.Actual = value; return this; }
    }

    public static class ActivityPlanExtended
    {
        public Integer AppCount = null;
        public Integer AvgFlow = null;
        public Integer AvgTransfer = null;
        public Integer AvgLife = null;
        public BigDecimal LifePerAnnuity = null;
        public BigDecimal FlowTransfer = null;
        public BigDecimal TransferRatio = null;
        
        public Integer getAppCount() { return AppCount; }
        public ActivityPlanExtended setAppCount(Integer value) { this.AppCount = value; return this; }
        public Integer getAvgFlow() { return AvgFlow; }
        public ActivityPlanExtended setAvgFlow(Integer value) { this.AvgFlow = value; return this; }
        public Integer getAvgTransfer() { return AvgTransfer; }
        public ActivityPlanExtended setAvgTransfer(Integer value) { this.AvgTransfer = value; return this; }
        public Integer getAvgLife() { return AvgLife; }
        public ActivityPlanExtended setAvgLife(Integer value) { this.AvgLife = value; return this; }
        public BigDecimal getLifePerAnnuity() { return LifePerAnnuity; }
        public ActivityPlanExtended setLifePerAnnuity(BigDecimal value) { this.LifePerAnnuity = value; return this; }
        public BigDecimal getFlowTransfer() { return FlowTransfer; }
        public ActivityPlanExtended setFlowTransfer(BigDecimal value) { this.FlowTransfer = value; return this; }
        public BigDecimal getTransferRatio() { return TransferRatio; }
        public ActivityPlanExtended setTransferRatio(BigDecimal value) { this.TransferRatio = value; return this; }
    }

}

Java ActivityDataRequest DTOs

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

HTTP + CSV

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

GET /v1/ActivityData/{AgentId}/{DateFrom}/{DateTo} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ActivityPlans":[{"Id":0,"AgentId":0,"EventTypeId":0,"Goal":0,"DateFrom":"0001-01-01T00:00:00.0000000","DateTo":"0001-01-01T00:00:00.0000000","DateCreated":"0001-01-01T00:00:00.0000000","MthlyCashFlow":0,"YTDCashFlow":0,"Recruit":0,"EventTypeName":"String","Actual":0}],"ActivityData":{"AppCount":0,"AvgFlow":0,"AvgTransfer":0,"AvgLife":0,"LifePerAnnuity":0,"FlowTransfer":0,"TransferRatio":0}}