Antel API

<back to all web services

UpliftAuthRequest

Requires Authentication
The following routes are available for this service:
POST/uplift/auth
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 UpliftAuthRequestResponse extends ApiServiceResponse implements IConvertible
{
    String? upliftAuthRequestId;

    UpliftAuthRequestResponse({this.upliftAuthRequestId});
    UpliftAuthRequestResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    getTypeName() => "UpliftAuthRequestResponse";
    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 UpliftAuthRequest extends ApiServiceRequest implements IConvertible
{
    int? upliftSchedulePrincipleId;
    double? totalValue;
    double? totalUnits;
    String? region;
    String? channel;
    List<UpliftSealData>? seals;
    UpliftSealData? unbaggedItems;

    UpliftAuthRequest({this.upliftSchedulePrincipleId,this.totalValue,this.totalUnits,this.region,this.channel,this.seals,this.unbaggedItems});
    UpliftAuthRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        upliftSchedulePrincipleId = json['upliftSchedulePrincipleId'];
        totalValue = JsonConverters.toDouble(json['totalValue']);
        totalUnits = JsonConverters.toDouble(json['totalUnits']);
        region = json['region'];
        channel = json['channel'];
        seals = JsonConverters.fromJson(json['seals'],'List<UpliftSealData>',context!);
        unbaggedItems = JsonConverters.fromJson(json['unbaggedItems'],'UpliftSealData',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'upliftSchedulePrincipleId': upliftSchedulePrincipleId,
        'totalValue': totalValue,
        'totalUnits': totalUnits,
        'region': region,
        'channel': channel,
        'seals': JsonConverters.toJson(seals,'List<UpliftSealData>',context!),
        'unbaggedItems': JsonConverters.toJson(unbaggedItems,'UpliftSealData',context!)
    });

    getTypeName() => "UpliftAuthRequest";
    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()),
    'UpliftAuthRequestResponse': TypeInfo(TypeOf.Class, create:() => UpliftAuthRequestResponse()),
    '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>[]),
    'UpliftAuthRequest': TypeInfo(TypeOf.Class, create:() => UpliftAuthRequest()),
    'List<UpliftSealData>': TypeInfo(TypeOf.Class, create:() => <UpliftSealData>[]),
});

Dart UpliftAuthRequest 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/auth HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"upliftSchedulePrincipleId":0,"totalValue":0,"totalUnits":0,"region":"String","channel":"String","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},"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

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