API / Message

Entity Description:

All PoliteMail Messages distributed are tracked as groups of emails (e.g. distribution list or Templates) and a record of interactions with the recipients and the Email is stored and the metadata parsed to capture the metrics for future analysis.

Properties

NameDescriptionTypeAdditional
Information
ID
Int32
Subject
String
OwnerID
Int32
SendMode
Int32
SendDate
DateTime

Entity Statement

if you are using versions earlier than 5.0, substitute "ssv3" for "api" for each Request listed below.

Creating a Message

Request

POST /api/odata/Messages

Content-Type 

application/json

Request body

{
"ID":"0","Subject":"Example Subject","OwnerID":"0","SendMode":"0","SendDate":"2014-12-01T12:48:26.155Z"
}

Response body

{
"ID":1,"Subject":"Example Subject","OwnerID":0,"SendMode":0,"SendDate":"2014-12-01T13:02:12.145Z"
}
Deleting a Message
 Request
 DELETE /api/odata/Messages(1)
 Response Headers
 HTTP/1.1 204 No Content
Getting a Message
 Request
 GET /api/odata/Messages(1)
 Content-Type 
 application/json
 Response body
 {
"ID":1,"Subject":"Example Subject","OwnerID":0,"SendMode":0,"SendDate":"2014-12-01T13:02:12.145Z"
}
Updating a Message
 Request
 PUT /api/odata/Messages(1)
 Content-Type 
 application/json
 Request body
 {
"ID":"0","Subject":"Example Subject","OwnerID":"0","SendMode":"0","SendDate":"2014-12-01T12:48:26.155Z"
}
 Response Headers
 HTTP/1.1 204 No Content
Getting all Messages
 Request
 GET /api/odata/Messages
 Content-Type
 application/json
 Response body
 "value":[{
"ID":0,"Subject":"Example Subject","OwnerID":0,"SendMode":0,"SendDate":"2014-12-01T12:48:26.155Z"
},{
"ID":1,"Subject":"Example Subject","OwnerID":0,"SendMode":0,"SendDate":"2014-12-01T13:02:12.145Z"
}]