Antel API

<back to all web services

UserLogin

The following routes are available for this service:
POST/user/login
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiServiceRequest(IServiceRequest, IHasApiKey, IHasDeviceInfo):
    # @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    api_key: Optional[str] = None
    """
    The API Key required for authentication
    """


    # @ApiMember(DataType="double", Description="Latitude of the user making this request")
    latitude: float = 0.0
    """
    Latitude of the user making this request
    """


    # @ApiMember(DataType="double", Description="Longitude of the user making this request")
    longitude: float = 0.0
    """
    Longitude of the user making this request
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiServiceResponse(IServiceResponse):
    # @ApiMember(Description="Information about the response.", IsRequired=true)
    description: Optional[str] = None
    """
    Information about the response.
    """


    # @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
    heading: Optional[str] = None
    """
    Heading or summary of the response.
    """


    # @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
    was_successful: bool = False
    """
    Did the intended operation for this response complete successfully?
    """


    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class StockOperatorData:
    id: int = 0
    name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ClaimNumberRule:
    principal_id: int = 0
    channel_name: Optional[str] = None
    rule_pattern: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class LoginData:
    system_user_id: int = 0
    refresh_token: Optional[str] = None
    friendly_name: Optional[str] = None
    vat_value: Decimal = decimal.Decimal(0)
    can_uplift: bool = False
    stock_can_drop_off: bool = False
    stock_can_close_arrival: bool = False
    block_uplift_if_line_count_does_not_match: bool = False
    block_uplift_if_quantity_does_not_match: bool = False
    can_rip_tip: bool = False
    can_delete_uplifts: bool = False
    stock_operators: Optional[List[StockOperatorData]] = None
    claim_number_rules: Optional[List[ClaimNumberRule]] = None
    uplift_sync_interval: int = 0
    late_uplift_threshold: int = 0
    pause_uplift_reasons: Optional[List[str]] = None
    no_goods_to_uplift_reasons: Optional[List[str]] = None
    blurry_image_error_score: Decimal = decimal.Decimal(0)
    blurry_image_warning_score: Decimal = decimal.Decimal(0)
    blurry_image_detection_enabled: bool = False
    profile_image_url: Optional[str] = None
    claim_value_warning_variance: float = 0.0
    stock_can_vehicle_assignment: bool = False
    stock_can_operator_assignment: bool = False
    stock_can_stock_end: bool = False
    stock_can_check_seal_details: bool = False
    stock_manual_enabled: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserLoginResponse(ApiServiceResponse):
    data: Optional[LoginData] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserLogin(ApiServiceRequest):
    email_address: Optional[str] = None
    password: Optional[str] = None
    utc_offset: int = 0
    # @ApiMember(Description="The user's push token - used for push messages.")
    push_player_id: Optional[str] = None
    """
    The user's push token - used for push messages.
    """


    # @ApiMember(Description="Refresh token used to auto login the user.")
    refresh_token: Optional[str] = None
    """
    Refresh token used to auto login the user.
    """

Python 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
		}
	}
}