Mercedes.VehicleManagement.API

<back to all web services

VehicleDetailsRequest

Vehicle
Requires Authentication
The following routes are available for this service:
GET/v1/details/{vehicleType}/{Identifier}Get Vehicle Details
GET/details/{vehicleType}/{Identifier}Get Vehicle Details
import 'package:servicestack/servicestack.dart';

class VehicleAuditDetails implements IConvertible
{
    String? userId;
    bool? status;
    String? notes;
    String? creationDate;

    VehicleAuditDetails({this.userId,this.status,this.notes,this.creationDate});
    VehicleAuditDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        userId = json['userId'];
        status = json['status'];
        notes = json['notes'];
        creationDate = json['creationDate'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'userId': userId,
        'status': status,
        'notes': notes,
        'creationDate': creationDate
    };

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

class BackOrderVehicleDetailsBase implements IConvertible
{
    String? vin;
    String? commissionNumber;
    String? description;
    String? model;
    String? fullModelYearCode;
    int? retailerId;
    String? imageUrl;
    String? colour;
    String? colourDescription;
    String? bodyStyle;
    String? fuelType;
    String? transmission;
    String? transmissionType;
    String? package;
    List<String>? packages = [];
    String? line;
    String? upholstery;
    String? upholsteryDescription;
    String? usageCode;
    String? account;
    String? nst;
    String? baumuster;
    double? electricRange;
    double? electricConsumption;
    double? retailPrice_ExVAT;
    double? actualPrice;
    double? otrPrice;
    String? vehicleType;
    bool? secured;
    String? productionDate;
    DateTime? portArrivalDate;
    String? displayRetailer;
    String? location;
    String? bm7NST;
    bool? isAvailableOnline;
    bool? isSpecialistCar;
    bool? isSellable;
    bool? inBackOrderAccount;
    List<VehicleAuditDetails>? vehicleAuditDetails = [];
    List<String>? ispVehicleCustomerDescriptions;
    bool? underOffer;
    bool? isAllocatedToBackOrder;

    BackOrderVehicleDetailsBase({this.vin,this.commissionNumber,this.description,this.model,this.fullModelYearCode,this.retailerId,this.imageUrl,this.colour,this.colourDescription,this.bodyStyle,this.fuelType,this.transmission,this.transmissionType,this.package,this.packages,this.line,this.upholstery,this.upholsteryDescription,this.usageCode,this.account,this.nst,this.baumuster,this.electricRange,this.electricConsumption,this.retailPrice_ExVAT,this.actualPrice,this.otrPrice,this.vehicleType,this.secured,this.productionDate,this.portArrivalDate,this.displayRetailer,this.location,this.bm7NST,this.isAvailableOnline,this.isSpecialistCar,this.isSellable,this.inBackOrderAccount,this.vehicleAuditDetails,this.ispVehicleCustomerDescriptions,this.underOffer,this.isAllocatedToBackOrder});
    BackOrderVehicleDetailsBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        vin = json['vin'];
        commissionNumber = json['commissionNumber'];
        description = json['description'];
        model = json['model'];
        fullModelYearCode = json['fullModelYearCode'];
        retailerId = json['retailerId'];
        imageUrl = json['imageUrl'];
        colour = json['colour'];
        colourDescription = json['colourDescription'];
        bodyStyle = json['bodyStyle'];
        fuelType = json['fuelType'];
        transmission = json['transmission'];
        transmissionType = json['transmissionType'];
        package = json['package'];
        packages = JsonConverters.fromJson(json['packages'],'List<String>',context!);
        line = json['line'];
        upholstery = json['upholstery'];
        upholsteryDescription = json['upholsteryDescription'];
        usageCode = json['usageCode'];
        account = json['account'];
        nst = json['nst'];
        baumuster = json['baumuster'];
        electricRange = JsonConverters.toDouble(json['electricRange']);
        electricConsumption = JsonConverters.toDouble(json['electricConsumption']);
        retailPrice_ExVAT = JsonConverters.toDouble(json['retailPrice_ExVAT']);
        actualPrice = JsonConverters.toDouble(json['actualPrice']);
        otrPrice = JsonConverters.toDouble(json['otrPrice']);
        vehicleType = json['vehicleType'];
        secured = json['secured'];
        productionDate = json['productionDate'];
        portArrivalDate = JsonConverters.fromJson(json['portArrivalDate'],'DateTime',context!);
        displayRetailer = json['displayRetailer'];
        location = json['location'];
        bm7NST = json['bm7NST'];
        isAvailableOnline = json['isAvailableOnline'];
        isSpecialistCar = json['isSpecialistCar'];
        isSellable = json['isSellable'];
        inBackOrderAccount = json['inBackOrderAccount'];
        vehicleAuditDetails = JsonConverters.fromJson(json['vehicleAuditDetails'],'List<VehicleAuditDetails>',context!);
        ispVehicleCustomerDescriptions = JsonConverters.fromJson(json['ispVehicleCustomerDescriptions'],'List<String>',context!);
        underOffer = json['underOffer'];
        isAllocatedToBackOrder = json['isAllocatedToBackOrder'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'vin': vin,
        'commissionNumber': commissionNumber,
        'description': description,
        'model': model,
        'fullModelYearCode': fullModelYearCode,
        'retailerId': retailerId,
        'imageUrl': imageUrl,
        'colour': colour,
        'colourDescription': colourDescription,
        'bodyStyle': bodyStyle,
        'fuelType': fuelType,
        'transmission': transmission,
        'transmissionType': transmissionType,
        'package': package,
        'packages': JsonConverters.toJson(packages,'List<String>',context!),
        'line': line,
        'upholstery': upholstery,
        'upholsteryDescription': upholsteryDescription,
        'usageCode': usageCode,
        'account': account,
        'nst': nst,
        'baumuster': baumuster,
        'electricRange': electricRange,
        'electricConsumption': electricConsumption,
        'retailPrice_ExVAT': retailPrice_ExVAT,
        'actualPrice': actualPrice,
        'otrPrice': otrPrice,
        'vehicleType': vehicleType,
        'secured': secured,
        'productionDate': productionDate,
        'portArrivalDate': JsonConverters.toJson(portArrivalDate,'DateTime',context!),
        'displayRetailer': displayRetailer,
        'location': location,
        'bm7NST': bm7NST,
        'isAvailableOnline': isAvailableOnline,
        'isSpecialistCar': isSpecialistCar,
        'isSellable': isSellable,
        'inBackOrderAccount': inBackOrderAccount,
        'vehicleAuditDetails': JsonConverters.toJson(vehicleAuditDetails,'List<VehicleAuditDetails>',context!),
        'ispVehicleCustomerDescriptions': JsonConverters.toJson(ispVehicleCustomerDescriptions,'List<String>',context!),
        'underOffer': underOffer,
        'isAllocatedToBackOrder': isAllocatedToBackOrder
    };

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

class BackOrderVehicleDetails extends BackOrderVehicleDetailsBase implements IConvertible
{
    String? engine;

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

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

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

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

class VehicleDetailsResponse implements IConvertible
{
    BackOrderVehicleDetails? vehicle;

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

    fromMap(Map<String, dynamic> json) {
        vehicle = JsonConverters.fromJson(json['vehicle'],'BackOrderVehicleDetails',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'vehicle': JsonConverters.toJson(vehicle,'BackOrderVehicleDetails',context!)
    };

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

class VehicleDetailsRequest implements IGet, IConvertible
{
    String? identifier;
    String? vehicleType;

    VehicleDetailsRequest({this.identifier,this.vehicleType});
    VehicleDetailsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        identifier = json['identifier'];
        vehicleType = json['vehicleType'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'identifier': identifier,
        'vehicleType': vehicleType
    };

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

TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
    'VehicleAuditDetails': TypeInfo(TypeOf.Class, create:() => VehicleAuditDetails()),
    'BackOrderVehicleDetailsBase': TypeInfo(TypeOf.Class, create:() => BackOrderVehicleDetailsBase()),
    'List<VehicleAuditDetails>': TypeInfo(TypeOf.Class, create:() => <VehicleAuditDetails>[]),
    'BackOrderVehicleDetails': TypeInfo(TypeOf.Class, create:() => BackOrderVehicleDetails()),
    'VehicleDetailsResponse': TypeInfo(TypeOf.Class, create:() => VehicleDetailsResponse()),
    'VehicleDetailsRequest': TypeInfo(TypeOf.Class, create:() => VehicleDetailsRequest()),
});

Dart VehicleDetailsRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /v1/details/{vehicleType}/{Identifier} HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"vehicle":{"engine":"String","vin":"String","commissionNumber":"String","description":"String","model":"String","fullModelYearCode":"String","retailerId":0,"imageUrl":"String","colour":"String","colourDescription":"String","bodyStyle":"String","fuelType":"String","transmission":"String","transmissionType":"String","package":"String","packages":["String"],"line":"String","upholstery":"String","upholsteryDescription":"String","usageCode":"String","account":"String","nst":"String","baumuster":"String","electricRange":0,"electricConsumption":0,"retailPrice_ExVAT":0,"actualPrice":0,"otrPrice":0,"vehicleType":"String","secured":false,"productionDate":"String","portArrivalDate":"\/Date(-62135596800000-0000)\/","displayRetailer":"String","location":"String","bm7NST":"String","isAvailableOnline":false,"isSpecialistCar":false,"isSellable":false,"inBackOrderAccount":false,"vehicleAuditDetails":[{"userId":"String","status":false,"notes":"String","creationDate":"String"}],"ispVehicleCustomerDescriptions":["String"],"underOffer":false,"isAllocatedToBackOrder":false}}