| Requires any of the roles: | Agent, Administrator, Agent, Administrator |
| GET,OPTIONS | /v1/PeraAgent/{AgentId} | ||
|---|---|---|---|
| PUT,OPTIONS | /v1/PeraAgent |
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;
namespace CRM.AgencyPlatform.API.Internal
{
public partial class Agent
{
public virtual int AgentId { get; set; }
public virtual string Company { get; set; }
public virtual string AgentName { get; set; }
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual string MiddleInitial { get; set; }
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string Zip { get; set; }
public virtual string Country { get; set; }
public virtual string Email { get; set; }
public virtual string EmailSignature { get; set; }
public virtual string HomePhone { get; set; }
public virtual string CellPhone { get; set; }
public virtual string WorkPhone { get; set; }
public virtual bool InsLicensed { get; set; }
public virtual bool AgreeToDisclosures { get; set; }
public virtual DateTime? AgreeToDate { get; set; }
public virtual DateTime? PaidDate { get; set; }
public virtual string AgentNumber { get; set; }
public virtual string ReferringAgent { get; set; }
public virtual string PlacementAgent { get; set; }
public virtual DateTime? CreatedDate { get; set; }
public virtual Guid UserId { get; set; }
public virtual bool IsAgent { get; set; }
public virtual string Package { get; set; }
public virtual string StoreName { get; set; }
public virtual string Notes { get; set; }
public virtual int? Upline1 { get; set; }
public virtual int? Upline2 { get; set; }
public virtual int? Upline3 { get; set; }
public virtual int? Upline4 { get; set; }
public virtual int? MVPID { get; set; }
public virtual int? AVPID { get; set; }
public virtual int? RVPID { get; set; }
public virtual decimal? AgentLevel { get; set; }
public virtual bool IsMVP { get; set; }
public virtual bool IsRVP { get; set; }
public virtual bool IsAVP { get; set; }
public virtual bool IsAdmin { get; set; }
public virtual bool IsBusinessCardAdmin { get; set; }
public virtual string TeamName { get; set; }
public virtual Guid LocationId { get; set; }
public virtual Guid CalendarId { get; set; }
public virtual string Rank { get; set; }
public virtual bool NBC { get; set; }
public virtual decimal? Upline1Percent { get; set; }
public virtual decimal? Upline2Percent { get; set; }
public virtual decimal? Upline3Percent { get; set; }
public virtual decimal? Upline4Percent { get; set; }
public virtual string AgentStatus { get; set; }
public virtual string Office { get; set; }
public virtual DateTime? DOB { get; set; }
public virtual string SSN { get; set; }
public virtual string Fax { get; set; }
public virtual string BusinessEmail { get; set; }
public virtual DateTime? ModifiedDate { get; set; }
public virtual string ModifiedBy { get; set; }
public virtual string TimeZone { get; set; }
public virtual bool LeaderLocked { get; set; }
public virtual DateTime LastSubmittedBusinessDate { get; set; }
public virtual DateTime GracePeriodDate { get; set; }
public virtual bool Vested { get; set; }
public virtual DateTime DirectPay { get; set; }
public virtual string DirectPayApprBy { get; set; }
public virtual decimal? FactFinderBilling { get; set; }
public virtual string FullName { get; set; }
public virtual string ByLastName { get; set; }
public virtual bool IsSecurityLicensed { get; set; }
public virtual bool IsEncompassAdmin { get; set; }
public virtual Guid ApiKey { get; set; }
public virtual string LastSessionId { get; set; }
public virtual DateTime? LastLogin { get; set; }
public virtual bool MfaActive { get; set; }
public virtual bool RequireMFA { get; set; }
public virtual string SMSPhoneNumber { get; set; }
public virtual bool VerifiedEmailStatus { get; set; }
public virtual bool VerifiedCellPhoneStatus { get; set; }
public virtual string SchedulerUrl { get; set; }
public virtual QueueDefault QueueDefaults { get; set; }
public virtual List<string> Roles { get; set; } = [];
public virtual bool PasswordUpdated { get; set; }
public virtual bool RestrictToSingleSession { get; set; }
}
public partial class AgentDistrict
{
public virtual int Id { get; set; }
public virtual int AgentId { get; set; }
public virtual int DistrictId { get; set; }
public virtual string Name { get; set; }
public virtual int CampaignTypeId { get; set; }
}
public partial class AgentResponse
{
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual List<Agent> Agent { get; set; } = [];
}
public partial class PeraAgent
{
public virtual int AgentId { get; set; }
public virtual Guid UserId { get; set; }
public virtual string FirstName { get; set; }
public virtual string LastName { get; set; }
public virtual string FullName { get; set; }
public virtual Guid CalendarId { get; set; }
public virtual string GoogleCalendar { get; set; }
public virtual string PeraICSUrl { get; set; }
public virtual bool AsapOptOut { get; set; }
public virtual bool AsapLockOut { get; set; }
public virtual bool AcceptAllAppts { get; set; }
public virtual string TimeZone { get; set; }
public virtual string Email { get; set; }
public virtual int AsapWeeklyAppts { get; set; }
public virtual bool SaturdayAppts { get; set; }
public virtual bool SundayAppts { get; set; }
public virtual int AgentLevel { get; set; }
public virtual List<AgentDistrict> Districts { get; set; } = [];
public virtual Guid ApiKey { get; set; }
}
public partial class PeraAgentRequest
{
public virtual int AgentId { get; set; }
public virtual List<PeraAgent> Agent { get; set; } = [];
}
public partial class QueueDefault
{
public virtual Guid LocationId { get; set; }
public virtual List<Guid> Services { get; set; } = [];
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /v1/PeraAgent/{AgentId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"AgentId":0,"Agent":[{"AgentId":0,"UserId":"00000000000000000000000000000000","FirstName":"String","LastName":"String","FullName":"String","CalendarId":"00000000000000000000000000000000","GoogleCalendar":"String","PeraICSUrl":"String","AsapOptOut":false,"AsapLockOut":false,"AcceptAllAppts":false,"TimeZone":"String","Email":"String","AsapWeeklyAppts":0,"SaturdayAppts":false,"SundayAppts":false,"AgentLevel":0,"Districts":[{"Id":0,"AgentId":0,"DistrictId":0,"Name":"String","CampaignTypeId":0}],"ApiKey":"00000000000000000000000000000000"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Agent":[{"AgentId":0,"Company":"String","AgentName":"String","FirstName":"String","LastName":"String","MiddleInitial":"String","Address1":"String","Address2":"String","City":"String","State":"String","Zip":"String","Country":"String","Email":"String","EmailSignature":"String","HomePhone":"String","CellPhone":"String","WorkPhone":"String","InsLicensed":false,"AgreeToDisclosures":false,"AgreeToDate":"0001-01-01T00:00:00.0000000","PaidDate":"0001-01-01T00:00:00.0000000","AgentNumber":"String","ReferringAgent":"String","PlacementAgent":"String","CreatedDate":"0001-01-01T00:00:00.0000000","UserId":"00000000000000000000000000000000","IsAgent":false,"Package":"String","StoreName":"String","Notes":"String","Upline1":0,"Upline2":0,"Upline3":0,"Upline4":0,"MVPID":0,"AVPID":0,"RVPID":0,"AgentLevel":0,"IsMVP":false,"IsRVP":false,"IsAVP":false,"IsAdmin":false,"IsBusinessCardAdmin":false,"TeamName":"String","LocationId":"00000000000000000000000000000000","CalendarId":"00000000000000000000000000000000","Rank":"String","NBC":false,"Upline1Percent":0,"Upline2Percent":0,"Upline3Percent":0,"Upline4Percent":0,"AgentStatus":"String","Office":"String","DOB":"0001-01-01T00:00:00.0000000","SSN":"String","Fax":"String","BusinessEmail":"String","ModifiedDate":"0001-01-01T00:00:00.0000000","ModifiedBy":"String","TimeZone":"String","LeaderLocked":false,"LastSubmittedBusinessDate":"0001-01-01T00:00:00.0000000","GracePeriodDate":"0001-01-01T00:00:00.0000000","Vested":false,"DirectPay":"0001-01-01T00:00:00.0000000","DirectPayApprBy":"String","FactFinderBilling":0,"FullName":"String","ByLastName":"String","IsSecurityLicensed":false,"IsEncompassAdmin":false,"ApiKey":"00000000000000000000000000000000","LastSessionId":"String","LastLogin":"0001-01-01T00:00:00.0000000","MfaActive":false,"RequireMFA":false,"SMSPhoneNumber":"String","VerifiedEmailStatus":false,"VerifiedCellPhoneStatus":false,"SchedulerUrl":"String","QueueDefaults":{"LocationId":"00000000000000000000000000000000","Services":["00000000000000000000000000000000"]},"Roles":["String"],"PasswordUpdated":false,"RestrictToSingleSession":false}]}