API / OptIn

Entity Description:

PoliteMail OptIn enables a user to add subscribers and capture email addresses and contact data via an Opt-in form. These forms are accessible via a link to the account area on the PoliteMail Server, or you may put the form code on your website. Once the OptIn form is submitted, the data (e.g. name and email address) is automatically loaded into the PoliteMail mailing list.

Properties

NameDescriptionTypeAdditional
Information
ID
Int32
RefID
Int32
OwnerID
Int32
DeviceID
Int32
IPAddress
String
UserAgent
String
Browser
String
Version
String
IsMobile
Boolean
MobileDeviceManufacturer
String
MobileDeviceModel
String
Latitude
Decimal
Longitude
Decimal
BrowserLanguage
String
FullUserAgent
String
Referrer
String
OptInDate
DateTime

Entity Statement

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

Creating an OptIn

Request

POST /api/odata/OptIns

Content-Type 

application/json

Request body

{
"ID":"0","RefID":"0","OwnerID":"0","DeviceID":"0","IPAddress":
"0.0.0.0","UserAgent":"Example User Agent","Browser":"Example Browser",
"Version":"Example Version","IsMobile":true,"MobileDeviceManufacturer":
"Example Manufacturer","MobileDeviceModel":"Example Model","Latitude":"0.00000","Longitude":"0.00000","BrowserLanguage":
"Example Language","FullUserAgent":"Example Full User Agent","Referrer":
"Example Referrer","OptInDate":"2014-11-19T17:48:26.155Z"
}

Response body

{
"ID":1,"RefID":0,"OwnerID":0,"DeviceID":0,"IPAddress":0.0.0.0,
"UserAgent":"Example User Agent","Browser":"Example Browser",
"Version":"Example Version","IsMobile":true,"MobileDeviceManufacturer":
"Example Manufacturer","MobileDeviceModel":"Example Model","Latitude":0.00000,"Longitude":0.00000,"BrowserLanguage":
"Example Language","FullUserAgent":"Example Full User Agent",
"Referrer":"Example Referrer","OptInDate":"2014-11-21T08:08:26.155Z"
}
Deleting an OptIn
 Request
 DELETE /api/odata/OptIns(1)
 Response Headers
 HTTP/1.1 204 No Content
Getting an OptIn
 Request
 GET /api/odata/OptIns(1)
 Content-Type 
 application/json
 Response body
 {
"ID":1,"RefID":0,"OwnerID":0,"DeviceID":0,"IPAddress":0.0.0.0,
"UserAgent":"Example User Agent","Browser":"Example Browser",
"Version":"Example Version","IsMobile":true,"MobileDeviceManufacturer":
"Example Manufacturer","MobileDeviceModel":"Example Model","Latitude":0.00000,"Longitude":0.00000,"BrowserLanguage":
"Example Language","FullUserAgent":"Example Full User Agent",
"Referrer":"Example Referrer","OptInDate":"2014-11-21T08:08:26.155Z"
}
Updating an OptIn
 Request
 PUT /api/odata/OptIns(1)
 Content-Type 
 application/json
 Request body
 {
"ID":"0","RefID":"0","OwnerID":"0","DeviceID":"0","IPAddress":
"0.0.0.0","UserAgent":"Example User Agent","Browser":
"Example Browser","Version":"Example Version","IsMobile":true,"MobileDeviceManufacturer":"Example Manufacturer","MobileDeviceModel":"Example Model","Latitude":"0.00000","Longitude":"0.00000","BrowserLanguage":
"Example Language","FullUserAgent":"Example Full User Agent","Referrer":
"Example Referrer","OptInDate":"2014-11-19T17:48:26.155Z"
}
 Response Headers
 HTTP/1.1 204 No Content
Getting all OptIns
 Request
 GET /api/odata/OptIns
 Content-Type
 application/json
 Response body
 "value":[{
"ID":0,"RefID":0,"OwnerID":0,"DeviceID":0,"IPAddress":0.0.0.0,
"UserAgent":"Example User Agent","Browser":"Example Browser",
"Version":"Example Version","IsMobile":true,"MobileDeviceManufacturer":
"Example Manufacturer","MobileDeviceModel":"Example Model","Latitude":0.00000,"Longitude":0.00000,"BrowserLanguage":
"Example Language","FullUserAgent":"Example Full User Agent",
"Referrer":"Example Referrer","OptInDate":"2014-11-19T17:48:26.155Z"
},{
"ID":1,"RefID":0,"OwnerID":0,"DeviceID":0,"IPAddress":0.0.0.0,
"UserAgent":"Example User Agent","Browser":"Example Browser",
"Version":"Example Version","IsMobile":true,
"MobileDeviceManufacturer":"Example Manufacturer",
"MobileDeviceModel":"Example Model","Latitude":0.00000,"Longitude":0.00000,
"BrowserLanguage":"Example Language","FullUserAgent":
"Example Full User Agent","Referrer":"Example Referrer",
"OptInDate":"2014-11-21T08:08:26.155Z"
}]