6.3 Message Service
6.3.1 POST New Thru Message
Url | [ThruWebServer]/REST/[version]/Message |
---|---|
Verb | POST |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Creates Thru message according to ThruPublicMessageInfo structure passed in HTTP request |
Request Body | ThruPublicMessageInfo object |
Return Data Object | Updated ThruPublicMessageInfo object |
Invocation Scenario(s) | Send one or more files and folders to recipients |
Remarks
ToRecipients, CcRecipients, BccRecipients fields in ThruPublicMessageInfo should be present in request as a string array.
These fields will bind to required structure on server side.
DateExpired must be converted to UTC.
Example POST parameters:
BccRecipients[]=Bcctest@test.com
BccRecipients[]=Bcctest2@test.com
CcRecipients[]=CcTest@test.com
CcRecipients[]=CcTest2@test.com
DateExpired=
FilesAttached[]=
FoldersAttached[]=
NotifyFlag=
Priority=3
PrivateMessage=body private
PublicMessage=body public
RequestLogin=false
SendByClient=true
Subject=subject
ToRecipients[]=ToTest@test.com
ToRecipients[]=ToTest2@test.com
UserPassword=
1 To-recipient should be provided at least.
DateExpired must be converted to UTC.
If SendByClient is true, after calling this method the client must:
send email notification and call the REST method ‘completeMessage‘ which sets message’s DateSent.
Or call the REST method ‘discardMessage’ to cancel the creation of ‘distribution’ object on the server.
Created by this method message will be deleted on the server.
The returned ThruPublicMessageInfo contains ‘MsgHtmlTemplate’ parameter which must be parsed by the client.
The token must be replaced with the public message.
The token (if exists) must be replaced with the field MsgRecipientLevelPublicID of the first To recipient.
6.3.2 GET Existing Thru Message
Url | [ThruWebServer]/REST/[version]/Message/[MessageId] |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves message information based on the provided ID. |
Request Body | None |
Return Data Object | ThruPublicMessageInfo object |
Invocation Scenario(s) | Get a message in the Thru server |
Remarks | All returned dates are in UTC. |
6.3.3 DELETE Existing Thru Message
Url | [ThruWebServer]/REST/[version]/Message/[MessageId] |
---|---|
Verb | DELETE |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Deletes message based on the provided information. No additional data should be passed on the request body. |
Request Body | None |
Return Data Object | None |
Invocation Scenario(s) | Mark message whose ID is specified in URL as deleted |
Remarks |
6.3.4 PUT Updated Thru Message
Url | [ThruWebServer]/REST/[version]/Message/[MessageId] |
---|---|
Verb | PUT |
Required HTTP Headers | Accept: (application/xml or application/json) |
Content-Type: (application/xml or application/json) | undefined |
Description | Updates message information based on the provided information. |
Request Body | ThruPublicMessageInfo object |
Return Data Object | Updated ThruPublicMessageInfo object |
Invocation Scenario(s) | Delete attached folders |
Remarks
Value of the MessageID field in the posted ThruPublicMessageInfo DTO should reference to the existing, non-deleted message. Otherwise, exception will be thrown.
Not all properties of ThruPublicMessageInfo can be modified:
DateExpired
ExpireNow
ToRecipients, CcRecipients, BccRecipients
FoldersAttached, FilesAttached
DateExpired must be converted to UTC.
Recipients to delete must be provided in ToRecipients field. They will be deleted from To, Cc and Bcc lists.
If provided, the values of the following fields are ignored:
Subject
Priority
PublicMessage
PrivateMessage
CollectedFlag
RequestLogin
SendByClient
DateCreated
DateSent
After successful processing of the command updated
ThruPublicFileInfo object will be returned.
6.3.5 PUT Discard Thru Message
Url | [ThruWebServer]/REST/[version]/Message/Discard/[MessageId] |
---|---|
Verb | PUT |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Discard message based on the provided information. No additional data should be passed on the request body. |
Request Body | None |
Return Data Object | None |
Invocation Scenario(s) | Mark message that’s ID is specified in URL as deleted |
Remarks | This method can be called only after the method ‘New Thru message’ is called |
6.3.6 PUT Complete Thru Message
Url | [ThruWebServer]/REST/[version]/Message/Complete/[MessageId] |
---|---|
Verb | PUT |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Complete message based on the provided information. No additional data should be passed on the request body. |
Request Body | None |
Return Data Object | ThruPublicMessageInfo object |
Invocation Scenario(s) | Mark message that’s ID is specified in URL as completed. |
Remarks | This method can be called only after the method ‘New Thru message’ is called |
6.3.7 GET SentThru List
Url | [ThruWebServer]/REST/[version]/Message/Content/[skip]/[take] |
---|---|
Verb | GET |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Get list of the sent messages. Attachments are not included in returned data object. |
Request Body | None |
Return Data Object | ThruPublicMessageInfo object |
Invocation Scenario(s) | Search over all Thru messages available for the current authenticated user. Attachments are not included in result, use GET Existing Thru Message.
|
Remarks |
6.3.8 POST Project Message Storage
Url | [ThruWebServer]/REST/[version]/Message/Storage/[type] |
---|---|
Verb | POST |
Required HTTP Headers | Accept: (application/xml or application/json) |
Description | Retrieves a folder information of the message storage. |
Request Body | “Subject”: in case of Type is set “Days”. Current version of this method supports only one type=‘Days.’ |
Return Data Object | ThruPublicMessageInfo object |
Invocation Scenario(s) | Find or if not exist create folder for message storage |
Remarks |