API / User

Entity Description:

User is the information about the User that is used in PoliteMail for sending email and Metric information.

PoliteMail also defines the User a Role in the system and level of access and sharing the user has within the system. There are three User types: Administrator, Manager, and User.

Properties

NameDescriptionTypeAdditional
Information
ID
Int32
FirstName
String
LastName
String
Name
String
Email
String
Phone
String
Cell
String
Fax
String
LastLogin
DateTime
UserType
Int16
BusinessID
Int32
RegionID
Int32

Entity Statement

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

Creating an User

Request

POST /api/odata/Users

Content-Type 

application/json

Request body

{
"ID":"0","FirstName":"Example First Name","LastName":"Example Last Name",
"Name":"New User","Email":"Example Email","Phone":"(000) 000-0000",
"Cell":"(000) 000-0000","Fax":"(000) 000-0000","LastLogin":"2014-12-02T12:00:00.000Z","UserType":"0","BusinessID":"0","RegionID":"0"
}

Response body

{
"ID":1,"FirstName":"Example First Name","LastName":"Example Last Name",
"Name":"New User","Email":"Example Email","Phone":(000) 000-0000,
"Cell":(000) 000-0000,"Fax":(000) 000-0000,"LastLogin":"2014-12-03T15:42:02.125Z","UserType":0,"BusinessID":0,"RegionID":0
}
Deleting an User
 Request
 DELETE /api/odata/Users(1)
 Response Headers
 HTTP/1.1 204 No Content
Getting an User
 Request
 GET /api/odata/Users(1)
 Content-Type 
 application/json
 Response body
 {
"ID":1,"FirstName":"Example First Name","LastName":"Example Last Name",
"Name":"New User","Email":"Example Email","Phone":(000) 000-0000,
"Cell":(000) 000-0000,"Fax":(000) 000-0000,"LastLogin":"2014-12-03T15:42:02.125Z","UserType":0,"BusinessID":0,"RegionID":0
}
Updating a User
 Request
 PUT /api/odata/Users(1)
 Content-Type 
 application/json
 Request body
 {
"ID":"0","FirstName":"Example First Name","LastName":
"Example Last Name","Name":"New User","Email":"Example Email",
"Phone":"(000) 000-0000","Cell":"(000) 000-0000","Fax":"(000) 000-0000",
"LastLogin":"2014-12-02T12:00:00.000Z","UserType":"0",
"BusinessID":"0","RegionID":"0"
}
 Response Headers
 HTTP/1.1 204 No Content
Getting all Users
 Request
 GET /api/odata/Users
 Content-Type
 application/json
 Response body
 "value":[{
"ID":0,"FirstName":"Example First Name","LastName":"Example Last Name",
"Name":"New User","Email":"Example Email","Phone":(000) 000-0000,
"Cell":(000) 000-0000,"Fax":(000) 000-0000,"LastLogin":"2014-12-02T12:00:00.000Z","UserType":0,"BusinessID":0,"RegionID":0
},{
"ID":1,"FirstName":"Example First Name","LastName":"Example Last Name",
"Name":"New User","Email":"Example Email","Phone":(000) 000-0000,
"Cell":(000) 000-0000,"Fax":(000) 000-0000,"LastLogin":"2014-12-03T15:42:02.125Z","UserType":0,"BusinessID":0,"RegionID":0
}]