| Requires any of the roles: | Worker, Agent, Administrator |
| POST,OPTIONS | /v1/ContactSearch |
|---|
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 Contact
Public Overridable Property ContactId As Integer
Public Overridable Property ContactType As Integer
Public Overridable Property FirstName As String
Public Overridable Property LastName As String
Public Overridable Property Name As String
Public Overridable Property Role As String
Public Overridable Property Title As String
Public Overridable Property EmailWork As String
Public Overridable Property EmailPersonal As String
Public Overridable Property District As String
Public Overridable Property DistrictID As Integer
Public Overridable Property School As String
Public Overridable Property SchoolID As Long
Public Overridable Property State As String
Public Overridable Property StateName As String
Public Overridable Property StateID As Long
Public Overridable Property CountyID As Long
Public Overridable Property County As String
Public Overridable Property Phone As String
Public Overridable Property Department As String
Public Overridable Property Flow As String
Public Overridable Property LastContact As Date
Public Overridable Property DoNotContact As Boolean
Public Overridable Property Active As Boolean
Public Overridable Property AgentId As Integer
Public Overridable Property PhoneAlt As String
Public Overridable Property PeraContactId As Integer
Public Overridable Property RoomNumber As String
Public Overridable Property SourceTypeId As Integer
Public Overridable Property SourceTypeDesc As String
Public Overridable Property SourceNote As String
Public Overridable Property ContactStatusId As Integer
Public Overridable Property ContactStatusDesc As String
Public Overridable Property SSN As String
Public Overridable Property DateOfBirth As Date
Public Overridable Property Deleted As Boolean
Public Overridable Property IsShared As Boolean
Public Overridable Property address_line1 As String
Public Overridable Property address_city As String
Public Overridable Property address_state As String
Public Overridable Property address_zip As String
Public Overridable Property DeletedBy As String
Public Overridable Property DeletedDateTimeUtc As Date?
Public Overridable Property HasNBC As Boolean
Public Overridable Property HasFactFinderSheet As Boolean
Public Overridable Property MiddleInitial As String
Public Overridable Property Tags As String
Public Overridable Property DateCreated As Date
Public Overridable Property PhoneLabel As String
Public Overridable Property AltPhoneLabel As String
Public Overridable Property Carriers As String
Public Overridable Property ContactImage As String
Public Overridable Property CompanyAffiliation As String
Public Overridable Property AdditionalInformation As String
Public Overridable Property HasGiftCard As Boolean
Public Overridable Property ContactCategory As Integer
Public Overridable Property WritingAgentId As Integer
Public Overridable Property WritingAgentName As String
Public Overridable Property MaritalStatus As String
Public Overridable Property TotalDebtAmount As Decimal
Public Overridable Property NumberOfDebtAccounts As Integer
Public Overridable Property FactFinderCodeId As Integer
Public Overridable Property BusinessName As String
Public Overridable Property DBA As String
Public Overridable Property ContactGUID As Guid
Public Overridable Property ProjectEndDate As Date
Public Overridable Property Rate As Decimal
Public Overridable Property JobID As Integer
Public Overridable Property JobName As String
Public Overridable Property JobCount As Integer
Public Overridable Property Locked As Boolean
Public Overridable Property LockedByAgentId As Integer
Public Overridable Property LockedTimestamp As Date
Public Overridable Property Initials As String
Public Overridable Property ContactCategoryName As String
Public Overridable Property SMSOptIn As Boolean
Public Overridable Property IsPlaceholder As Boolean
Public Overridable Property Skills As List(Of String) = New List(Of String)
Public Overridable Property Departments As List(Of Department) = New List(Of Department)
Public Overridable Property BranchId As Guid
Public Overridable Property BranchName As String
Public Overridable Property UnionLocalId As Integer?
Public Overridable Property WorkerClassificationId As Integer?
Public Overridable Property SeniorityDate As Date?
Public Overridable Property UnionMemberNumber As String
Public Overridable Property VoiceConsent As Boolean
Public Overridable Property VoiceConsentAtUtc As Date?
Public Overridable Property VoiceConsentSource As String
End Class
Public Partial Class ContactResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Contact As List(Of Contact) = New List(Of Contact)
End Class
Public Partial Class ContactSearchRequest
Public Overridable Property AgentId As Integer
Public Overridable Property ContactStatusId As Integer
Public Overridable Property SourceTypeId As Integer
Public Overridable Property ContactCategory As Integer
Public Overridable Property ContactTypeId As Integer
Public Overridable Property CreatedAfterDate As Date
Public Overridable Property CreatedBeforeDate As Date
End Class
Public Partial Class Department
Public Overridable Property DepartmentID As Integer
Public Overridable Property DepartmentUID As Guid
Public Overridable Property Name As String
Public Overridable Property Description As String
Public Overridable Property Code As String
Public Overridable Property Color As String
Public Overridable Property Budget As Decimal
Public Overridable Property BillingMethod As String
Public Overridable Property CostCenter As String
Public Overridable Property BillingContact As String
Public Overridable Property BillingEmail As String
Public Overridable Property ApprovalOn As Boolean
Public Overridable Property Threshold As Decimal
Public Overridable Property Active As Boolean
Public Overridable Property CreatedBy As String
Public Overridable Property CreatedAt As Date
Public Overridable Property Members As Integer
End Class
End Namespace
End Namespace
VB.NET ContactSearchRequest DTOs
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/ContactSearch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"AgentId":0,"ContactStatusId":0,"SourceTypeId":0,"ContactCategory":0,"ContactTypeId":0,"CreatedAfterDate":"0001-01-01T00:00:00.0000000","CreatedBeforeDate":"0001-01-01T00:00:00.0000000"}
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"}},"Contact":[{"ContactId":0,"ContactType":0,"FirstName":"String","LastName":"String","Name":"String","Role":"String","Title":"String","EmailWork":"String","EmailPersonal":"String","District":"String","DistrictID":0,"School":"String","SchoolID":0,"State":"String","StateName":"String","StateID":0,"CountyID":0,"County":"String","Phone":"String","Department":"String","Flow":"String","LastContact":"0001-01-01T00:00:00.0000000","DoNotContact":false,"Active":false,"AgentId":0,"PhoneAlt":"String","PeraContactId":0,"RoomNumber":"String","SourceTypeId":0,"SourceTypeDesc":"String","SourceNote":"String","ContactStatusId":0,"ContactStatusDesc":"String","SSN":"String","DateOfBirth":"0001-01-01T00:00:00.0000000","Deleted":false,"IsShared":false,"address_line1":"String","address_city":"String","address_state":"String","address_zip":"String","DeletedBy":"String","DeletedDateTimeUtc":"0001-01-01T00:00:00.0000000","HasNBC":false,"HasFactFinderSheet":false,"MiddleInitial":"String","Tags":"String","DateCreated":"0001-01-01T00:00:00.0000000","PhoneLabel":"String","AltPhoneLabel":"String","Carriers":"String","ContactImage":"String","CompanyAffiliation":"String","AdditionalInformation":"String","HasGiftCard":false,"ContactCategory":0,"WritingAgentId":0,"WritingAgentName":"String","MaritalStatus":"String","TotalDebtAmount":0,"NumberOfDebtAccounts":0,"FactFinderCodeId":0,"BusinessName":"String","DBA":"String","ContactGUID":"00000000000000000000000000000000","ProjectEndDate":"0001-01-01T00:00:00.0000000","Rate":0,"JobID":0,"JobName":"String","JobCount":0,"Locked":false,"LockedByAgentId":0,"LockedTimestamp":"0001-01-01T00:00:00.0000000","Initials":"String","ContactCategoryName":"String","SMSOptIn":false,"IsPlaceholder":false,"Skills":["String"],"Departments":[{"DepartmentID":0,"DepartmentUID":"00000000000000000000000000000000","Name":"String","Description":"String","Code":"String","Color":"String","Budget":0,"BillingMethod":"String","CostCenter":"String","BillingContact":"String","BillingEmail":"String","ApprovalOn":false,"Threshold":0,"Active":false,"CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","Members":0}],"BranchId":"00000000000000000000000000000000","BranchName":"String","UnionLocalId":0,"WorkerClassificationId":0,"SeniorityDate":"0001-01-01T00:00:00.0000000","UnionMemberNumber":"String","VoiceConsent":false,"VoiceConsentAtUtc":"0001-01-01T00:00:00.0000000","VoiceConsentSource":"String"}]}