Antel API

<back to all web services

UserLogin

The following routes are available for this service:
POST/user/login
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class UserLogin extends ApiServiceRequest
    {
        public String emailAddress = null;
        public String password = null;
        public Integer utcOffset = null;
        /**
        * The user's push token - used for push messages.
        */
        @ApiMember(Description="The user's push token - used for push messages.")
        public String pushPlayerId = null;

        /**
        * Refresh token used to auto login the user.
        */
        @ApiMember(Description="Refresh token used to auto login the user.")
        public String refreshToken = null;
        
        public String getEmailAddress() { return emailAddress; }
        public UserLogin setEmailAddress(String value) { this.emailAddress = value; return this; }
        public String getPassword() { return password; }
        public UserLogin setPassword(String value) { this.password = value; return this; }
        public Integer getUtcOffset() { return utcOffset; }
        public UserLogin setUtcOffset(Integer value) { this.utcOffset = value; return this; }
        public String getPushPlayerId() { return pushPlayerId; }
        public UserLogin setPushPlayerId(String value) { this.pushPlayerId = value; return this; }
        public String getRefreshToken() { return refreshToken; }
        public UserLogin setRefreshToken(String value) { this.refreshToken = value; return this; }
    }

    public static class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
    {
        /**
        * The API Key required for authentication
        */
        @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
        public String apiKey = null;

        /**
        * Latitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Latitude of the user making this request")
        public Double latitude = null;

        /**
        * Longitude of the user making this request
        */
        @ApiMember(DataType="double", Description="Longitude of the user making this request")
        public Double longitude = null;
        
        public String getApiKey() { return apiKey; }
        public ApiServiceRequest setApiKey(String value) { this.apiKey = value; return this; }
        public Double getLatitude() { return latitude; }
        public ApiServiceRequest setLatitude(Double value) { this.latitude = value; return this; }
        public Double getLongitude() { return longitude; }
        public ApiServiceRequest setLongitude(Double value) { this.longitude = value; return this; }
    }

    public static class UserLoginResponse extends ApiServiceResponse
    {
        public LoginData data = null;
        
        public LoginData getData() { return data; }
        public UserLoginResponse setData(LoginData value) { this.data = value; return this; }
    }

    public static class ApiServiceResponse implements IServiceResponse
    {
        /**
        * Information about the response.
        */
        @ApiMember(Description="Information about the response.", IsRequired=true)
        public String description = null;

        /**
        * Heading or summary of the response.
        */
        @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
        public String heading = null;

        /**
        * Did the intended operation for this response complete successfully?
        */
        @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
        public Boolean wasSuccessful = null;

        public ResponseStatus responseStatus = null;
        
        public String getDescription() { return description; }
        public ApiServiceResponse setDescription(String value) { this.description = value; return this; }
        public String getHeading() { return heading; }
        public ApiServiceResponse setHeading(String value) { this.heading = value; return this; }
        public Boolean isWasSuccessful() { return wasSuccessful; }
        public ApiServiceResponse setWasSuccessful(Boolean value) { this.wasSuccessful = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public ApiServiceResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

    public static class LoginData
    {
        public Integer systemUserId = null;
        public String refreshToken = null;
        public String friendlyName = null;
        public BigDecimal vatValue = null;
        public Boolean canUplift = null;
        public Boolean stockCanDropOff = null;
        public Boolean stockCanCloseArrival = null;
        public Boolean blockUpliftIfLineCountDoesNotMatch = null;
        public Boolean blockUpliftIfQuantityDoesNotMatch = null;
        public Boolean canRipTip = null;
        public Boolean canDeleteUplifts = null;
        public ArrayList<StockOperatorData> stockOperators = null;
        public ArrayList<ClaimNumberRule> claimNumberRules = null;
        public Integer upliftSyncInterval = null;
        public Integer lateUpliftThreshold = null;
        public ArrayList<String> pauseUpliftReasons = null;
        public ArrayList<String> noGoodsToUpliftReasons = null;
        public BigDecimal blurryImageErrorScore = null;
        public BigDecimal blurryImageWarningScore = null;
        public Boolean blurryImageDetectionEnabled = null;
        public String profileImageUrl = null;
        public Double claimValueWarningVariance = null;
        public Boolean stockCanVehicleAssignment = null;
        public Boolean stockCanOperatorAssignment = null;
        public Boolean stockCanStockEnd = null;
        public Boolean stockCanCheckSealDetails = null;
        public Boolean stockManualEnabled = null;
        
        public Integer getSystemUserId() { return systemUserId; }
        public LoginData setSystemUserId(Integer value) { this.systemUserId = value; return this; }
        public String getRefreshToken() { return refreshToken; }
        public LoginData setRefreshToken(String value) { this.refreshToken = value; return this; }
        public String getFriendlyName() { return friendlyName; }
        public LoginData setFriendlyName(String value) { this.friendlyName = value; return this; }
        public BigDecimal getVatValue() { return vatValue; }
        public LoginData setVatValue(BigDecimal value) { this.vatValue = value; return this; }
        public Boolean isCanUplift() { return canUplift; }
        public LoginData setCanUplift(Boolean value) { this.canUplift = value; return this; }
        public Boolean isStockCanDropOff() { return stockCanDropOff; }
        public LoginData setStockCanDropOff(Boolean value) { this.stockCanDropOff = value; return this; }
        public Boolean isStockCanCloseArrival() { return stockCanCloseArrival; }
        public LoginData setStockCanCloseArrival(Boolean value) { this.stockCanCloseArrival = value; return this; }
        public Boolean isBlockUpliftIfLineCountDoesNotMatch() { return blockUpliftIfLineCountDoesNotMatch; }
        public LoginData setBlockUpliftIfLineCountDoesNotMatch(Boolean value) { this.blockUpliftIfLineCountDoesNotMatch = value; return this; }
        public Boolean isBlockUpliftIfQuantityDoesNotMatch() { return blockUpliftIfQuantityDoesNotMatch; }
        public LoginData setBlockUpliftIfQuantityDoesNotMatch(Boolean value) { this.blockUpliftIfQuantityDoesNotMatch = value; return this; }
        public Boolean isCanRipTip() { return canRipTip; }
        public LoginData setCanRipTip(Boolean value) { this.canRipTip = value; return this; }
        public Boolean isCanDeleteUplifts() { return canDeleteUplifts; }
        public LoginData setCanDeleteUplifts(Boolean value) { this.canDeleteUplifts = value; return this; }
        public ArrayList<StockOperatorData> getStockOperators() { return stockOperators; }
        public LoginData setStockOperators(ArrayList<StockOperatorData> value) { this.stockOperators = value; return this; }
        public ArrayList<ClaimNumberRule> getClaimNumberRules() { return claimNumberRules; }
        public LoginData setClaimNumberRules(ArrayList<ClaimNumberRule> value) { this.claimNumberRules = value; return this; }
        public Integer getUpliftSyncInterval() { return upliftSyncInterval; }
        public LoginData setUpliftSyncInterval(Integer value) { this.upliftSyncInterval = value; return this; }
        public Integer getLateUpliftThreshold() { return lateUpliftThreshold; }
        public LoginData setLateUpliftThreshold(Integer value) { this.lateUpliftThreshold = value; return this; }
        public ArrayList<String> getPauseUpliftReasons() { return pauseUpliftReasons; }
        public LoginData setPauseUpliftReasons(ArrayList<String> value) { this.pauseUpliftReasons = value; return this; }
        public ArrayList<String> getNoGoodsToUpliftReasons() { return noGoodsToUpliftReasons; }
        public LoginData setNoGoodsToUpliftReasons(ArrayList<String> value) { this.noGoodsToUpliftReasons = value; return this; }
        public BigDecimal getBlurryImageErrorScore() { return blurryImageErrorScore; }
        public LoginData setBlurryImageErrorScore(BigDecimal value) { this.blurryImageErrorScore = value; return this; }
        public BigDecimal getBlurryImageWarningScore() { return blurryImageWarningScore; }
        public LoginData setBlurryImageWarningScore(BigDecimal value) { this.blurryImageWarningScore = value; return this; }
        public Boolean isBlurryImageDetectionEnabled() { return blurryImageDetectionEnabled; }
        public LoginData setBlurryImageDetectionEnabled(Boolean value) { this.blurryImageDetectionEnabled = value; return this; }
        public String getProfileImageUrl() { return profileImageUrl; }
        public LoginData setProfileImageUrl(String value) { this.profileImageUrl = value; return this; }
        public Double getClaimValueWarningVariance() { return claimValueWarningVariance; }
        public LoginData setClaimValueWarningVariance(Double value) { this.claimValueWarningVariance = value; return this; }
        public Boolean isStockCanVehicleAssignment() { return stockCanVehicleAssignment; }
        public LoginData setStockCanVehicleAssignment(Boolean value) { this.stockCanVehicleAssignment = value; return this; }
        public Boolean isStockCanOperatorAssignment() { return stockCanOperatorAssignment; }
        public LoginData setStockCanOperatorAssignment(Boolean value) { this.stockCanOperatorAssignment = value; return this; }
        public Boolean isStockCanStockEnd() { return stockCanStockEnd; }
        public LoginData setStockCanStockEnd(Boolean value) { this.stockCanStockEnd = value; return this; }
        public Boolean isStockCanCheckSealDetails() { return stockCanCheckSealDetails; }
        public LoginData setStockCanCheckSealDetails(Boolean value) { this.stockCanCheckSealDetails = value; return this; }
        public Boolean isStockManualEnabled() { return stockManualEnabled; }
        public LoginData setStockManualEnabled(Boolean value) { this.stockManualEnabled = value; return this; }
    }

    public static class StockOperatorData
    {
        public Integer id = null;
        public String name = null;
        
        public Integer getId() { return id; }
        public StockOperatorData setId(Integer value) { this.id = value; return this; }
        public String getName() { return name; }
        public StockOperatorData setName(String value) { this.name = value; return this; }
    }

    public static class ClaimNumberRule
    {
        public Integer principalId = null;
        public String channelName = null;
        public String rulePattern = null;
        
        public Integer getPrincipalId() { return principalId; }
        public ClaimNumberRule setPrincipalId(Integer value) { this.principalId = value; return this; }
        public String getChannelName() { return channelName; }
        public ClaimNumberRule setChannelName(String value) { this.channelName = value; return this; }
        public String getRulePattern() { return rulePattern; }
        public ClaimNumberRule setRulePattern(String value) { this.rulePattern = value; return this; }
    }

}

Java UserLogin DTOs

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

HTTP + JSV

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

POST /user/login HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	emailAddress: String,
	password: String,
	utcOffset: 0,
	pushPlayerId: String,
	refreshToken: String,
	apiKey: String,
	latitude: 0,
	longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	{
		systemUserId: 0,
		refreshToken: String,
		friendlyName: String,
		vatValue: 0,
		canUplift: False,
		stockCanDropOff: False,
		stockCanCloseArrival: False,
		blockUpliftIfLineCountDoesNotMatch: False,
		blockUpliftIfQuantityDoesNotMatch: False,
		canRipTip: False,
		canDeleteUplifts: False,
		stockOperators: 
		[
			{
				
			}
		],
		claimNumberRules: 
		[
			{
				
			}
		],
		upliftSyncInterval: 0,
		lateUpliftThreshold: 0,
		pauseUpliftReasons: 
		[
			String
		],
		noGoodsToUpliftReasons: 
		[
			String
		],
		blurryImageErrorScore: 0,
		blurryImageWarningScore: 0,
		blurryImageDetectionEnabled: False,
		profileImageUrl: String,
		claimValueWarningVariance: 0,
		stockCanVehicleAssignment: False,
		stockCanOperatorAssignment: False,
		stockCanStockEnd: False,
		stockCanCheckSealDetails: False,
		stockManualEnabled: False
	},
	description: String,
	heading: String,
	wasSuccessful: False,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}