| POST | /stock/order/assignment/finish |
|---|
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 StockOperationSealItem:
uplift_number: Optional[str] = None
seal_number: Optional[str] = None
principal_name: Optional[str] = None
current_weight: float = 0.0
weight_difference: float = 0.0
operator_name: Optional[str] = None
outlet_name: Optional[str] = None
uplift_date: Optional[str] = None
paused_awaiting_auth: bool = False
uplift_pdf_link: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class StockOperationSummary:
scanned_seals: Optional[List[StockOperationSealItem]] = None
missing_seals: Optional[List[StockOperationSealItem]] = None
unknown_uplift_seals: Optional[List[StockOperationSealItem]] = None
paused_seals: Optional[List[StockOperationSealItem]] = None
weight_difference_seals: Optional[List[StockOperationSealItem]] = None
has_scanned_seals: bool = False
has_missing_seals: bool = False
has_weight_difference_seals: bool = False
has_unknown_uplift_seals: bool = False
has_paused_seals: bool = False
has_exception: bool = False
total_seals_count: int = 0
total_seals_weight: float = 0.0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinishOrderAssignmentResponse(ApiServiceResponse):
order_id: int = 0
estimated_seals: int = 0
operation_summary: Optional[StockOperationSummary] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinishOrderAssignment(ApiServiceRequest):
order_id: int = 0
Python FinishOrderAssignment DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /stock/order/assignment/finish HTTP/1.1
Host: antel.api.dev.86degrees.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<FinishOrderAssignment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
<ApiKey xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</ApiKey>
<Latitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Latitude>
<Longitude xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">0</Longitude>
<OrderId>0</OrderId>
</FinishOrderAssignment>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FinishOrderAssignmentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel">
<Description xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</Description>
<Heading xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">String</Heading>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types" xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/WebService.ServiceModel.Base">false</WasSuccessful>
<EstimatedSeals>0</EstimatedSeals>
<OperationSummary>
<MissingSeals>
<StockOperationSealItem>
<CurrentWeight>0</CurrentWeight>
<OperatorName>String</OperatorName>
<OutletName>String</OutletName>
<PausedAwaitingAuth>false</PausedAwaitingAuth>
<PrincipalName>String</PrincipalName>
<SealNumber>String</SealNumber>
<UpliftDate>String</UpliftDate>
<UpliftNumber>String</UpliftNumber>
<UpliftPdfLink>String</UpliftPdfLink>
<WeightDifference>0</WeightDifference>
</StockOperationSealItem>
</MissingSeals>
<PausedSeals>
<StockOperationSealItem>
<CurrentWeight>0</CurrentWeight>
<OperatorName>String</OperatorName>
<OutletName>String</OutletName>
<PausedAwaitingAuth>false</PausedAwaitingAuth>
<PrincipalName>String</PrincipalName>
<SealNumber>String</SealNumber>
<UpliftDate>String</UpliftDate>
<UpliftNumber>String</UpliftNumber>
<UpliftPdfLink>String</UpliftPdfLink>
<WeightDifference>0</WeightDifference>
</StockOperationSealItem>
</PausedSeals>
<ScannedSeals>
<StockOperationSealItem>
<CurrentWeight>0</CurrentWeight>
<OperatorName>String</OperatorName>
<OutletName>String</OutletName>
<PausedAwaitingAuth>false</PausedAwaitingAuth>
<PrincipalName>String</PrincipalName>
<SealNumber>String</SealNumber>
<UpliftDate>String</UpliftDate>
<UpliftNumber>String</UpliftNumber>
<UpliftPdfLink>String</UpliftPdfLink>
<WeightDifference>0</WeightDifference>
</StockOperationSealItem>
</ScannedSeals>
<UnknownUpliftSeals>
<StockOperationSealItem>
<CurrentWeight>0</CurrentWeight>
<OperatorName>String</OperatorName>
<OutletName>String</OutletName>
<PausedAwaitingAuth>false</PausedAwaitingAuth>
<PrincipalName>String</PrincipalName>
<SealNumber>String</SealNumber>
<UpliftDate>String</UpliftDate>
<UpliftNumber>String</UpliftNumber>
<UpliftPdfLink>String</UpliftPdfLink>
<WeightDifference>0</WeightDifference>
</StockOperationSealItem>
</UnknownUpliftSeals>
<WeightDifferenceSeals>
<StockOperationSealItem>
<CurrentWeight>0</CurrentWeight>
<OperatorName>String</OperatorName>
<OutletName>String</OutletName>
<PausedAwaitingAuth>false</PausedAwaitingAuth>
<PrincipalName>String</PrincipalName>
<SealNumber>String</SealNumber>
<UpliftDate>String</UpliftDate>
<UpliftNumber>String</UpliftNumber>
<UpliftPdfLink>String</UpliftPdfLink>
<WeightDifference>0</WeightDifference>
</StockOperationSealItem>
</WeightDifferenceSeals>
</OperationSummary>
<OrderId>0</OrderId>
</FinishOrderAssignmentResponse>