Mercedes.VehicleManagement.API

<back to all web services

OnlineShowroomStockRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/OnlineShowroom/StockSearch for Online Showroom StockCalls Vehicle Data API online showroom stock endpoint and searches for vehicles given a list of retailers. The results are used to populate the Online Showroom Stock datatable grid in OneAdmin
import 'package:servicestack/servicestack.dart';

class StockDataRow implements IConvertible
{
    String commissionNumber = "";
    String description = "";
    String salesDescriptionLong = "";
    String model = "";
    String colour = "";
    String colourGroup = "";
    String fuelType = "";
    String transmission = "";
    String transmissionType = "";
    String packages = "";
    String lines = "";
    String upholstery = "";
    String upholsteryCode = "";
    String displayStockAgent = "";
    String location = "";
    String vin = "";
    String vid = "";
    String vehicleType = "";
    String vehicleClass = "";
    DateTime? creationDate;
    DateTime? lastUpdated;
    DateTime? portArrivalDate;
    double combinedGrossOfferValue = 0;
    String currentLocation = "";
    bool? notVisibleOnlineShowroom;
    String nvosReason = "";
    bool? nvosReasonOneAdminExcluded;
    bool? nvosReasonLinkedToBackOrder;
    bool? includedAfterDeduplication;
    bool? unique;
    bool? duplicate;
    int? duplicateGroup;
    bool? lowestComm;
    String rule = "";
    String fin = "";
    String chassisNumber = "";
    String modelYear = "";
    String modelYearCode = "";
    String halfModelYearCode = "";
    String fullModelYearCode = "";
    String bodyStyle = "";
    String engine = "";
    String cesarIdShipToParty = "";
    String vehicleUsageCode = "";
    double? acceleration;
    int? bootCapacity;
    double? topSpeed;
    String driveConcept = "";
    double? combustionPowerHp;
    double? electricPowerKw;
    double? electricPowerHp;
    double? combinedPowerKw;
    double? combinedPowerHP;
    bool? underOffer;
    bool? isSellable;
    bool? mbukSecured;
    bool? isDisplayStock;
    bool? isSpecialistCar;
    String account = "";
    String productRange = "";
    bool? isAMG;
    double actualPrice = 0;
    double retailPrice_ExVAT = 0;
    double retailPrice_IncVAT = 0;
    double otr = 0;
    String nst = "";
    String bm7NST = "";
    double? electricRange;
    double? electricConsumption;
    double? emission;
    String emissionDirective = "";
    String emissionCombined = "";
    String emissionExtraUrban = "";
    String emissionUrban = "";
    String energyEfficiencyClass = "";
    String wltpEmissionCombined = "";
    String wltpCombined = "";
    String wltpLow = "";
    String wltpMedium = "";
    String wltpHigh = "";
    String wltpExtraHigh = "";
    double totalMoneyOffersExclDiscretionary = 0;
    double discretionaryMoneyOffer = 0;
    double totalMoneyOffersInclDiscretionary = 0;
    int nonDiscretionaryNMOCount = 0;
    int nonDiscretionaryMOCount = 0;
    int discretionaryNMOCount = 0;
    int discretionaryMOCount = 0;
    double totalOfferVIPAmount = 0;
    String? stockLevelIndicator;
    DateTime? confirmedProductionDate;
    DateTime? forecastedArrivalDate;

    StockDataRow({this.commissionNumber="",this.description="",this.salesDescriptionLong="",this.model="",this.colour="",this.colourGroup="",this.fuelType="",this.transmission="",this.transmissionType="",this.packages="",this.lines="",this.upholstery="",this.upholsteryCode="",this.displayStockAgent="",this.location="",this.vin="",this.vid="",this.vehicleType="",this.vehicleClass="",this.creationDate,this.lastUpdated,this.portArrivalDate,this.combinedGrossOfferValue=0,this.currentLocation="",this.notVisibleOnlineShowroom,this.nvosReason="",this.nvosReasonOneAdminExcluded,this.nvosReasonLinkedToBackOrder,this.includedAfterDeduplication,this.unique,this.duplicate,this.duplicateGroup,this.lowestComm,this.rule="",this.fin="",this.chassisNumber="",this.modelYear="",this.modelYearCode="",this.halfModelYearCode="",this.fullModelYearCode="",this.bodyStyle="",this.engine="",this.cesarIdShipToParty="",this.vehicleUsageCode="",this.acceleration,this.bootCapacity,this.topSpeed,this.driveConcept="",this.combustionPowerHp,this.electricPowerKw,this.electricPowerHp,this.combinedPowerKw,this.combinedPowerHP,this.underOffer,this.isSellable,this.mbukSecured,this.isDisplayStock,this.isSpecialistCar,this.account="",this.productRange="",this.isAMG,this.actualPrice=0,this.retailPrice_ExVAT=0,this.retailPrice_IncVAT=0,this.otr=0,this.nst="",this.bm7NST="",this.electricRange,this.electricConsumption,this.emission,this.emissionDirective="",this.emissionCombined="",this.emissionExtraUrban="",this.emissionUrban="",this.energyEfficiencyClass="",this.wltpEmissionCombined="",this.wltpCombined="",this.wltpLow="",this.wltpMedium="",this.wltpHigh="",this.wltpExtraHigh="",this.totalMoneyOffersExclDiscretionary=0,this.discretionaryMoneyOffer=0,this.totalMoneyOffersInclDiscretionary=0,this.nonDiscretionaryNMOCount=0,this.nonDiscretionaryMOCount=0,this.discretionaryNMOCount=0,this.discretionaryMOCount=0,this.totalOfferVIPAmount=0,this.stockLevelIndicator,this.confirmedProductionDate,this.forecastedArrivalDate});
    StockDataRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        commissionNumber = json['commissionNumber'] ?? "";
        description = json['description'] ?? "";
        salesDescriptionLong = json['salesDescriptionLong'] ?? "";
        model = json['model'] ?? "";
        colour = json['colour'] ?? "";
        colourGroup = json['colourGroup'] ?? "";
        fuelType = json['fuelType'] ?? "";
        transmission = json['transmission'] ?? "";
        transmissionType = json['transmissionType'] ?? "";
        packages = json['packages'] ?? "";
        lines = json['lines'] ?? "";
        upholstery = json['upholstery'] ?? "";
        upholsteryCode = json['upholsteryCode'] ?? "";
        displayStockAgent = json['displayStockAgent'] ?? "";
        location = json['location'] ?? "";
        vin = json['vin'] ?? "";
        vid = json['vid'] ?? "";
        vehicleType = json['vehicleType'] ?? "";
        vehicleClass = json['vehicleClass'] ?? "";
        creationDate = JsonConverters.fromJson(json['creationDate'],'DateTime',context!) ?? DateTime(0);
        lastUpdated = JsonConverters.fromJson(json['lastUpdated'],'DateTime',context!);
        portArrivalDate = JsonConverters.fromJson(json['portArrivalDate'],'DateTime',context!);
        combinedGrossOfferValue = JsonConverters.toDouble(json['combinedGrossOfferValue']) ?? 0;
        currentLocation = json['currentLocation'] ?? "";
        notVisibleOnlineShowroom = json['notVisibleOnlineShowroom'];
        nvosReason = json['nvosReason'] ?? "";
        nvosReasonOneAdminExcluded = json['nvosReasonOneAdminExcluded'];
        nvosReasonLinkedToBackOrder = json['nvosReasonLinkedToBackOrder'];
        includedAfterDeduplication = json['includedAfterDeduplication'];
        unique = json['unique'];
        duplicate = json['duplicate'];
        duplicateGroup = json['duplicateGroup'];
        lowestComm = json['lowestComm'];
        rule = json['rule'] ?? "";
        fin = json['fin'] ?? "";
        chassisNumber = json['chassisNumber'] ?? "";
        modelYear = json['modelYear'] ?? "";
        modelYearCode = json['modelYearCode'] ?? "";
        halfModelYearCode = json['halfModelYearCode'] ?? "";
        fullModelYearCode = json['fullModelYearCode'] ?? "";
        bodyStyle = json['bodyStyle'] ?? "";
        engine = json['engine'] ?? "";
        cesarIdShipToParty = json['cesarIdShipToParty'] ?? "";
        vehicleUsageCode = json['vehicleUsageCode'] ?? "";
        acceleration = JsonConverters.toDouble(json['acceleration']);
        bootCapacity = json['bootCapacity'];
        topSpeed = JsonConverters.toDouble(json['topSpeed']);
        driveConcept = json['driveConcept'] ?? "";
        combustionPowerHp = JsonConverters.toDouble(json['combustionPowerHp']);
        electricPowerKw = JsonConverters.toDouble(json['electricPowerKw']);
        electricPowerHp = JsonConverters.toDouble(json['electricPowerHp']);
        combinedPowerKw = JsonConverters.toDouble(json['combinedPowerKw']);
        combinedPowerHP = JsonConverters.toDouble(json['combinedPowerHP']);
        underOffer = json['underOffer'];
        isSellable = json['isSellable'];
        mbukSecured = json['mbukSecured'];
        isDisplayStock = json['isDisplayStock'];
        isSpecialistCar = json['isSpecialistCar'];
        account = json['account'] ?? "";
        productRange = json['productRange'] ?? "";
        isAMG = json['isAMG'];
        actualPrice = JsonConverters.toDouble(json['actualPrice']) ?? 0;
        retailPrice_ExVAT = JsonConverters.toDouble(json['retailPrice_ExVAT']) ?? 0;
        retailPrice_IncVAT = JsonConverters.toDouble(json['retailPrice_IncVAT']) ?? 0;
        otr = JsonConverters.toDouble(json['otr']) ?? 0;
        nst = json['nst'] ?? "";
        bm7NST = json['bm7NST'] ?? "";
        electricRange = JsonConverters.toDouble(json['electricRange']);
        electricConsumption = JsonConverters.toDouble(json['electricConsumption']);
        emission = JsonConverters.toDouble(json['emission']);
        emissionDirective = json['emissionDirective'] ?? "";
        emissionCombined = json['emissionCombined'] ?? "";
        emissionExtraUrban = json['emissionExtraUrban'] ?? "";
        emissionUrban = json['emissionUrban'] ?? "";
        energyEfficiencyClass = json['energyEfficiencyClass'] ?? "";
        wltpEmissionCombined = json['wltpEmissionCombined'] ?? "";
        wltpCombined = json['wltpCombined'] ?? "";
        wltpLow = json['wltpLow'] ?? "";
        wltpMedium = json['wltpMedium'] ?? "";
        wltpHigh = json['wltpHigh'] ?? "";
        wltpExtraHigh = json['wltpExtraHigh'] ?? "";
        totalMoneyOffersExclDiscretionary = JsonConverters.toDouble(json['totalMoneyOffersExclDiscretionary']) ?? 0;
        discretionaryMoneyOffer = JsonConverters.toDouble(json['discretionaryMoneyOffer']) ?? 0;
        totalMoneyOffersInclDiscretionary = JsonConverters.toDouble(json['totalMoneyOffersInclDiscretionary']) ?? 0;
        nonDiscretionaryNMOCount = json['nonDiscretionaryNMOCount'] ?? 0;
        nonDiscretionaryMOCount = json['nonDiscretionaryMOCount'] ?? 0;
        discretionaryNMOCount = json['discretionaryNMOCount'] ?? 0;
        discretionaryMOCount = json['discretionaryMOCount'] ?? 0;
        totalOfferVIPAmount = JsonConverters.toDouble(json['totalOfferVIPAmount']) ?? 0;
        stockLevelIndicator = json['stockLevelIndicator'];
        confirmedProductionDate = JsonConverters.fromJson(json['confirmedProductionDate'],'DateTime',context!);
        forecastedArrivalDate = JsonConverters.fromJson(json['forecastedArrivalDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'commissionNumber': commissionNumber,
        'description': description,
        'salesDescriptionLong': salesDescriptionLong,
        'model': model,
        'colour': colour,
        'colourGroup': colourGroup,
        'fuelType': fuelType,
        'transmission': transmission,
        'transmissionType': transmissionType,
        'packages': packages,
        'lines': lines,
        'upholstery': upholstery,
        'upholsteryCode': upholsteryCode,
        'displayStockAgent': displayStockAgent,
        'location': location,
        'vin': vin,
        'vid': vid,
        'vehicleType': vehicleType,
        'vehicleClass': vehicleClass,
        'creationDate': JsonConverters.toJson(creationDate,'DateTime',context!),
        'lastUpdated': JsonConverters.toJson(lastUpdated,'DateTime',context!),
        'portArrivalDate': JsonConverters.toJson(portArrivalDate,'DateTime',context!),
        'combinedGrossOfferValue': combinedGrossOfferValue,
        'currentLocation': currentLocation,
        'notVisibleOnlineShowroom': notVisibleOnlineShowroom,
        'nvosReason': nvosReason,
        'nvosReasonOneAdminExcluded': nvosReasonOneAdminExcluded,
        'nvosReasonLinkedToBackOrder': nvosReasonLinkedToBackOrder,
        'includedAfterDeduplication': includedAfterDeduplication,
        'unique': unique,
        'duplicate': duplicate,
        'duplicateGroup': duplicateGroup,
        'lowestComm': lowestComm,
        'rule': rule,
        'fin': fin,
        'chassisNumber': chassisNumber,
        'modelYear': modelYear,
        'modelYearCode': modelYearCode,
        'halfModelYearCode': halfModelYearCode,
        'fullModelYearCode': fullModelYearCode,
        'bodyStyle': bodyStyle,
        'engine': engine,
        'cesarIdShipToParty': cesarIdShipToParty,
        'vehicleUsageCode': vehicleUsageCode,
        'acceleration': acceleration,
        'bootCapacity': bootCapacity,
        'topSpeed': topSpeed,
        'driveConcept': driveConcept,
        'combustionPowerHp': combustionPowerHp,
        'electricPowerKw': electricPowerKw,
        'electricPowerHp': electricPowerHp,
        'combinedPowerKw': combinedPowerKw,
        'combinedPowerHP': combinedPowerHP,
        'underOffer': underOffer,
        'isSellable': isSellable,
        'mbukSecured': mbukSecured,
        'isDisplayStock': isDisplayStock,
        'isSpecialistCar': isSpecialistCar,
        'account': account,
        'productRange': productRange,
        'isAMG': isAMG,
        'actualPrice': actualPrice,
        'retailPrice_ExVAT': retailPrice_ExVAT,
        'retailPrice_IncVAT': retailPrice_IncVAT,
        'otr': otr,
        'nst': nst,
        'bm7NST': bm7NST,
        'electricRange': electricRange,
        'electricConsumption': electricConsumption,
        'emission': emission,
        'emissionDirective': emissionDirective,
        'emissionCombined': emissionCombined,
        'emissionExtraUrban': emissionExtraUrban,
        'emissionUrban': emissionUrban,
        'energyEfficiencyClass': energyEfficiencyClass,
        'wltpEmissionCombined': wltpEmissionCombined,
        'wltpCombined': wltpCombined,
        'wltpLow': wltpLow,
        'wltpMedium': wltpMedium,
        'wltpHigh': wltpHigh,
        'wltpExtraHigh': wltpExtraHigh,
        'totalMoneyOffersExclDiscretionary': totalMoneyOffersExclDiscretionary,
        'discretionaryMoneyOffer': discretionaryMoneyOffer,
        'totalMoneyOffersInclDiscretionary': totalMoneyOffersInclDiscretionary,
        'nonDiscretionaryNMOCount': nonDiscretionaryNMOCount,
        'nonDiscretionaryMOCount': nonDiscretionaryMOCount,
        'discretionaryNMOCount': discretionaryNMOCount,
        'discretionaryMOCount': discretionaryMOCount,
        'totalOfferVIPAmount': totalOfferVIPAmount,
        'stockLevelIndicator': stockLevelIndicator,
        'confirmedProductionDate': JsonConverters.toJson(confirmedProductionDate,'DateTime',context!),
        'forecastedArrivalDate': JsonConverters.toJson(forecastedArrivalDate,'DateTime',context!)
    };

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

class OnlineShowroomStockResponse implements IConvertible
{
    int totalVehicles = 0;
    List<StockDataRow> vehicles = [];

    OnlineShowroomStockResponse({this.totalVehicles=0,this.vehicles=const []});
    OnlineShowroomStockResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        totalVehicles = json['totalVehicles'] ?? 0;
        vehicles = JsonConverters.fromJson(json['vehicles'],'List<StockDataRow>',context!) ?? [];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'totalVehicles': totalVehicles,
        'vehicles': JsonConverters.toJson(vehicles,'List<StockDataRow>',context!)
    };

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

class OnlineShowroomStockRequest implements IPost, IConvertible
{
    List<String> gssns = [];

    OnlineShowroomStockRequest({this.gssns=const []});
    OnlineShowroomStockRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
    'StockDataRow': TypeInfo(TypeOf.Class, create:() => StockDataRow()),
    'OnlineShowroomStockResponse': TypeInfo(TypeOf.Class, create:() => OnlineShowroomStockResponse()),
    'List<StockDataRow>': TypeInfo(TypeOf.Class, create:() => <StockDataRow>[]),
    'OnlineShowroomStockRequest': TypeInfo(TypeOf.Class, create:() => OnlineShowroomStockRequest()),
});

Dart OnlineShowroomStockRequest DTOs

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

HTTP + JSV

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

POST /v1/OnlineShowroom/Stock HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	gssns: 
	[
		String
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	totalVehicles: 0,
	vehicles: 
	[
		{
			commissionNumber: String,
			description: String,
			salesDescriptionLong: String,
			model: String,
			colour: String,
			colourGroup: String,
			fuelType: String,
			transmission: String,
			transmissionType: String,
			packages: String,
			lines: String,
			upholstery: String,
			upholsteryCode: String,
			displayStockAgent: String,
			location: String,
			vin: String,
			vid: String,
			vehicleType: String,
			vehicleClass: String,
			creationDate: 0001-01-01,
			lastUpdated: 0001-01-01,
			portArrivalDate: 0001-01-01,
			combinedGrossOfferValue: 0,
			currentLocation: String,
			notVisibleOnlineShowroom: False,
			nvosReason: String,
			nvosReasonOneAdminExcluded: False,
			nvosReasonLinkedToBackOrder: False,
			includedAfterDeduplication: False,
			unique: False,
			duplicate: False,
			duplicateGroup: 0,
			lowestComm: False,
			rule: String,
			fin: String,
			chassisNumber: String,
			modelYear: String,
			modelYearCode: String,
			halfModelYearCode: String,
			fullModelYearCode: String,
			bodyStyle: String,
			engine: String,
			cesarIdShipToParty: String,
			vehicleUsageCode: String,
			acceleration: 0,
			bootCapacity: 0,
			topSpeed: 0,
			driveConcept: String,
			combustionPowerHp: 0,
			electricPowerKw: 0,
			electricPowerHp: 0,
			combinedPowerKw: 0,
			combinedPowerHP: 0,
			underOffer: False,
			isSellable: False,
			mbukSecured: False,
			isDisplayStock: False,
			isSpecialistCar: False,
			account: String,
			productRange: String,
			isAMG: False,
			actualPrice: 0,
			retailPrice_ExVAT: 0,
			retailPrice_IncVAT: 0,
			otr: 0,
			nst: String,
			bm7NST: String,
			electricRange: 0,
			electricConsumption: 0,
			emission: 0,
			emissionDirective: String,
			emissionCombined: String,
			emissionExtraUrban: String,
			emissionUrban: String,
			energyEfficiencyClass: String,
			wltpEmissionCombined: String,
			wltpCombined: String,
			wltpLow: String,
			wltpMedium: String,
			wltpHigh: String,
			wltpExtraHigh: String,
			totalMoneyOffersExclDiscretionary: 0,
			discretionaryMoneyOffer: 0,
			totalMoneyOffersInclDiscretionary: 0,
			nonDiscretionaryNMOCount: 0,
			nonDiscretionaryMOCount: 0,
			discretionaryNMOCount: 0,
			discretionaryMOCount: 0,
			totalOfferVIPAmount: 0,
			stockLevelIndicator: String,
			confirmedProductionDate: 0001-01-01,
			forecastedArrivalDate: 0001-01-01
		}
	]
}