Trendsic Platform Service

<back to all web services

ActivityPlanRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator, Worker, Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/ActivityPlan
GET,OPTIONS/v1/ActivityPlan/{AgentId}/{DateFrom}/{DateTo}
namespace CRM.AgencyPlatform.API.Internal

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ActivityPlan() = 
        member val Id:Int32 = new Int32() with get,set
        member val AgentId:Int32 = new Int32() with get,set
        member val EventTypeId:Int32 = new Int32() with get,set
        member val Goal:Int32 = new Int32() with get,set
        member val DateFrom:DateTime = new DateTime() with get,set
        member val DateTo:DateTime = new DateTime() with get,set
        member val DateCreated:DateTime = new DateTime() with get,set
        member val MthlyCashFlow:Int32 = new Int32() with get,set
        member val YTDCashFlow:Int32 = new Int32() with get,set
        member val Recruit:Int32 = new Int32() with get,set
        member val EventTypeName:String = null with get,set
        member val Actual:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type ActivityPlanExtended() = 
        member val AppCount:Int32 = new Int32() with get,set
        member val AvgFlow:Int32 = new Int32() with get,set
        member val AvgTransfer:Int32 = new Int32() with get,set
        member val AvgLife:Int32 = new Int32() with get,set
        member val LifePerAnnuity:Decimal = new Decimal() with get,set
        member val FlowTransfer:Decimal = new Decimal() with get,set
        member val TransferRatio:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type ActivityPlanResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set
        member val ActivityPlans:ResizeArray<ActivityPlan> = new ResizeArray<ActivityPlan>() with get,set
        member val ActivityData:ActivityPlanExtended = null with get,set

    [<AllowNullLiteral>]
    type ActivityPlanRequest() = 
        member val ActivityPlan:ActivityPlan = null with get,set
        member val AgentId:Int32 = new Int32() with get,set
        member val DateFrom:DateTime = new DateTime() with get,set
        member val DateTo:DateTime = new DateTime() with get,set
        member val ApplicationGoal:Int32 = new Int32() with get,set
        member val AppointmentSetGoal:Int32 = new Int32() with get,set
        member val LearningGoal:Int32 = new Int32() with get,set
        member val MarketingGoal:Int32 = new Int32() with get,set
        member val ReferralGoal:Int32 = new Int32() with get,set
        member val LeadGoal:Int32 = new Int32() with get,set
        member val ClientUpdateGoal:Int32 = new Int32() with get,set
        member val FirstContactGoal:Int32 = new Int32() with get,set
        member val FirstAppointmentGoal:Int32 = new Int32() with get,set
        member val SecondAppointmentGoal:Int32 = new Int32() with get,set
        member val SecondAppointmentSetGoal:Int32 = new Int32() with get,set
        member val MonthlyCashFlowGoal:Int32 = new Int32() with get,set
        member val YTDCashFlowGoal:Int32 = new Int32() with get,set
        member val RecruitGoal:Int32 = new Int32() with get,set

F# ActivityPlanRequest 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.

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

{"ActivityPlan":{"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},"AgentId":0,"DateFrom":"0001-01-01T00:00:00.0000000","DateTo":"0001-01-01T00:00:00.0000000","ApplicationGoal":0,"AppointmentSetGoal":0,"LearningGoal":0,"MarketingGoal":0,"ReferralGoal":0,"LeadGoal":0,"ClientUpdateGoal":0,"FirstContactGoal":0,"FirstAppointmentGoal":0,"SecondAppointmentGoal":0,"SecondAppointmentSetGoal":0,"MonthlyCashFlowGoal":0,"YTDCashFlowGoal":0,"RecruitGoal":0}
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}}