POST api/Document/Add

Add one document to an activity by posting json document model object, for this site, customer and activity. Required form data: CustomerId or CustomerRefCode, ActivityId

Request Information

URI Parameters

None.

Body Parameters

DocumentModel
NameDescriptionTypeAdditional information
SiteOwnerId

integer

None.

CustomerRefCode

Optionally provide CustomerId or CustomerRefCode

string

Max length: 200

CustomerId

Optionally provide CustomerId or CustomerRefCode

integer

None.

ActivityId

integer

Required

DocumentName

The name of your document

string

None.

DocumentType

Your document type (e.g. application/pdf, application/msword, application/vnd.ms-excel)

string

None.

DocumentData

Base64 encoded representation of your document

string

None.

Request Formats

application/json, text/json

Sample:
{
  "SiteOwnerId": 1,
  "CustomerRefCode": "sample string 1",
  "CustomerId": 2,
  "ActivityId": 3,
  "DocumentName": "sample string 4",
  "DocumentType": "sample string 5",
  "DocumentData": "sample string 6"
}

application/xml, text/xml

Sample:
<DocumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExsalerateWebAPI.Models">
  <ActivityId>3</ActivityId>
  <CustomerId>2</CustomerId>
  <CustomerRefCode>sample string 1</CustomerRefCode>
  <DocumentData>sample string 6</DocumentData>
  <DocumentName>sample string 4</DocumentName>
  <DocumentType>sample string 5</DocumentType>
  <SiteOwnerId>1</SiteOwnerId>
</DocumentModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.