Trendsic Platform Service

<back to all web services

DocumentSearchRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/DocumentSearch
DocumentSearchRequest Parameters:
NameParameterData TypeRequiredDescription
searchTermsbodystringNo
searchModebodyDocumentSearchModeNo
termModebodyDocumentTermModeNo
userIdbodyGuidNo
DocumentSearchMode Enum:
NameValue
Exact1
Contains2
StartsWith3
EndsWith4
DocumentTermMode Enum:
NameValue
All1
Any2
DocumentSearchResponse Parameters:
NameParameterData TypeRequiredDescription
DocumentSearchCountformintNo
DocumentSearchResultsformList<DocumentSearchResult>No
ResponseStatusformResponseStatusNo
DocumentSearchResult Parameters:
NameParameterData TypeRequiredDescription
AttachmentIdformGuidNo
DateAddedformDateTimeNo
AttachmentNameformstringNo
DescriptionformstringNo
DocumentTypeformstringNo
DocumentGroupformstringNo
DropboxTableNameformstringNo
DropboxRecordIdformintNo
AttachmentTableNameformstringNo
AttachmentFieldNameformstringNo
AttachmentRecordIdformintNo
FilePathformstringNo
OCRSourceformstringNo
OCRResultformstringNo
LinesformList<LineSearchResult>No
LineSearchResult Parameters:
NameParameterData TypeRequiredDescription
LineTextformstringNo
PageNoformintNo
PageLineNoformintNo
DocLineNoformintNo
BoxTopformdoubleNo
BoxLeftformdoubleNo
BoxWidthformdoubleNo
BoxHeightformdoubleNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

{
	searchTerms: String,
	searchMode: Exact,
	termMode: All,
	userId: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	DocumentSearchCount: 0,
	DocumentSearchResults: 
	[
		{
			AttachmentId: 00000000000000000000000000000000,
			DateAdded: 0001-01-01,
			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
		}
	}
}