Antel API

<back to all web services

SealDetailsRequest

Requires Authentication
The following routes are available for this service:
POST/stock/seal/details
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 FileDataItem:
    file_name: Optional[str] = None
    file_url: Optional[str] = None
    thumbnail_url: Optional[str] = None
    file_id: Optional[str] = None
    thumbnail_id: Optional[str] = None
    link_id: int = 0
    created_date: datetime.datetime = datetime.datetime(1, 1, 1)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SealOrderHistoryItem:
    created_date: Optional[str] = None
    order_id: int = 0
    order_number: Optional[str] = None
    order_requesting_operator: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SealMovementHistoryItem:
    id: int = 0
    event_date_time: Optional[str] = None
    action_user_name: Optional[str] = None
    scanned_depot_name: Optional[str] = None
    assigned_bucket_name: Optional[str] = None
    assigned_order_number: Optional[str] = None
    assigned_operator_name: Optional[str] = None
    order_driver_name: Optional[str] = None
    order_driver_company_name: Optional[str] = None
    order_driver_license_plate: Optional[str] = None
    target_weight: float = 0.0
    current_weight: float = 0.0
    had_weight_issue: bool = False
    had_unknown_uplift: bool = False
    was_paused: bool = False
    paused_was_awaiting_auth: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SealDetailsResponse(ApiServiceResponse):
    principal_name: Optional[str] = None
    uplift_number: Optional[str] = None
    operator_name: Optional[str] = None
    outlet_name: Optional[str] = None
    uplift_date: Optional[str] = None
    seal_number: Optional[str] = None
    current_weight: Optional[str] = None
    target_weight: Optional[str] = None
    has_weight_issue: bool = False
    bucket_name: Optional[str] = None
    claim_numbers: Optional[List[str]] = None
    joined_claim_numbers: Optional[str] = None
    seal_images: Optional[List[FileDataItem]] = None
    order_history: Optional[List[SealOrderHistoryItem]] = None
    movement_history: Optional[List[SealMovementHistoryItem]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SealDetailsRequest(ApiServiceRequest):
    seal_id: int = 0

Python SealDetailsRequest 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 /stock/seal/details HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	sealId: 0,
	apiKey: String,
	latitude: 0,
	longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	principalName: String,
	upliftNumber: String,
	operatorName: String,
	outletName: String,
	upliftDate: String,
	sealNumber: String,
	currentWeight: String,
	targetWeight: String,
	hasWeightIssue: False,
	bucketName: String,
	claimNumbers: 
	[
		String
	],
	joinedClaimNumbers: String,
	sealImages: 
	[
		{
			fileName: String,
			fileUrl: String,
			thumbnailUrl: String,
			linkId: 0,
			createdDate: 0001-01-01
		}
	],
	orderHistory: 
	[
		{
			createdDate: String,
			orderId: 0,
			orderNumber: String,
			orderRequestingOperator: String
		}
	],
	movementHistory: 
	[
		{
			id: 0,
			eventDateTime: String,
			actionUserName: String,
			scannedDepotName: String,
			assignedBucketName: String,
			assignedOrderNumber: String,
			assignedOperatorName: String,
			orderDriverName: String,
			orderDriverCompanyName: String,
			orderDriverLicensePlate: String,
			targetWeight: 0,
			currentWeight: 0,
			hadWeightIssue: False,
			hadUnknownUplift: False,
			wasPaused: False,
			pausedWasAwaitingAuth: 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
		}
	}
}