| POST | /stock/closeArrival/order |
|---|
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 CloseOrderArrivalResponse(ApiServiceResponse):
order_number: Optional[str] = None
requesting_operator_name: Optional[str] = None
operator_name: Optional[str] = None
destination_depot: Optional[str] = None
driver_name: Optional[str] = None
company_name: Optional[str] = None
license_plate: Optional[str] = None
order_id: int = 0
estimated_seals: int = 0
operation_summary: Optional[StockOperationSummary] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CloseOrderArrival(ApiServiceRequest):
order_number: Optional[str] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /stock/closeArrival/order HTTP/1.1
Host: antel.api.dev.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
orderNumber: String,
apiKey: String,
latitude: 0,
longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
orderNumber: String,
requestingOperatorName: String,
operatorName: String,
destinationDepot: String,
driverName: String,
companyName: String,
licensePlate: String,
orderId: 0,
estimatedSeals: 0,
operationSummary:
{
scannedSeals:
[
{
upliftNumber: String,
sealNumber: String,
principalName: String,
currentWeight: 0,
weightDifference: 0,
operatorName: String,
outletName: String,
upliftDate: String,
pausedAwaitingAuth: False,
upliftPdfLink: String
}
],
missingSeals:
[
{
upliftNumber: String,
sealNumber: String,
principalName: String,
currentWeight: 0,
weightDifference: 0,
operatorName: String,
outletName: String,
upliftDate: String,
pausedAwaitingAuth: False,
upliftPdfLink: String
}
],
unknownUpliftSeals:
[
{
upliftNumber: String,
sealNumber: String,
principalName: String,
currentWeight: 0,
weightDifference: 0,
operatorName: String,
outletName: String,
upliftDate: String,
pausedAwaitingAuth: False,
upliftPdfLink: String
}
],
pausedSeals:
[
{
upliftNumber: String,
sealNumber: String,
principalName: String,
currentWeight: 0,
weightDifference: 0,
operatorName: String,
outletName: String,
upliftDate: String,
pausedAwaitingAuth: False,
upliftPdfLink: String
}
],
weightDifferenceSeals:
[
{
upliftNumber: String,
sealNumber: String,
principalName: String,
currentWeight: 0,
weightDifference: 0,
operatorName: String,
outletName: String,
upliftDate: String,
pausedAwaitingAuth: False,
upliftPdfLink: String
}
],
hasScannedSeals: True,
hasMissingSeals: True,
hasWeightDifferenceSeals: True,
hasUnknownUpliftSeals: True,
hasPausedSeals: True,
hasException: True,
totalSealsCount: 4,
totalSealsWeight: 0
},
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
}
}
}