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}

export class ActivityPlan
{
    public Id: number;
    public AgentId: number;
    public EventTypeId: number;
    public Goal: number;
    public DateFrom: string;
    public DateTo: string;
    public DateCreated: string;
    public MthlyCashFlow: number;
    public YTDCashFlow: number;
    public Recruit: number;
    public EventTypeName: string;
    public Actual: number;

    public constructor(init?: Partial<ActivityPlan>) { (Object as any).assign(this, init); }
}

export class ActivityPlanExtended
{
    public AppCount: number;
    public AvgFlow: number;
    public AvgTransfer: number;
    public AvgLife: number;
    public LifePerAnnuity: number;
    public FlowTransfer: number;
    public TransferRatio: number;

    public constructor(init?: Partial<ActivityPlanExtended>) { (Object as any).assign(this, init); }
}

export class ActivityPlanResponse
{
    public ResponseStatus: ResponseStatus;
    public ActivityPlans: ActivityPlan[] = [];
    public ActivityData: ActivityPlanExtended;

    public constructor(init?: Partial<ActivityPlanResponse>) { (Object as any).assign(this, init); }
}

export class ActivityDataRequest
{
    public AgentId: number;
    public DateFrom: string;
    public DateTo: string;

    public constructor(init?: Partial<ActivityDataRequest>) { (Object as any).assign(this, init); }
}

TypeScript ActivityDataRequest 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.

GET /v1/ActivityData/{AgentId}/{DateFrom}/{DateTo} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	ActivityPlans: 
	[
		{
			Id: 0,
			AgentId: 0,
			EventTypeId: 0,
			Goal: 0,
			DateFrom: 0001-01-01,
			DateTo: 0001-01-01,
			DateCreated: 0001-01-01,
			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
	}
}