| Requires any of the roles: | Worker, Agent, Administrator, Worker, Agent, Administrator |
| POST,OPTIONS | /v1/ActivityPlan | ||
|---|---|---|---|
| GET,OPTIONS | /v1/ActivityPlan/{AgentId}/{DateFrom}/{DateTo} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ActivityPlanRequest
{
public ActivityPlan ActivityPlan = null;
public Integer AgentId = null;
public Date DateFrom = null;
public Date DateTo = null;
public Integer ApplicationGoal = null;
public Integer AppointmentSetGoal = null;
public Integer LearningGoal = null;
public Integer MarketingGoal = null;
public Integer ReferralGoal = null;
public Integer LeadGoal = null;
public Integer ClientUpdateGoal = null;
public Integer FirstContactGoal = null;
public Integer FirstAppointmentGoal = null;
public Integer SecondAppointmentGoal = null;
public Integer SecondAppointmentSetGoal = null;
public Integer MonthlyCashFlowGoal = null;
public Integer YTDCashFlowGoal = null;
public Integer RecruitGoal = null;
public ActivityPlan getActivityPlan() { return ActivityPlan; }
public ActivityPlanRequest setActivityPlan(ActivityPlan value) { this.ActivityPlan = value; return this; }
public Integer getAgentId() { return AgentId; }
public ActivityPlanRequest setAgentId(Integer value) { this.AgentId = value; return this; }
public Date getDateFrom() { return DateFrom; }
public ActivityPlanRequest setDateFrom(Date value) { this.DateFrom = value; return this; }
public Date getDateTo() { return DateTo; }
public ActivityPlanRequest setDateTo(Date value) { this.DateTo = value; return this; }
public Integer getApplicationGoal() { return ApplicationGoal; }
public ActivityPlanRequest setApplicationGoal(Integer value) { this.ApplicationGoal = value; return this; }
public Integer getAppointmentSetGoal() { return AppointmentSetGoal; }
public ActivityPlanRequest setAppointmentSetGoal(Integer value) { this.AppointmentSetGoal = value; return this; }
public Integer getLearningGoal() { return LearningGoal; }
public ActivityPlanRequest setLearningGoal(Integer value) { this.LearningGoal = value; return this; }
public Integer getMarketingGoal() { return MarketingGoal; }
public ActivityPlanRequest setMarketingGoal(Integer value) { this.MarketingGoal = value; return this; }
public Integer getReferralGoal() { return ReferralGoal; }
public ActivityPlanRequest setReferralGoal(Integer value) { this.ReferralGoal = value; return this; }
public Integer getLeadGoal() { return LeadGoal; }
public ActivityPlanRequest setLeadGoal(Integer value) { this.LeadGoal = value; return this; }
public Integer getClientUpdateGoal() { return ClientUpdateGoal; }
public ActivityPlanRequest setClientUpdateGoal(Integer value) { this.ClientUpdateGoal = value; return this; }
public Integer getFirstContactGoal() { return FirstContactGoal; }
public ActivityPlanRequest setFirstContactGoal(Integer value) { this.FirstContactGoal = value; return this; }
public Integer getFirstAppointmentGoal() { return FirstAppointmentGoal; }
public ActivityPlanRequest setFirstAppointmentGoal(Integer value) { this.FirstAppointmentGoal = value; return this; }
public Integer getSecondAppointmentGoal() { return SecondAppointmentGoal; }
public ActivityPlanRequest setSecondAppointmentGoal(Integer value) { this.SecondAppointmentGoal = value; return this; }
public Integer getSecondAppointmentSetGoal() { return SecondAppointmentSetGoal; }
public ActivityPlanRequest setSecondAppointmentSetGoal(Integer value) { this.SecondAppointmentSetGoal = value; return this; }
public Integer getMonthlyCashFlowGoal() { return MonthlyCashFlowGoal; }
public ActivityPlanRequest setMonthlyCashFlowGoal(Integer value) { this.MonthlyCashFlowGoal = value; return this; }
public Integer getYtdCashFlowGoal() { return YTDCashFlowGoal; }
public ActivityPlanRequest setYtdCashFlowGoal(Integer value) { this.YTDCashFlowGoal = value; return this; }
public Integer getRecruitGoal() { return RecruitGoal; }
public ActivityPlanRequest setRecruitGoal(Integer value) { this.RecruitGoal = 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 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 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; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<ActivityPlanRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ActivityPlan>
<Actual>0</Actual>
<AgentId>0</AgentId>
<DateCreated>0001-01-01T00:00:00</DateCreated>
<DateFrom>0001-01-01T00:00:00</DateFrom>
<DateTo>0001-01-01T00:00:00</DateTo>
<EventTypeId>0</EventTypeId>
<EventTypeName>String</EventTypeName>
<Goal>0</Goal>
<Id>0</Id>
<MthlyCashFlow>0</MthlyCashFlow>
<Recruit>0</Recruit>
<YTDCashFlow>0</YTDCashFlow>
</ActivityPlan>
<AgentId>0</AgentId>
<ApplicationGoal>0</ApplicationGoal>
<AppointmentSetGoal>0</AppointmentSetGoal>
<ClientUpdateGoal>0</ClientUpdateGoal>
<DateFrom>0001-01-01T00:00:00</DateFrom>
<DateTo>0001-01-01T00:00:00</DateTo>
<FirstAppointmentGoal>0</FirstAppointmentGoal>
<FirstContactGoal>0</FirstContactGoal>
<LeadGoal>0</LeadGoal>
<LearningGoal>0</LearningGoal>
<MarketingGoal>0</MarketingGoal>
<MonthlyCashFlowGoal>0</MonthlyCashFlowGoal>
<RecruitGoal>0</RecruitGoal>
<ReferralGoal>0</ReferralGoal>
<SecondAppointmentGoal>0</SecondAppointmentGoal>
<SecondAppointmentSetGoal>0</SecondAppointmentSetGoal>
<YTDCashFlowGoal>0</YTDCashFlowGoal>
</ActivityPlanRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ActivityPlanResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ActivityData>
<AppCount>0</AppCount>
<AvgFlow>0</AvgFlow>
<AvgLife>0</AvgLife>
<AvgTransfer>0</AvgTransfer>
<FlowTransfer>0</FlowTransfer>
<LifePerAnnuity>0</LifePerAnnuity>
<TransferRatio>0</TransferRatio>
</ActivityData>
<ActivityPlans>
<ActivityPlan>
<Actual>0</Actual>
<AgentId>0</AgentId>
<DateCreated>0001-01-01T00:00:00</DateCreated>
<DateFrom>0001-01-01T00:00:00</DateFrom>
<DateTo>0001-01-01T00:00:00</DateTo>
<EventTypeId>0</EventTypeId>
<EventTypeName>String</EventTypeName>
<Goal>0</Goal>
<Id>0</Id>
<MthlyCashFlow>0</MthlyCashFlow>
<Recruit>0</Recruit>
<YTDCashFlow>0</YTDCashFlow>
</ActivityPlan>
</ActivityPlans>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</ActivityPlanResponse>