Trendsic Platform Service

<back to all web services

CRMimageRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/CRMimage/{ContactId}
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class CRMimageRequest
{
    open var Document:ArrayList<Document> = ArrayList<Document>()
    open var ContactId:Int? = null
    open var Fields:HashMap<String,String> = HashMap<String,String>()
}

open class Document
{
    open var DocumentId:UUID? = null
    open var DocType:String? = null
    open var DocCategory:String? = null
    open var DocSubCategory:String? = null
    open var DocTitle:String? = null
    open var DocDescription:String? = null
    open var DocData:ByteArray = ByteArray(0)
    open var DocExpiration:Date? = null
    open var DocMimeType:String? = null
    open var DisplayOrder:Int? = null
    open var FileSizeInKB:Double? = null
    open var Link:String? = null
    open var UploadDate:Date? = null
    open var DocKey:String? = null
}

open class DocumentResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var Document:ArrayList<Document> = ArrayList<Document>()
}

Kotlin CRMimageRequest DTOs

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/CRMimage/{ContactId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Document: 
	[
		{
			DocumentId: 00000000000000000000000000000000,
			DocType: String,
			DocCategory: String,
			DocSubCategory: String,
			DocTitle: String,
			DocDescription: String,
			DocData: AA==,
			DocExpiration: 0001-01-01,
			DocMimeType: String,
			DisplayOrder: 0,
			FileSizeInKB: 0,
			Link: String,
			UploadDate: 0001-01-01,
			DocKey: String
		}
	],
	ContactId: 0,
	Fields: 
	{
		String: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Document: 
	[
		{
			DocumentId: 00000000000000000000000000000000,
			DocType: String,
			DocCategory: String,
			DocSubCategory: String,
			DocTitle: String,
			DocDescription: String,
			DocData: AA==,
			DocExpiration: 0001-01-01,
			DocMimeType: String,
			DisplayOrder: 0,
			FileSizeInKB: 0,
			Link: String,
			UploadDate: 0001-01-01,
			DocKey: String
		}
	]
}