| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/DocumentSearch |
|---|
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 Enum DocumentSearchMode
Exact = 1
Contains = 2
StartsWith = 3
EndsWith = 4
End Enum
Public Partial Class DocumentSearchRequest
Public Overridable Property searchTerms As String
Public Overridable Property searchMode As DocumentSearchMode
Public Overridable Property termMode As DocumentTermMode
Public Overridable Property userId As Guid
End Class
Public Partial Class DocumentSearchResponse
Public Overridable Property DocumentSearchCount As Integer
Public Overridable Property DocumentSearchResults As List(Of DocumentSearchResult) = New List(Of DocumentSearchResult)
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class DocumentSearchResult
Public Overridable Property AttachmentId As Guid
Public Overridable Property DateAdded As Date
Public Overridable Property AttachmentName As String
Public Overridable Property Description As String
Public Overridable Property DocumentType As String
Public Overridable Property DocumentGroup As String
Public Overridable Property DropboxTableName As String
Public Overridable Property DropboxRecordId As Integer
Public Overridable Property AttachmentTableName As String
Public Overridable Property AttachmentFieldName As String
Public Overridable Property AttachmentRecordId As Integer
Public Overridable Property FilePath As String
Public Overridable Property OCRSource As String
Public Overridable Property OCRResult As String
Public Overridable Property Lines As List(Of LineSearchResult) = New List(Of LineSearchResult)
End Class
Public Enum DocumentTermMode
All = 1
Any = 2
End Enum
Public Partial Class LineSearchResult
Public Overridable Property LineText As String
Public Overridable Property PageNo As Integer
Public Overridable Property PageLineNo As Integer
Public Overridable Property DocLineNo As Integer
Public Overridable Property BoxTop As Double
Public Overridable Property BoxLeft As Double
Public Overridable Property BoxWidth As Double
Public Overridable Property BoxHeight As Double
End Class
End Namespace
End Namespace
VB.NET DocumentSearchRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/DocumentSearch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"searchTerms":"String","searchMode":"Exact","termMode":"All","userId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"DocumentSearchCount":0,"DocumentSearchResults":[{"AttachmentId":"00000000000000000000000000000000","DateAdded":"0001-01-01T00:00:00.0000000","AttachmentName":"String","Description":"String","DocumentType":"String","DocumentGroup":"String","DropboxTableName":"String","DropboxRecordId":0,"AttachmentTableName":"String","AttachmentFieldName":"String","AttachmentRecordId":0,"FilePath":"String","OCRSource":"String","OCRResult":"String","Lines":[{"LineText":"String","PageNo":0,"PageLineNo":0,"DocLineNo":0,"BoxTop":0,"BoxLeft":0,"BoxWidth":0,"BoxHeight":0}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}