| Requires any of the roles: | Worker, Agent, Administrator, Worker, Agent, Administrator |
| POST,OPTIONS | /v1/ActivityPlan | ||
|---|---|---|---|
| GET,OPTIONS | /v1/ActivityPlan/{AgentId}/{DateFrom}/{DateTo} |
import Foundation
import ServiceStack
public class ActivityPlanRequest : Codable
{
public var activityPlan:ActivityPlan
public var agentId:Int
public var dateFrom:Date
public var dateTo:Date
public var applicationGoal:Int
public var appointmentSetGoal:Int
public var learningGoal:Int
public var marketingGoal:Int
public var referralGoal:Int
public var leadGoal:Int
public var clientUpdateGoal:Int
public var firstContactGoal:Int
public var firstAppointmentGoal:Int
public var secondAppointmentGoal:Int
public var secondAppointmentSetGoal:Int
public var monthlyCashFlowGoal:Int
public var ytdCashFlowGoal:Int
public var recruitGoal:Int
required public init(){}
}
public class ActivityPlan : Codable
{
public var id:Int
public var agentId:Int
public var eventTypeId:Int
public var goal:Int
public var dateFrom:Date
public var dateTo:Date
public var dateCreated:Date
public var mthlyCashFlow:Int
public var ytdCashFlow:Int
public var recruit:Int
public var eventTypeName:String
public var actual:Int
required public init(){}
}
public class ActivityPlanResponse : Codable
{
public var responseStatus:ResponseStatus
public var activityPlans:[ActivityPlan] = []
public var activityData:ActivityPlanExtended
required public init(){}
}
public class ActivityPlanExtended : Codable
{
public var appCount:Int
public var avgFlow:Int
public var avgTransfer:Int
public var avgLife:Int
public var lifePerAnnuity:Double
public var flowTransfer:Double
public var transferRatio:Double
required public init(){}
}
Swift ActivityPlanRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
ActivityPlan:
{
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
},
AgentId: 0,
DateFrom: 0001-01-01,
DateTo: 0001-01-01,
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/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
}
}