| Requires any of the roles: | Worker, Agent, Administrator, Worker, Agent, Administrator |
| GET | /v1/Agent/{AgentId} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Agent | ||
| GET | /v1/Agent/ByUserId/{UserId} | ||
| GET,POST,PUT,DELETE,OPTIONS | /v1/Agent/Hierarchy/{ParamGetHierarchy} | ||
| GET,OPTIONS | /v1/Agent/Hierarchy/{ParamGetHierarchy}/{ParamDistinct}/{NewAgents} | ||
| GET,OPTIONS | /v1/Agent/Hierarchy/{ParamGetHierarchy}/{ParamDistinct} |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class Agent
Public Overridable Property AgentId As Integer
Public Overridable Property Company As String
Public Overridable Property AgentName As String
Public Overridable Property FirstName As String
Public Overridable Property LastName As String
Public Overridable Property MiddleInitial As String
Public Overridable Property Address1 As String
Public Overridable Property Address2 As String
Public Overridable Property City As String
Public Overridable Property State As String
Public Overridable Property Zip As String
Public Overridable Property Country As String
Public Overridable Property Email As String
Public Overridable Property EmailSignature As String
Public Overridable Property HomePhone As String
Public Overridable Property CellPhone As String
Public Overridable Property WorkPhone As String
Public Overridable Property InsLicensed As Boolean
Public Overridable Property AgreeToDisclosures As Boolean
Public Overridable Property AgreeToDate As Date?
Public Overridable Property PaidDate As Date?
Public Overridable Property AgentNumber As String
Public Overridable Property ReferringAgent As String
Public Overridable Property PlacementAgent As String
Public Overridable Property CreatedDate As Date?
Public Overridable Property UserId As Guid
Public Overridable Property IsAgent As Boolean
Public Overridable Property Package As String
Public Overridable Property StoreName As String
Public Overridable Property Notes As String
Public Overridable Property Upline1 As Integer?
Public Overridable Property Upline2 As Integer?
Public Overridable Property Upline3 As Integer?
Public Overridable Property Upline4 As Integer?
Public Overridable Property MVPID As Integer?
Public Overridable Property AVPID As Integer?
Public Overridable Property RVPID As Integer?
Public Overridable Property AgentLevel As Decimal?
Public Overridable Property IsMVP As Boolean
Public Overridable Property IsRVP As Boolean
Public Overridable Property IsAVP As Boolean
Public Overridable Property IsAdmin As Boolean
Public Overridable Property IsBusinessCardAdmin As Boolean
Public Overridable Property TeamName As String
Public Overridable Property LocationId As Guid
Public Overridable Property CalendarId As Guid
Public Overridable Property Rank As String
Public Overridable Property NBC As Boolean
Public Overridable Property Upline1Percent As Decimal?
Public Overridable Property Upline2Percent As Decimal?
Public Overridable Property Upline3Percent As Decimal?
Public Overridable Property Upline4Percent As Decimal?
Public Overridable Property AgentStatus As String
Public Overridable Property Office As String
Public Overridable Property DOB As Date?
Public Overridable Property SSN As String
Public Overridable Property Fax As String
Public Overridable Property BusinessEmail As String
Public Overridable Property ModifiedDate As Date?
Public Overridable Property ModifiedBy As String
Public Overridable Property TimeZone As String
Public Overridable Property LeaderLocked As Boolean
Public Overridable Property LastSubmittedBusinessDate As Date
Public Overridable Property GracePeriodDate As Date
Public Overridable Property Vested As Boolean
Public Overridable Property DirectPay As Date
Public Overridable Property DirectPayApprBy As String
Public Overridable Property FactFinderBilling As Decimal?
Public Overridable Property FullName As String
Public Overridable Property ByLastName As String
Public Overridable Property IsSecurityLicensed As Boolean
Public Overridable Property IsEncompassAdmin As Boolean
Public Overridable Property ApiKey As Guid
Public Overridable Property LastSessionId As String
Public Overridable Property LastLogin As Date?
Public Overridable Property MfaActive As Boolean
Public Overridable Property RequireMFA As Boolean
Public Overridable Property SMSPhoneNumber As String
Public Overridable Property VerifiedEmailStatus As Boolean
Public Overridable Property VerifiedCellPhoneStatus As Boolean
Public Overridable Property SchedulerUrl As String
Public Overridable Property QueueDefaults As QueueDefault
Public Overridable Property Roles As List(Of String) = New List(Of String)
Public Overridable Property PasswordUpdated As Boolean
Public Overridable Property RestrictToSingleSession As Boolean
End Class
Public Partial Class AgentRequest
Public Overridable Property Agent As List(Of Agent) = New List(Of Agent)
Public Overridable Property ParamGetHierarchy As Boolean
Public Overridable Property ParamDistinct As Boolean
Public Overridable Property NewAgents As Boolean
Public Overridable Property AgentId As Integer
Public Overridable Property Location As Guid
Public Overridable Property UserId As Guid
Public Overridable Property Services As List(Of String) = New List(Of String)
End Class
Public Partial Class AgentResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Agent As List(Of Agent) = New List(Of Agent)
End Class
Public Partial Class QueueDefault
Public Overridable Property LocationId As Guid
Public Overridable Property Services As List(Of Guid) = New List(Of Guid)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Agent HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"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}],"ParamGetHierarchy":false,"ParamDistinct":false,"NewAgents":false,"AgentId":0,"Location":"00000000000000000000000000000000","UserId":"00000000000000000000000000000000","Services":["String"]}
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"}},"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}]}