Mercedes.VehicleManagement.API

<back to all web services

CentralVehiclesRequest

Vehicle
Requires Authentication
The following routes are available for this service:
GET/v1/{VehicleType}/Vehicle/CentralGet central vehicle data
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleDataBase:
    vin: Optional[str] = None
    description: Optional[str] = None
    model: Optional[str] = None
    otr: Optional[str] = None
    retail_price_ex_v_a_t: Optional[str] = None
    actual_price: Optional[str] = None
    fuel_type: Optional[str] = None
    transmission: Optional[str] = None
    transmission_type: Optional[str] = None
    colour: Optional[str] = None
    colour_code: Optional[str] = None
    colour_description: Optional[str] = None
    commission_number: Optional[str] = None
    offer_available: bool = False
    campaign_discount_offer_total: int = 0
    campaign_discount_offer_total_current: int = 0
    campaign_discount_offer_total_pending: int = 0
    campaign_service_offer_total: int = 0
    campaign_service_offer_total_current: int = 0
    campaign_service_offer_total_pending: int = 0
    campaign_custom_offer_total: int = 0
    campaign_personalised_offer_total_current: int = 0
    campaign_personalised_offer_total_pending: int = 0
    campaign_personalised_offer_total: int = 0
    campaign_custom_offer_total_current: int = 0
    campaign_custom_offer_total_pending: int = 0
    campaign_other_offer_total: int = 0
    campaign_other_offer_total_current: int = 0
    campaign_other_offer_total_pending: int = 0
    retailer_discount_offer_total: int = 0
    retailer_discount_offer_total_current: int = 0
    retailer_discount_offer_total_pending: int = 0
    retailer_service_offer_total: int = 0
    retailer_service_offer_total_current: int = 0
    retailer_service_offer_total_pending: int = 0
    retailer_custom_offer_total: int = 0
    retailer_custom_offer_total_current: int = 0
    retailer_custom_offer_total_pending: int = 0
    retailer_warranty_offer_total: int = 0
    retailer_warranty_offer_total_current: int = 0
    retailer_warranty_offer_total_pending: int = 0
    retailer_offer_total: int = 0
    retailer_offer_total_current: int = 0
    retailer_offer_total_pending: int = 0
    campaign_offer_total: int = 0
    campaign_offer_total_current: int = 0
    campaign_offer_total_pending: int = 0
    campaign_and_offer_total: int = 0
    campaign_and_offer_total_current: int = 0
    campaign_and_offer_total_pending: int = 0
    offer_total: int = 0
    offer_total_current: int = 0
    offer_total_pending: int = 0
    creation: Optional[str] = None
    modified: Optional[str] = None
    electric_range: int = 0
    electric_consumption: int = 0
    port_arrival_date: Optional[datetime.datetime] = None
    days_since_port_arrival: Optional[int] = None
    retail_price_inc_v_a_t: Decimal = decimal.Decimal(0)
    body_style: Optional[str] = None
    upholstery: Optional[str] = None
    upholstery_code: Optional[str] = None
    upholstery_type: Optional[str] = None
    package_names: List[str] = field(default_factory=list)
    line: Optional[str] = None
    current_retailer_offer_price: Decimal = decimal.Decimal(0)
    retail_price: Optional[str] = None
    vat_qualifying: bool = False
    retailer_id: int = 0
    gssn_id: Optional[str] = None
    no_image: bool = False
    image_url: Optional[str] = None
    is_available_online: bool = False
    is_back_ordered: bool = False
    creation_date: Optional[str] = None
    maintenance_date: Optional[str] = None
    registration_number: Optional[str] = None
    registration_date: Optional[datetime.datetime] = None
    mileage: Optional[int] = None
    trade_in_date: Optional[datetime.datetime] = None
    source: Optional[str] = None
    vehicle_type: Optional[str] = None
    offer_amount: Optional[str] = None
    offer_expiry: Optional[str] = None
    active_offers: List[int] = field(default_factory=list)
    campaign_messages_total: int = 0
    under_offer: bool = False
    is_display_stock: bool = False
    display_retailer: Optional[str] = None
    display_retailer_gssn_id: Optional[str] = None
    location: Optional[str] = None
    account: Optional[str] = None
    account_type: Optional[str] = None
    usage_code: Optional[str] = None
    bm7_n_s_t: Optional[str] = None
    is_sellable: bool = False
    secured: bool = False
    specialist: bool = False
    is_motability_retailer: bool = False
    upholstery_description: Optional[str] = None
    in_back_order_account: bool = False
    full_model_year_code: Optional[str] = None
    production_date: Optional[datetime.datetime] = None
    baumuster: Optional[str] = None
    is_motability: bool = False
    pip_advance_rental_gross: Optional[Decimal] = None
    wpms_advance_rental_gross: Optional[Decimal] = None
    isp_vehicle_customer_descriptions: Optional[List[str]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleData(VehicleDataBase):
    engine: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Equipment:
    id: int = 0
    code: Optional[str] = None
    description: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehicleIdentifierData(VehicleData):
    retailer: Optional[str] = None
    has_motability_error: bool = False
    equipment: List[Equipment] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VehiclesByRetailerResponse:
    vehicles: List[VehicleIdentifierData] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CentralVehiclesRequest(IGet, IDataShapedRequest):
    vehicle_type: Optional[str] = None
    # @ApiMember(Description="If specified, the API will shape the data in the response to only include the specified fields", ParameterType="model")
    fields: Optional[str] = None
    """
    If specified, the API will shape the data in the response to only include the specified fields
    """

Python CentralVehiclesRequest 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.

GET /v1/{VehicleType}/Vehicle/Central HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: application/xml
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>
      <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>
      <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>
      <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>
      <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>
      <ProductionDate>0001-01-01T00:00:00</ProductionDate>
      <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>
    </VehicleIdentifierData>
  </Vehicles>
</VehiclesByRetailerResponse>