API / Image

Entity Description:

Image allows a user to add an Image to the PoliteMail images repository to be referenced in the email, downloaded, and displayed as an embedded image in the email. The image is hosted on the PoliteMail server which enables the PoliteMail server to process email sends faster than using the Copy/Paste routine in Outlook.

 

Properties

Name Description Type Additional
Information
ActiveState Int16
ContentType String
CreationDate DateTime
Data Binary
ID Int32
Name String
OwnerID Int32
Shared Boolean
Size Int32
Url String
BusinessID Int32
RegionID Int32

 

Entity Statement

Creating an Image
Request
POST /ssv3/odata/Images
Content-Type     
application/json
Request body
{
“ActiveState”:”1″,”ContentType”:”Example Content Type”,”CreationDate”:”2014-12-01T12:48:51.155Z”,”Data”:”0″,”ID”:”0″,”Name”:”New Image”,”OwnerID”:”0″,”Shared”:false,”Size”:”0″,”Url”:”Example URL”,”BusinessID”:”0″,”RegionID”:”0″
}
Response body
{
“ActiveState”:1,”ContentType”:”Example Content Type”,”CreationDate”:”2014-12-02T22:08:10.155Z”,”Data”:0,”ID”:1,”Name”:”New Image”,”OwnerID”:0,”Shared”:false,”Size”:0,”Url”:”Example URL”,
“BusinessID”:0,”RegionID”:0
}
Deleting an Image
  Request
  DELETE /ssv3/odata/Images(1)
  Response Headers
  HTTP/1.1 204 No Content
Getting an Image
  Request
  GET /ssv3/odata/Images(1)
  Content-Type     
  application/json
  Response body
  {
“ActiveState”:1,”ContentType”:”Example Content Type”,”CreationDate”:”2014-12-02T22:08:10.155Z”,”Data”:0,”ID”:1,”Name”:”New Image”,”OwnerID”:0,”Shared”:false,”Size”:0,”Url”:”Example URL”,”BusinessID”
:0,”RegionID”:0
}
Updating an Image
  Request
  PUT /ssv3/odata/Images(1)
  Content-Type     
  application/json
  Request body
  {
“ActiveState”:”1″,”ContentType”:”Example Content Type”,”CreationDate”:”2014-12-01T12:48:51.155Z”,”Data”:”0″,”ID”:”0″,”Name”:”New Image”,”OwnerID”:”0″,”Shared”:false,”Size”:”0″,”Url”:”Example URL”,”BusinessID”:”0″,”RegionID”:”0″
}
  Response Headers
  HTTP/1.1 204 No Content
Getting all Images
  Request
  GET /ssv3/odata/Images
  Content-Type
  application/json
  Response body
  “value”:[{
“ActiveState”:1,”ContentType”:”Example Content Type”,”CreationDate”:”2014-12-01T12:48:51.155Z”,”Data”:0,”ID”:0,”Name”:”New Image”,”OwnerID”:0,”Shared”:false,”Size”:0,”Url”:”Example URL”,”BusinessID”
:0,”RegionID”:0
},{
“ActiveState”:1,”ContentType”:”Example Content Type”,”CreationDate”:”2014-12-02T22:08:10.155Z”,”Data”:0,”ID”:1,”Name”:”New Image”,”OwnerID”:0,”Shared”:false,”Size”:0,”Url”:”Example URL”,”BusinessID”
:0,”RegionID”:0
}]