AIM Web Services

<back to all web services

SecurityRequest

Login Service

The following routes are available for this service:
POST/api/Security
POST/api/Security/{token}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    /**
    * Login Service
    */
    @DataContract
    public static class SecurityRequest extends BaseRequest
    {
        /**
        * Employee ID or Customer Email
        */
        @DataMember
        @ApiMember(DataType="string", Description="Employee ID or Customer Email", IsRequired=true, Name="Username", ParameterType="query")
        public String Username = null;

        /**
        * Existing Token
        */
        @DataMember
        @ApiMember(DataType="string", Description="Existing Token", Name="Token", ParameterType="query")
        public String Token = null;

        /**
        * Password of Employee or User
        */
        @DataMember
        @ApiMember(DataType="string", Description="Password of Employee or User", IsRequired=true, Name="Password", ParameterType="query")
        public String Password = null;

        /**
        * 
        */
        @DataMember(Name="DeviceID")
        @SerializedName("DeviceID")
        @ApiMember(DataType="string", Description="", IsRequired=true, Name="DeviceID", ParameterType="query")
        public String DeviceId = null;

        /**
        * 
        */
        @DataMember(Name="AppID")
        @SerializedName("AppID")
        @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppID", ParameterType="query")
        public String AppId = null;

        /**
        * 
        */
        @DataMember(Name="Acct")
        @SerializedName("Acct")
        @ApiMember(DataType="int", Description="", Name="Acct", ParameterType="query")
        public Integer Acct = null;

        /**
        * 
        */
        @DataMember(Name="DeviceName")
        @SerializedName("DeviceName")
        @ApiMember(DataType="string", Description="", Name="DeviceName", ParameterType="query")
        public String DeviceName = null;
        
        public String getUsername() { return Username; }
        public SecurityRequest setUsername(String value) { this.Username = value; return this; }
        public String getToken() { return Token; }
        public SecurityRequest setToken(String value) { this.Token = value; return this; }
        public String getPassword() { return Password; }
        public SecurityRequest setPassword(String value) { this.Password = value; return this; }
        public String getDeviceId() { return DeviceId; }
        public SecurityRequest setDeviceId(String value) { this.DeviceId = value; return this; }
        public String getAppId() { return AppId; }
        public SecurityRequest setAppId(String value) { this.AppId = value; return this; }
        public Integer getAcct() { return Acct; }
        public SecurityRequest setAcct(Integer value) { this.Acct = value; return this; }
        public String getDeviceName() { return DeviceName; }
        public SecurityRequest setDeviceName(String value) { this.DeviceName = value; return this; }
    }

    @DataContract
    public static class BaseRequest
    {
        /**
        * This is your AIM API Key provided by Tri-Tech
        */
        @DataMember
        @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
        public String ApiKey = null;

        @DataMember
        @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
        public String OAuthToken = null;
        
        public String getApiKey() { return ApiKey; }
        public BaseRequest setApiKey(String value) { this.ApiKey = value; return this; }
        public String getOAuthToken() { return OAuthToken; }
        public BaseRequest setOAuthToken(String value) { this.OAuthToken = value; return this; }
    }

    @DataContract
    public static class SecurityResponse extends BaseResponse
    {
        @DataMember
        public String Token = null;

        @DataMember
        public String OAuthToken = null;

        @DataMember
        public String Domain = null;

        @DataMember
        public Boolean IsAdmin = null;

        @DataMember
        public UserDetail UserDetails = null;

        @DataMember
        public ArrayList<AccountDetail> AccountDetails = null;
        
        public String getToken() { return Token; }
        public SecurityResponse setToken(String value) { this.Token = value; return this; }
        public String getOAuthToken() { return OAuthToken; }
        public SecurityResponse setOAuthToken(String value) { this.OAuthToken = value; return this; }
        public String getDomain() { return Domain; }
        public SecurityResponse setDomain(String value) { this.Domain = value; return this; }
        public Boolean getIsAdmin() { return IsAdmin; }
        public SecurityResponse setIsAdmin(Boolean value) { this.IsAdmin = value; return this; }
        public UserDetail getUserDetails() { return UserDetails; }
        public SecurityResponse setUserDetails(UserDetail value) { this.UserDetails = value; return this; }
        public ArrayList<AccountDetail> getAccountDetails() { return AccountDetails; }
        public SecurityResponse setAccountDetails(ArrayList<AccountDetail> value) { this.AccountDetails = value; return this; }
    }

    @DataContract
    public static class BaseResponse
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
        public BaseResponseResult Status = null;
        
        public BaseResponseResult getStatus() { return Status; }
        public BaseResponse setStatus(BaseResponseResult value) { this.Status = value; return this; }
    }

    @DataContract
    public static class BaseResponseResult
    {
        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
        public String StatusCode = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
        public String Login = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
        public String ErrorCode = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
        public String ErrorDisplayText = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
        public String ErrorMessage = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
        public String DomainName = null;

        /**
        * 
        */
        @DataMember
        @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
        public String IpAddress = null;
        
        public String getStatusCode() { return StatusCode; }
        public BaseResponseResult setStatusCode(String value) { this.StatusCode = value; return this; }
        public String getLogin() { return Login; }
        public BaseResponseResult setLogin(String value) { this.Login = value; return this; }
        public String getErrorCode() { return ErrorCode; }
        public BaseResponseResult setErrorCode(String value) { this.ErrorCode = value; return this; }
        public String getErrorDisplayText() { return ErrorDisplayText; }
        public BaseResponseResult setErrorDisplayText(String value) { this.ErrorDisplayText = value; return this; }
        public String getErrorMessage() { return ErrorMessage; }
        public BaseResponseResult setErrorMessage(String value) { this.ErrorMessage = value; return this; }
        public String getDomainName() { return DomainName; }
        public BaseResponseResult setDomainName(String value) { this.DomainName = value; return this; }
        public String getIpAddress() { return IpAddress; }
        public BaseResponseResult setIpAddress(String value) { this.IpAddress = value; return this; }
    }

    @DataContract
    public static class UserDetail
    {
        @DataMember
        public String Firstname = null;

        @DataMember
        public String LastName = null;

        @DataMember
        public String Email = null;

        @DataMember
        public String Type = null;

        @DataMember
        public String Location = null;

        @DataMember
        public String LocationName = null;

        @DataMember
        public Integer AccountNumber = null;

        @DataMember
        public String TaxAuthority = null;

        @DataMember
        public String TaxAuthorityName = null;
        
        public String getFirstname() { return Firstname; }
        public UserDetail setFirstname(String value) { this.Firstname = value; return this; }
        public String getLastName() { return LastName; }
        public UserDetail setLastName(String value) { this.LastName = value; return this; }
        public String getEmail() { return Email; }
        public UserDetail setEmail(String value) { this.Email = value; return this; }
        public String getType() { return Type; }
        public UserDetail setType(String value) { this.Type = value; return this; }
        public String getLocation() { return Location; }
        public UserDetail setLocation(String value) { this.Location = value; return this; }
        public String getLocationName() { return LocationName; }
        public UserDetail setLocationName(String value) { this.LocationName = value; return this; }
        public Integer getAccountNumber() { return AccountNumber; }
        public UserDetail setAccountNumber(Integer value) { this.AccountNumber = value; return this; }
        public String getTaxAuthority() { return TaxAuthority; }
        public UserDetail setTaxAuthority(String value) { this.TaxAuthority = value; return this; }
        public String getTaxAuthorityName() { return TaxAuthorityName; }
        public UserDetail setTaxAuthorityName(String value) { this.TaxAuthorityName = value; return this; }
    }

    @DataContract
    public static class AccountDetail
    {
        @DataMember
        public Integer Acct = null;

        @DataMember
        public String AcctType = null;

        @DataMember
        public String Name = null;
        
        public Integer getAcct() { return Acct; }
        public AccountDetail setAcct(Integer value) { this.Acct = value; return this; }
        public String getAcctType() { return AcctType; }
        public AccountDetail setAcctType(String value) { this.AcctType = value; return this; }
        public String getName() { return Name; }
        public AccountDetail setName(String value) { this.Name = value; return this; }
    }

}

Java SecurityRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/Security HTTP/1.1 
Host: active-ewebservice.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Username":"String","Token":"String","Password":"String","DeviceID":"String","AppID":"String","Acct":0,"DeviceName":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Token":"String","OAuthToken":"String","Domain":"String","IsAdmin":false,"UserDetails":{"Firstname":"String","LastName":"String","Email":"String","Type":"String","Location":"String","LocationName":"String","AccountNumber":0,"TaxAuthority":"String","TaxAuthorityName":"String"},"AccountDetails":[{"Acct":0,"AcctType":"String","Name":"String"}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}