Antel API

<back to all web services

FinaliseUplift

Requires Authentication
The following routes are available for this service:
POST/uplift/finalise
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 UpliftProductData:
    uplift_product_id: int = 0
    uplift_id: int = 0
    product_id: int = 0
    unit_price: Decimal = decimal.Decimal(0)
    name: Optional[str] = None
    category: Optional[str] = None
    unit_barcode: Optional[str] = None
    unit_size: Optional[str] = None
    unit_weight: Decimal = decimal.Decimal(0)
    code: Optional[str] = None
    uplift_images: Optional[List[Object]] = None
    quantity: float = 0.0
    value: Decimal = decimal.Decimal(0)
    price_over_max: bool = False
    quantity_over_max: bool = False
    quantity_over_requirement: bool = False
    serial_number: Optional[str] = None
    batch_code: Optional[str] = None
    stock_status_id: int = 0
    lot_number: Optional[str] = None
    expiry_date: Optional[str] = None
    manufacture_date: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpliftSealData:
    unbagged: bool = False
    seal_number: Optional[str] = None
    antel_seal_number: Optional[str] = None
    products: Optional[List[UpliftProductData]] = None
    total_price: float = 0.0
    total_quantity: float = 0.0
    net_weight: float = 0.0
    gross_weight: float = 0.0
    billable_seal: bool = False
    invalid_antel_seal_number: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpliftClaimData:
    uplift_claim_id: int = 0
    claim_units: int = 0
    claim_number: Optional[str] = None
    claim_value: Decimal = decimal.Decimal(0)
    claim_document_images: Optional[List[Object]] = None
    return_order_number: Optional[str] = None
    line_count: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveUpliftResponse(ApiServiceResponse):
    uplift_id: int = 0
    uplift_auth_request_id: Optional[str] = None
    seals: Optional[List[UpliftSealData]] = None
    unbagged_items: Optional[UpliftSealData] = None
    claims: Optional[List[UpliftClaimData]] = None
    delete_from_device: bool = False
    image_ids: Optional[List[str]] = None
    invalid_antel_seal: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinaliseUplift(ApiServiceRequest):
    uplift_id: int = 0
    incomplete_uplift_id: Optional[str] = None

Python FinaliseUplift DTOs

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

HTTP + OTHER

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

POST /uplift/finalise HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

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

{"upliftId":0,"seals":[{"unbagged":false,"sealNumber":"String","antelSealNumber":"String","products":[{"upliftProductId":0,"upliftId":0,"productId":0,"unitPrice":0,"name":"String","category":"String","unitBarcode":"String","unitSize":"String","unitWeight":0,"code":"String","upliftImages":[{}],"quantity":0,"value":0,"priceOverMax":false,"quantityOverMax":false,"quantityOverRequirement":false,"serialNumber":"String","batchCode":"String","stockStatusId":0,"lotNumber":"String","expiryDate":"String","manufactureDate":"String"}],"totalPrice":0,"totalQuantity":0,"netWeight":0,"grossWeight":0,"billableSeal":false,"invalidAntelSealNumber":false}],"unbaggedItems":{"unbagged":false,"sealNumber":"String","antelSealNumber":"String","products":[{"upliftProductId":0,"upliftId":0,"productId":0,"unitPrice":0,"name":"String","category":"String","unitBarcode":"String","unitSize":"String","unitWeight":0,"code":"String","upliftImages":[{}],"quantity":0,"value":0,"priceOverMax":false,"quantityOverMax":false,"quantityOverRequirement":false,"serialNumber":"String","batchCode":"String","stockStatusId":0,"lotNumber":"String","expiryDate":"String","manufactureDate":"String"}],"totalPrice":0,"totalQuantity":0,"netWeight":0,"grossWeight":0,"billableSeal":false,"invalidAntelSealNumber":false},"claims":[{"upliftClaimId":0,"claimUnits":0,"claimNumber":"String","claimValue":0,"claimDocumentImages":[{}],"returnOrderNumber":"String","lineCount":0}],"deleteFromDevice":false,"imageIds":["String"],"invalidAntelSeal":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"}}}