Mercedes.VehicleManagement.API

<back to all web services

MotabilityVehiclesFilterRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/{VehicleType}/Vehicle/MotabilityFilter motability vehicle data
#![allow(
    dead_code,
    non_camel_case_types,
    non_snake_case,
    clippy::upper_case_acronyms
)]

use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::collections::HashMap;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct VehicleDataBase {
    pub vin: String,
    pub description: String,
    pub model: String,
    pub otr: String,
    #[serde(rename = "retailPriceExVAT")]
    pub retail_price_ex_v_a_t: String,
    #[serde(rename = "actualPrice")]
    pub actual_price: String,
    #[serde(rename = "p11D")]
    pub p11_d: String,
    #[serde(rename = "fuelType")]
    pub fuel_type: String,
    pub transmission: String,
    #[serde(rename = "transmissionType")]
    pub transmission_type: String,
    pub colour: String,
    #[serde(rename = "colourCode")]
    pub colour_code: String,
    #[serde(rename = "colourDescription")]
    pub colour_description: String,
    #[serde(rename = "commissionNumber")]
    pub commission_number: String,
    #[serde(rename = "offerAvailable")]
    pub offer_available: bool,
    #[serde(rename = "campaignDiscountOfferTotal")]
    pub campaign_discount_offer_total: i32,
    #[serde(rename = "campaignDiscountOfferTotalCurrent")]
    pub campaign_discount_offer_total_current: i32,
    #[serde(rename = "campaignDiscountOfferTotalPending")]
    pub campaign_discount_offer_total_pending: i32,
    #[serde(rename = "campaignServiceOfferTotal")]
    pub campaign_service_offer_total: i32,
    #[serde(rename = "campaignServiceOfferTotalCurrent")]
    pub campaign_service_offer_total_current: i32,
    #[serde(rename = "campaignServiceOfferTotalPending")]
    pub campaign_service_offer_total_pending: i32,
    #[serde(rename = "campaignCustomOfferTotal")]
    pub campaign_custom_offer_total: i32,
    #[serde(rename = "campaignPersonalisedOfferTotalCurrent")]
    pub campaign_personalised_offer_total_current: i32,
    #[serde(rename = "campaignPersonalisedOfferTotalPending")]
    pub campaign_personalised_offer_total_pending: i32,
    #[serde(rename = "campaignPersonalisedOfferTotal")]
    pub campaign_personalised_offer_total: i32,
    #[serde(rename = "campaignCustomOfferTotalCurrent")]
    pub campaign_custom_offer_total_current: i32,
    #[serde(rename = "campaignCustomOfferTotalPending")]
    pub campaign_custom_offer_total_pending: i32,
    #[serde(rename = "campaignOtherOfferTotal")]
    pub campaign_other_offer_total: i32,
    #[serde(rename = "campaignOtherOfferTotalCurrent")]
    pub campaign_other_offer_total_current: i32,
    #[serde(rename = "campaignOtherOfferTotalPending")]
    pub campaign_other_offer_total_pending: i32,
    #[serde(rename = "retailerDiscountOfferTotal")]
    pub retailer_discount_offer_total: i32,
    #[serde(rename = "retailerDiscountOfferTotalCurrent")]
    pub retailer_discount_offer_total_current: i32,
    #[serde(rename = "retailerDiscountOfferTotalPending")]
    pub retailer_discount_offer_total_pending: i32,
    #[serde(rename = "retailerServiceOfferTotal")]
    pub retailer_service_offer_total: i32,
    #[serde(rename = "retailerServiceOfferTotalCurrent")]
    pub retailer_service_offer_total_current: i32,
    #[serde(rename = "retailerServiceOfferTotalPending")]
    pub retailer_service_offer_total_pending: i32,
    #[serde(rename = "retailerCustomOfferTotal")]
    pub retailer_custom_offer_total: i32,
    #[serde(rename = "retailerCustomOfferTotalCurrent")]
    pub retailer_custom_offer_total_current: i32,
    #[serde(rename = "retailerCustomOfferTotalPending")]
    pub retailer_custom_offer_total_pending: i32,
    #[serde(rename = "retailerWarrantyOfferTotal")]
    pub retailer_warranty_offer_total: i32,
    #[serde(rename = "retailerWarrantyOfferTotalCurrent")]
    pub retailer_warranty_offer_total_current: i32,
    #[serde(rename = "retailerWarrantyOfferTotalPending")]
    pub retailer_warranty_offer_total_pending: i32,
    #[serde(rename = "retailerOfferTotal")]
    pub retailer_offer_total: i32,
    #[serde(rename = "retailerOfferTotalCurrent")]
    pub retailer_offer_total_current: i32,
    #[serde(rename = "retailerOfferTotalPending")]
    pub retailer_offer_total_pending: i32,
    #[serde(rename = "campaignOfferTotal")]
    pub campaign_offer_total: i32,
    #[serde(rename = "campaignOfferTotalCurrent")]
    pub campaign_offer_total_current: i32,
    #[serde(rename = "campaignOfferTotalPending")]
    pub campaign_offer_total_pending: i32,
    #[serde(rename = "campaignAndOfferTotal")]
    pub campaign_and_offer_total: i32,
    #[serde(rename = "campaignAndOfferTotalCurrent")]
    pub campaign_and_offer_total_current: i32,
    #[serde(rename = "campaignAndOfferTotalPending")]
    pub campaign_and_offer_total_pending: i32,
    #[serde(rename = "offerTotal")]
    pub offer_total: i32,
    #[serde(rename = "offerTotalCurrent")]
    pub offer_total_current: i32,
    #[serde(rename = "offerTotalPending")]
    pub offer_total_pending: i32,
    pub creation: String,
    pub modified: String,
    #[serde(rename = "electricRange")]
    pub electric_range: i32,
    #[serde(rename = "electricConsumption")]
    pub electric_consumption: i32,
    #[serde(rename = "portArrivalDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub port_arrival_date: Option<String>,
    #[serde(rename = "daysSincePortArrival")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub days_since_port_arrival: Option<i32>,
    #[serde(rename = "retailPriceIncVAT")]
    pub retail_price_inc_v_a_t: f64,
    #[serde(rename = "bodyStyle")]
    pub body_style: String,
    pub upholstery: String,
    #[serde(rename = "upholsteryCode")]
    pub upholstery_code: String,
    #[serde(rename = "upholsteryType")]
    pub upholstery_type: String,
    #[serde(rename = "packageNames")]
    pub package_names: Vec<String>,
    pub line: String,
    #[serde(rename = "mappedLine")]
    pub mapped_line: String,
    #[serde(rename = "currentRetailerOfferPrice")]
    pub current_retailer_offer_price: f64,
    #[serde(rename = "retailPrice")]
    pub retail_price: String,
    #[serde(rename = "vatQualifying")]
    pub vat_qualifying: bool,
    #[serde(rename = "retailerId")]
    pub retailer_id: i32,
    #[serde(rename = "gssnId")]
    pub gssn_id: String,
    #[serde(rename = "noImage")]
    pub no_image: bool,
    #[serde(rename = "imageUrl")]
    pub image_url: String,
    #[serde(rename = "isAvailableOnline")]
    pub is_available_online: bool,
    #[serde(rename = "isBackOrdered")]
    pub is_back_ordered: bool,
    #[serde(rename = "creationDate")]
    pub creation_date: String,
    #[serde(rename = "maintenanceDate")]
    pub maintenance_date: String,
    #[serde(rename = "registrationNumber")]
    pub registration_number: String,
    #[serde(rename = "registrationDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub registration_date: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub mileage: Option<i32>,
    #[serde(rename = "tradeInDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub trade_in_date: Option<String>,
    pub source: String,
    #[serde(rename = "vehicleType")]
    pub vehicle_type: String,
    #[serde(rename = "offerAmount")]
    pub offer_amount: String,
    #[serde(rename = "offerExpiry")]
    pub offer_expiry: String,
    #[serde(rename = "activeOffers")]
    pub active_offers: Vec<i32>,
    #[serde(rename = "campaignMessagesTotal")]
    pub campaign_messages_total: i32,
    #[serde(rename = "underOffer")]
    pub under_offer: bool,
    #[serde(rename = "isDisplayStock")]
    pub is_display_stock: bool,
    #[serde(rename = "displayRetailer")]
    pub display_retailer: String,
    #[serde(rename = "displayRetailerGssnId")]
    pub display_retailer_gssn_id: String,
    pub location: String,
    pub account: String,
    #[serde(rename = "accountType")]
    pub account_type: String,
    #[serde(rename = "usageCode")]
    pub usage_code: String,
    #[serde(rename = "bm7NST")]
    pub bm7_n_s_t: String,
    #[serde(rename = "isSellable")]
    pub is_sellable: bool,
    pub secured: bool,
    pub specialist: bool,
    #[serde(rename = "isMotabilityRetailer")]
    pub is_motability_retailer: bool,
    #[serde(rename = "upholsteryDescription")]
    pub upholstery_description: String,
    #[serde(rename = "inBackOrderAccount")]
    pub in_back_order_account: bool,
    #[serde(rename = "fullModelYearCode")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub full_model_year_code: Option<String>,
    pub baumuster: String,
    #[serde(rename = "isMotability")]
    pub is_motability: bool,
    #[serde(rename = "pipAdvanceRentalGross")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub pip_advance_rental_gross: Option<f64>,
    #[serde(rename = "wpmsAdvanceRentalGross")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub wpms_advance_rental_gross: Option<f64>,
    #[serde(rename = "ispVehicleCustomerDescriptions")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub isp_vehicle_customer_descriptions: Option<Vec<String>>,
    #[serde(rename = "eligibleForMaTransfer")]
    pub eligible_for_ma_transfer: bool,
    #[serde(rename = "confirmedProductionDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub confirmed_production_date: Option<String>,
    #[serde(rename = "forecastedArrivalDate")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub forecasted_arrival_date: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct VehicleData {
    #[serde(flatten)]
    pub vehicle_data_base: VehicleDataBase,
    pub engine: String,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct Equipment {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct VehicleIdentifierData {
    #[serde(flatten)]
    pub vehicle_data: VehicleData,
    pub retailer: String,
    #[serde(rename = "hasMotabilityError")]
    pub has_motability_error: bool,
    pub equipment: Vec<Equipment>,
    #[serde(rename = "vehicleClass")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub vehicle_class: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct VehiclesByRetailerResponse {
    pub vehicles: Vec<VehicleIdentifierData>,
}

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)]
#[serde(default)]
pub struct MotabilityVehiclesFilterRequest {
    pub min: i32,
    pub max: i32,
    #[serde(rename = "noPortArrivalDate")]
    pub no_port_arrival_date: bool,
    #[serde(rename = "vehicleType")]
    pub vehicle_type: String,
}

Rust MotabilityVehiclesFilterRequest DTOs

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

HTTP + XML

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

POST /v1/{VehicleType}/Vehicle/Motability HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<MotabilityVehiclesFilterRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.ServiceModel">
  <Max>0</Max>
  <Min>0</Min>
  <NoPortArrivalDate>false</NoPortArrivalDate>
  <VehicleType>String</VehicleType>
</MotabilityVehiclesFilterRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<VehiclesByRetailerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO">
  <Vehicles>
    <VehicleIdentifierData>
      <Account>String</Account>
      <AccountType>String</AccountType>
      <ActiveOffers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>0</d4p1:int>
      </ActiveOffers>
      <ActualPrice>String</ActualPrice>
      <Baumuster>String</Baumuster>
      <Bm7NST>String</Bm7NST>
      <BodyStyle>String</BodyStyle>
      <CampaignAndOfferTotal>0</CampaignAndOfferTotal>
      <CampaignAndOfferTotalCurrent>0</CampaignAndOfferTotalCurrent>
      <CampaignAndOfferTotalPending>0</CampaignAndOfferTotalPending>
      <CampaignCustomOfferTotal>0</CampaignCustomOfferTotal>
      <CampaignCustomOfferTotalCurrent>0</CampaignCustomOfferTotalCurrent>
      <CampaignCustomOfferTotalPending>0</CampaignCustomOfferTotalPending>
      <CampaignDiscountOfferTotal>0</CampaignDiscountOfferTotal>
      <CampaignDiscountOfferTotalCurrent>0</CampaignDiscountOfferTotalCurrent>
      <CampaignDiscountOfferTotalPending>0</CampaignDiscountOfferTotalPending>
      <CampaignMessagesTotal>0</CampaignMessagesTotal>
      <CampaignOfferTotal>0</CampaignOfferTotal>
      <CampaignOfferTotalCurrent>0</CampaignOfferTotalCurrent>
      <CampaignOfferTotalPending>0</CampaignOfferTotalPending>
      <CampaignOtherOfferTotal>0</CampaignOtherOfferTotal>
      <CampaignOtherOfferTotalCurrent>0</CampaignOtherOfferTotalCurrent>
      <CampaignOtherOfferTotalPending>0</CampaignOtherOfferTotalPending>
      <CampaignPersonalisedOfferTotal>0</CampaignPersonalisedOfferTotal>
      <CampaignPersonalisedOfferTotalCurrent>0</CampaignPersonalisedOfferTotalCurrent>
      <CampaignPersonalisedOfferTotalPending>0</CampaignPersonalisedOfferTotalPending>
      <CampaignServiceOfferTotal>0</CampaignServiceOfferTotal>
      <CampaignServiceOfferTotalCurrent>0</CampaignServiceOfferTotalCurrent>
      <CampaignServiceOfferTotalPending>0</CampaignServiceOfferTotalPending>
      <Colour>String</Colour>
      <ColourCode>String</ColourCode>
      <ColourDescription>String</ColourDescription>
      <CommissionNumber>String</CommissionNumber>
      <ConfirmedProductionDate>String</ConfirmedProductionDate>
      <Creation>String</Creation>
      <CreationDate>String</CreationDate>
      <CurrentRetailerOfferPrice>0</CurrentRetailerOfferPrice>
      <DaysSincePortArrival>0</DaysSincePortArrival>
      <Description>String</Description>
      <DisplayRetailer>String</DisplayRetailer>
      <DisplayRetailerGssnId>String</DisplayRetailerGssnId>
      <ElectricConsumption>0</ElectricConsumption>
      <ElectricRange>0</ElectricRange>
      <EligibleForMaTransfer>false</EligibleForMaTransfer>
      <ForecastedArrivalDate>String</ForecastedArrivalDate>
      <FuelType>String</FuelType>
      <FullModelYearCode>String</FullModelYearCode>
      <GssnId>String</GssnId>
      <ImageUrl>String</ImageUrl>
      <InBackOrderAccount>false</InBackOrderAccount>
      <IsAvailableOnline>false</IsAvailableOnline>
      <IsBackOrdered>false</IsBackOrdered>
      <IsDisplayStock>false</IsDisplayStock>
      <IsMotability>false</IsMotability>
      <IsMotabilityRetailer>false</IsMotabilityRetailer>
      <IsSellable>false</IsSellable>
      <IspVehicleCustomerDescriptions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </IspVehicleCustomerDescriptions>
      <Line>String</Line>
      <Location>String</Location>
      <MaintenanceDate>String</MaintenanceDate>
      <MappedLine>String</MappedLine>
      <Mileage>0</Mileage>
      <Model>String</Model>
      <Modified>String</Modified>
      <NoImage>false</NoImage>
      <OfferAmount>String</OfferAmount>
      <OfferAvailable>false</OfferAvailable>
      <OfferExpiry>String</OfferExpiry>
      <OfferTotal>0</OfferTotal>
      <OfferTotalCurrent>0</OfferTotalCurrent>
      <OfferTotalPending>0</OfferTotalPending>
      <Otr>String</Otr>
      <P11D>String</P11D>
      <PackageNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </PackageNames>
      <PipAdvanceRentalGross>0</PipAdvanceRentalGross>
      <PortArrivalDate>0001-01-01T00:00:00</PortArrivalDate>
      <RegistrationDate>0001-01-01T00:00:00</RegistrationDate>
      <RegistrationNumber>String</RegistrationNumber>
      <RetailPrice>String</RetailPrice>
      <RetailPriceExVAT>String</RetailPriceExVAT>
      <RetailPriceIncVAT>0</RetailPriceIncVAT>
      <RetailerCustomOfferTotal>0</RetailerCustomOfferTotal>
      <RetailerCustomOfferTotalCurrent>0</RetailerCustomOfferTotalCurrent>
      <RetailerCustomOfferTotalPending>0</RetailerCustomOfferTotalPending>
      <RetailerDiscountOfferTotal>0</RetailerDiscountOfferTotal>
      <RetailerDiscountOfferTotalCurrent>0</RetailerDiscountOfferTotalCurrent>
      <RetailerDiscountOfferTotalPending>0</RetailerDiscountOfferTotalPending>
      <RetailerId>0</RetailerId>
      <RetailerOfferTotal>0</RetailerOfferTotal>
      <RetailerOfferTotalCurrent>0</RetailerOfferTotalCurrent>
      <RetailerOfferTotalPending>0</RetailerOfferTotalPending>
      <RetailerServiceOfferTotal>0</RetailerServiceOfferTotal>
      <RetailerServiceOfferTotalCurrent>0</RetailerServiceOfferTotalCurrent>
      <RetailerServiceOfferTotalPending>0</RetailerServiceOfferTotalPending>
      <RetailerWarrantyOfferTotal>0</RetailerWarrantyOfferTotal>
      <RetailerWarrantyOfferTotalCurrent>0</RetailerWarrantyOfferTotalCurrent>
      <RetailerWarrantyOfferTotalPending>0</RetailerWarrantyOfferTotalPending>
      <Secured>false</Secured>
      <Source>String</Source>
      <Specialist>false</Specialist>
      <TradeInDate>0001-01-01T00:00:00</TradeInDate>
      <Transmission>String</Transmission>
      <TransmissionType>String</TransmissionType>
      <UnderOffer>false</UnderOffer>
      <Upholstery>String</Upholstery>
      <UpholsteryCode>String</UpholsteryCode>
      <UpholsteryDescription>String</UpholsteryDescription>
      <UpholsteryType>String</UpholsteryType>
      <UsageCode>String</UsageCode>
      <VATQualifying>false</VATQualifying>
      <VehicleType>String</VehicleType>
      <Vin>String</Vin>
      <WpmsAdvanceRentalGross>0</WpmsAdvanceRentalGross>
      <Engine>String</Engine>
      <Equipment xmlns:d4p1="http://schemas.datacontract.org/2004/07/Mercedes.OS.Vehicle.Shared.POCO">
        <d4p1:Equipment>
          <d4p1:Code>String</d4p1:Code>
          <d4p1:Description>String</d4p1:Description>
          <d4p1:Id>0</d4p1:Id>
        </d4p1:Equipment>
      </Equipment>
      <HasMotabilityError>false</HasMotabilityError>
      <Retailer>String</Retailer>
      <VehicleClass>String</VehicleClass>
    </VehicleIdentifierData>
  </Vehicles>
</VehiclesByRetailerResponse>