Antel API

<back to all web services

FinaliseUplift

Requires Authentication
The following routes are available for this service:
POST/uplift/finalise
import 'package:servicestack/servicestack.dart';

class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, IConvertible
{
    /**
    * The API Key required for authentication
    */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    String? apiKey;

    /**
    * Latitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Latitude of the user making this request")
    double? latitude;

    /**
    * Longitude of the user making this request
    */
    // @ApiMember(DataType="double", Description="Longitude of the user making this request")
    double? longitude;

    ApiServiceRequest({this.apiKey,this.latitude,this.longitude});
    ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        apiKey = json['apiKey'];
        latitude = JsonConverters.toDouble(json['latitude']);
        longitude = JsonConverters.toDouble(json['longitude']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'apiKey': apiKey,
        'latitude': latitude,
        'longitude': longitude
    };

    getTypeName() => "ApiServiceRequest";
    TypeContext? context = _ctx;
}

class ApiServiceResponse implements IServiceResponse, IConvertible
{
    /**
    * Information about the response.
    */
    // @ApiMember(Description="Information about the response.", IsRequired=true)
    String? description;

    /**
    * Heading or summary of the response.
    */
    // @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
    String? heading;

    /**
    * Did the intended operation for this response complete successfully?
    */
    // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
    bool? wasSuccessful;

    ResponseStatus? responseStatus;

    ApiServiceResponse({this.description,this.heading,this.wasSuccessful,this.responseStatus});
    ApiServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        description = json['description'];
        heading = json['heading'];
        wasSuccessful = json['wasSuccessful'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'description': description,
        'heading': heading,
        'wasSuccessful': wasSuccessful,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "ApiServiceResponse";
    TypeContext? context = _ctx;
}

class UpliftProductData implements IConvertible
{
    int? upliftProductId;
    int? upliftId;
    int? productId;
    double? unitPrice;
    String? name;
    String? category;
    String? unitBarcode;
    String? unitSize;
    double? unitWeight;
    String? code;
    List<dynamic>? upliftImages;
    double? quantity;
    double? value;
    bool? priceOverMax;
    bool? quantityOverMax;
    bool? quantityOverRequirement;
    String? serialNumber;
    String? batchCode;
    int? stockStatusId;
    String? lotNumber;
    String? expiryDate;
    String? manufactureDate;

    UpliftProductData({this.upliftProductId,this.upliftId,this.productId,this.unitPrice,this.name,this.category,this.unitBarcode,this.unitSize,this.unitWeight,this.code,this.upliftImages,this.quantity,this.value,this.priceOverMax,this.quantityOverMax,this.quantityOverRequirement,this.serialNumber,this.batchCode,this.stockStatusId,this.lotNumber,this.expiryDate,this.manufactureDate});
    UpliftProductData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        upliftProductId = json['upliftProductId'];
        upliftId = json['upliftId'];
        productId = json['productId'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        name = json['name'];
        category = json['category'];
        unitBarcode = json['unitBarcode'];
        unitSize = json['unitSize'];
        unitWeight = JsonConverters.toDouble(json['unitWeight']);
        code = json['code'];
        upliftImages = JsonConverters.fromJson(json['upliftImages'],'List<dynamic>',context!);
        quantity = JsonConverters.toDouble(json['quantity']);
        value = JsonConverters.toDouble(json['value']);
        priceOverMax = json['priceOverMax'];
        quantityOverMax = json['quantityOverMax'];
        quantityOverRequirement = json['quantityOverRequirement'];
        serialNumber = json['serialNumber'];
        batchCode = json['batchCode'];
        stockStatusId = json['stockStatusId'];
        lotNumber = json['lotNumber'];
        expiryDate = json['expiryDate'];
        manufactureDate = json['manufactureDate'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'upliftProductId': upliftProductId,
        'upliftId': upliftId,
        'productId': productId,
        'unitPrice': unitPrice,
        'name': name,
        'category': category,
        'unitBarcode': unitBarcode,
        'unitSize': unitSize,
        'unitWeight': unitWeight,
        'code': code,
        'upliftImages': JsonConverters.toJson(upliftImages,'List<dynamic>',context!),
        'quantity': quantity,
        'value': value,
        'priceOverMax': priceOverMax,
        'quantityOverMax': quantityOverMax,
        'quantityOverRequirement': quantityOverRequirement,
        'serialNumber': serialNumber,
        'batchCode': batchCode,
        'stockStatusId': stockStatusId,
        'lotNumber': lotNumber,
        'expiryDate': expiryDate,
        'manufactureDate': manufactureDate
    };

    getTypeName() => "UpliftProductData";
    TypeContext? context = _ctx;
}

class UpliftSealData implements IConvertible
{
    bool? unbagged;
    String? sealNumber;
    String? antelSealNumber;
    List<UpliftProductData>? products;
    double? totalPrice;
    double? totalQuantity;
    double? netWeight;
    double? grossWeight;
    bool? billableSeal;
    bool? invalidAntelSealNumber;

    UpliftSealData({this.unbagged,this.sealNumber,this.antelSealNumber,this.products,this.totalPrice,this.totalQuantity,this.netWeight,this.grossWeight,this.billableSeal,this.invalidAntelSealNumber});
    UpliftSealData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        unbagged = json['unbagged'];
        sealNumber = json['sealNumber'];
        antelSealNumber = json['antelSealNumber'];
        products = JsonConverters.fromJson(json['products'],'List<UpliftProductData>',context!);
        totalPrice = JsonConverters.toDouble(json['totalPrice']);
        totalQuantity = JsonConverters.toDouble(json['totalQuantity']);
        netWeight = JsonConverters.toDouble(json['netWeight']);
        grossWeight = JsonConverters.toDouble(json['grossWeight']);
        billableSeal = json['billableSeal'];
        invalidAntelSealNumber = json['invalidAntelSealNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'unbagged': unbagged,
        'sealNumber': sealNumber,
        'antelSealNumber': antelSealNumber,
        'products': JsonConverters.toJson(products,'List<UpliftProductData>',context!),
        'totalPrice': totalPrice,
        'totalQuantity': totalQuantity,
        'netWeight': netWeight,
        'grossWeight': grossWeight,
        'billableSeal': billableSeal,
        'invalidAntelSealNumber': invalidAntelSealNumber
    };

    getTypeName() => "UpliftSealData";
    TypeContext? context = _ctx;
}

class UpliftClaimData implements IConvertible
{
    int? upliftClaimId;
    int? claimUnits;
    String? claimNumber;
    double? claimValue;
    List<dynamic>? claimDocumentImages;
    String? returnOrderNumber;
    int? lineCount;

    UpliftClaimData({this.upliftClaimId,this.claimUnits,this.claimNumber,this.claimValue,this.claimDocumentImages,this.returnOrderNumber,this.lineCount});
    UpliftClaimData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        upliftClaimId = json['upliftClaimId'];
        claimUnits = json['claimUnits'];
        claimNumber = json['claimNumber'];
        claimValue = JsonConverters.toDouble(json['claimValue']);
        claimDocumentImages = JsonConverters.fromJson(json['claimDocumentImages'],'List<dynamic>',context!);
        returnOrderNumber = json['returnOrderNumber'];
        lineCount = json['lineCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'upliftClaimId': upliftClaimId,
        'claimUnits': claimUnits,
        'claimNumber': claimNumber,
        'claimValue': claimValue,
        'claimDocumentImages': JsonConverters.toJson(claimDocumentImages,'List<dynamic>',context!),
        'returnOrderNumber': returnOrderNumber,
        'lineCount': lineCount
    };

    getTypeName() => "UpliftClaimData";
    TypeContext? context = _ctx;
}

class SaveUpliftResponse extends ApiServiceResponse implements IConvertible
{
    int? upliftId;
    String? upliftAuthRequestId;
    List<UpliftSealData>? seals;
    UpliftSealData? unbaggedItems;
    List<UpliftClaimData>? claims;
    bool? deleteFromDevice;
    List<String>? imageIds;
    bool? invalidAntelSeal;

    SaveUpliftResponse({this.upliftId,this.upliftAuthRequestId,this.seals,this.unbaggedItems,this.claims,this.deleteFromDevice,this.imageIds,this.invalidAntelSeal});
    SaveUpliftResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        upliftId = json['upliftId'];
        upliftAuthRequestId = json['upliftAuthRequestId'];
        seals = JsonConverters.fromJson(json['seals'],'List<UpliftSealData>',context!);
        unbaggedItems = JsonConverters.fromJson(json['unbaggedItems'],'UpliftSealData',context!);
        claims = JsonConverters.fromJson(json['claims'],'List<UpliftClaimData>',context!);
        deleteFromDevice = json['deleteFromDevice'];
        imageIds = JsonConverters.fromJson(json['imageIds'],'List<String>',context!);
        invalidAntelSeal = json['invalidAntelSeal'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'upliftId': upliftId,
        'upliftAuthRequestId': upliftAuthRequestId,
        'seals': JsonConverters.toJson(seals,'List<UpliftSealData>',context!),
        'unbaggedItems': JsonConverters.toJson(unbaggedItems,'UpliftSealData',context!),
        'claims': JsonConverters.toJson(claims,'List<UpliftClaimData>',context!),
        'deleteFromDevice': deleteFromDevice,
        'imageIds': JsonConverters.toJson(imageIds,'List<String>',context!),
        'invalidAntelSeal': invalidAntelSeal
    });

    getTypeName() => "SaveUpliftResponse";
    TypeContext? context = _ctx;
}

class FinaliseUplift extends ApiServiceRequest implements IConvertible
{
    int? upliftId;
    String? incompleteUpliftId;

    FinaliseUplift({this.upliftId,this.incompleteUpliftId});
    FinaliseUplift.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        upliftId = json['upliftId'];
        incompleteUpliftId = json['incompleteUpliftId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'upliftId': upliftId,
        'incompleteUpliftId': incompleteUpliftId
    });

    getTypeName() => "FinaliseUplift";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'antel.api.dev.86degrees.com', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'ApiServiceResponse': TypeInfo(TypeOf.Class, create:() => ApiServiceResponse()),
    'UpliftProductData': TypeInfo(TypeOf.Class, create:() => UpliftProductData()),
    'List<dynamic>': TypeInfo(TypeOf.Class, create:() => <dynamic>[]),
    'UpliftSealData': TypeInfo(TypeOf.Class, create:() => UpliftSealData()),
    'List<UpliftProductData>': TypeInfo(TypeOf.Class, create:() => <UpliftProductData>[]),
    'UpliftClaimData': TypeInfo(TypeOf.Class, create:() => UpliftClaimData()),
    'SaveUpliftResponse': TypeInfo(TypeOf.Class, create:() => SaveUpliftResponse()),
    'List<UpliftSealData>': TypeInfo(TypeOf.Class, create:() => <UpliftSealData>[]),
    'List<UpliftClaimData>': TypeInfo(TypeOf.Class, create:() => <UpliftClaimData>[]),
    'FinaliseUplift': TypeInfo(TypeOf.Class, create:() => FinaliseUplift()),
});

Dart 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"}}}