Mercedes.Agency.Orchestration.API

<back to all web services

GetVehicleWithOptimalRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/VehicleWithOptimalGet Vehicle by Vin and a more optimal option if available
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Mercedes.Agency.Orchestration.API.ServiceModel.Vehicles
Imports Mercedes.Agency.API.Shared.POCO
Imports Mercedes.OS.Vehicle.Shared.POCO.Filters.v2
Imports Mercedes.Agency.API.Shared.Enums
Imports Mercedes.OS.Vehicle.Shared.POCO

Namespace Global

    Namespace Mercedes.Agency.API.Shared.POCO

        Public Partial Class Engine
            Public Overridable Property Id As Integer?
            Public Overridable Property Badge As String
        End Class

        Public Partial Class Media
            Public Overridable Property NoImage As Boolean
            Public Overridable Property MainImageUrl As String
        End Class

        Public Partial Class Price
            Public Overridable Property Id As String
            Public Overridable Property Description As String
            Public Overridable Property Net As Decimal
            Public Overridable Property VAT As Decimal
            Public Overridable Property Gross As Decimal
            Public Overridable Property Product As OfferPriceProductType
        End Class

        Public Partial Class Retailer
            Public Overridable Property Id As Integer
            Public Overridable Property GssnId As String
            Public Overridable Property Description As String
            Public Overridable Property Street As String
            Public Overridable Property City As String
            Public Overridable Property Postcode As String
            Public Overridable Property GoogleMapPostcode As String
            Public Overridable Property Phone As String
            Public Overridable Property Fax As String
            Public Overridable Property Email As String
            Public Overridable Property Website As String
            Public Overridable Property RetailerGroupId As String
            Public Overridable Property RetailerGroupName As String
            Public Overridable Property IsOnline As Boolean
            Public Overridable Property IsNewCarRetailer As Boolean
            Public Overridable Property IsUsedCarRetailer As Boolean
            Public Overridable Property IsCentralRetailer As Boolean
            Public Overridable Property ChatEnabled As Boolean
            Public Overridable Property TradeInEnabled As Boolean
            Public Overridable Property smart As Boolean
            Public Overridable Property DisplayPhoneNumberNew As String
            Public Overridable Property DisplayPhoneNumberUsed As String
            Public Overridable Property Latitude As Decimal
            Public Overridable Property Longitude As Decimal
            Public Overridable Property smartDescription As String
            Public Overridable Property smartWebsite As String
            Public Overridable Property smartPhone As String
            Public Overridable Property LegacyId As String
            Public Overridable Property Agent As Boolean
            Public Overridable Property MarketAreaId As Integer
            Public Overridable Property DigitalLoungeParentGssnId As String
            Public Overridable Property SendLeadsToDigitalLoungeParent As Boolean
            Public Overridable Property OpeningTimes As RetailerOpeningTimes
        End Class

        Public Partial Class RetailerOpeningTime
            Public Overridable Property Day As String
            Public Overridable Property OpenFrom As String
            Public Overridable Property OpenTo As String
            Public Overridable Property Special As String
        End Class

        Public Partial Class RetailerOpeningTimes
            Public Overridable Property [New] As List(Of RetailerOpeningTime) = New List(Of RetailerOpeningTime)
            Public Overridable Property Used As List(Of RetailerOpeningTime) = New List(Of RetailerOpeningTime)
        End Class

        Public Partial Class VehicleAttribute
            Public Overridable Property Description As String
            Public Overridable Property Value As String
        End Class

        Public Partial Class VehicleConsumption
            Public Overridable Property Id As Integer
            Public Overridable Property Lkm As Decimal
            Public Overridable Property Mpg As Decimal
        End Class

        Public Partial Class VehicleDetailDto
            Public Overridable Property BodyStyle As String
            Public Overridable Property Vin As String
            Public Overridable Property Description As String
            Public Overridable Property Colour As String
            Public Overridable Property ColourCode As String
            Public Overridable Property ColourDescription As String
            Public Overridable Property ColourGroup As String
            Public Overridable Property Model As String
            Public Overridable Property CommissionNumber As String
            Public Overridable Property BrandId As Integer?
            Public Overridable Property Brand As Brand
            Public Overridable Property Engine As Engine
            Public Overridable Property EngineBadge As String
            Public Overridable Property Media As Media
            Public Overridable Property Line As String
            Public Overridable Property UpholsteryCode As String
            Public Overridable Property UpholsteryType As String
            Public Overridable Property Upholstery As String
            Public Overridable Property UpholsteryDescription As String
            Public Overridable Property AvailablePackages As List(Of String) = New List(Of String)
            Public Overridable Property Packages As List(Of String) = New List(Of String)
            Public Overridable Property P11D As Decimal
            Public Overridable Property PortArrivalDate As Date?
            Public Overridable Property Prices As List(Of Price) = New List(Of Price)
            Public Overridable Property TransmissionType As String
            Public Overridable Property FuelType As String
            Public Overridable Property VehicleClass As String
            Public Overridable Property ProductRange As String
            Public Overridable Property VehicleType As String
            Public Overridable Property Emission As Decimal?
            Public Overridable Property IsAvailableOnline As Boolean
            Public Overridable Property UnderOffer As Boolean
            Public Overridable Property IsExcluded As Boolean
            Public Overridable Property IsSellable As Boolean
            Public Overridable Property OnHold As Boolean
            Public Overridable Property ElectricConsumption As Decimal?
            Public Overridable Property ElectricRange As Decimal?
            Public Overridable Property ImageUrl As String
            Public Overridable Property Baumuster As String
            Public Overridable Property Retailer As Retailer
            Public Overridable Property Bm7NST As String
            Public Overridable Property OTR As Decimal
            Public Overridable Property ActualPrice As Decimal
            Public Overridable Property IsDisplayStock As Boolean
            Public Overridable Property DisplayRetailerId As Integer?
            Public Overridable Property DisplayRetailer As String
            Public Overridable Property DisplayRetailerGssnId As String
            Public Overridable Property DisplayRetailerMarketAreaId As String
            Public Overridable Property IsSmartDisplayRetailer As Boolean
            Public Overridable Property IsSpecialistCar As Boolean
            Public Overridable Property Age As Integer?
            Public Overridable Property Secured As Boolean
            Public Overridable Property IsHOBackOrderAccountVehicle As Boolean
            Public Overridable Property IsAllocatedToBackOrder As Boolean
            Public Overridable Property UsageCode As String
            Public Overridable Property EmissionCombined As Decimal?
            Public Overridable Property NormalisedEmissionDirective As String
            Public Overridable Property HasMildHybridEquipmentCode As Boolean
            Public Overridable Property RetailPriceExVat As Decimal
            Public Overridable Property RetailPrice_IncVAT As Decimal
            Public Overridable Property RetailPrice_ExVAT As Decimal
            Public Overridable Property ModelId As Integer
            Public Overridable Property VID As String
            Public Overridable Property ProductionDate As String
            Public Overridable Property FullModelYearCode As String
            Public Overridable Property ChassisNumber As String
            Public Overridable Property EligibleForIntegratedServiceCare As Boolean
            Public Overridable Property AccountType As String
            Public Overridable Property ConsumptionCombined As VehicleConsumption
            Public Overridable Property ConsumptionExtraUrban As VehicleConsumption
            Public Overridable Property ConsumptionUrban As VehicleConsumption
            Public Overridable Property WltpFuelConsumptionCombined As VehicleConsumption
            Public Overridable Property WltpFuelConsumptionExtraHigh As VehicleConsumption
            Public Overridable Property WltpFuelConsumptionHigh As VehicleConsumption
            Public Overridable Property WltpFuelConsumptionLow As VehicleConsumption
            Public Overridable Property WltpFuelConsumptionMedium As VehicleConsumption
            Public Overridable Property Equipment As List(Of Equipmentv2)
            Public Overridable Property EquipmentCategories As List(Of VehicleEquipmentCategory)
            Public Overridable Property EnergyEfficiencyClass As VehicleEmissionClass
            Public Overridable Property VehicleData As List(Of VehicleAttribute)
            Public Overridable Property IntegratedServiceCareOptions As List(Of VehicleIntegratedServiceCareOption) = New List(Of VehicleIntegratedServiceCareOption)
            Public Overridable Property IspVehicleCustomerDescriptions As List(Of String)
        End Class

        Public Partial Class VehicleEmissionClass
            Public Overridable Property Colour As String
            Public Overridable Property Rating As String
        End Class

        Public Partial Class VehicleEquipmentCategory
            Public Overridable Property Order As Integer
            Public Overridable Property Code As String
            Public Overridable Property Description As String
            Public Overridable Property Equipment As List(Of Equipmentv2)
        End Class

        Public Partial Class VehicleError
            Public Overridable Property Field As String
            Public Overridable Property Message As String
        End Class

        Public Partial Class VehicleIntegratedServiceCareOption
            Public Overridable Property OptionCode As String
            Public Overridable Property BM7NST As String
            Public Overridable Property FullModelYear As String
            Public Overridable Property IntegratedProductType As String
            Public Overridable Property CustomerDescription As String
            Public Overridable Property OneAgentProductType As String
        End Class
    End Namespace

    Namespace Mercedes.Agency.Orchestration.API.ServiceModel.Vehicles

        Public Partial Class GetVehicleResponse
            Public Overridable Property Vehicle As VehicleDetailDto
            Public Overridable Property Errors As List(Of VehicleError) = New List(Of VehicleError)
        End Class

        Public Partial Class GetVehicleWithOptimalRequest
            Public Overridable Property VehicleIdentifier As String
            Public Overridable Property IncludeAllocatedToBackOrder As Boolean
            Public Overridable Property Gssn As String
            Public Overridable Property IsOneAdmin As Boolean
            Public Overridable Property MotabilityPricingId As Integer?
        End Class

        Public Partial Class GetVehicleWithOptimalResponse
            Inherits GetVehicleResponse
            Public Overridable Property OptimumVehicle As VehicleDetailDto
        End Class
    End Namespace

    Namespace Mercedes.OS.Vehicle.Shared.POCO

        Public Partial Class Equipment
            Public Overridable Property Id As Integer
            Public Overridable Property Code As String
            Public Overridable Property Description As String
        End Class

        Public Partial Class Equipmentv2
            Inherits Equipment
            Public Overridable Property Importance As Integer
            Public Overridable Property IsAdditional As Boolean
        End Class
    End Namespace

    Namespace Mercedes.OS.Vehicle.Shared.POCO.Filters.v2

        Public Partial Class BodyStyle
            Public Overridable Property Id As Integer
            Public Overridable Property Description As String
            Public Overridable Property Models As List(Of Model)
        End Class

        Public Partial Class Brand
            Public Overridable Property Id As Integer
            Public Overridable Property Description As String
            Public Overridable Property DisplayName As String
            Public Overridable Property BodyStyles As List(Of BodyStyle)
        End Class

        Public Partial Class Model
            Public Overridable Property Id As Integer
            Public Overridable Property Description As String
            Public Overridable Property DisplayName As String
            Public Overridable Property ImageUrlSmall As String
            Public Overridable Property ImageUrlMedium As String
            Public Overridable Property ImageUrlLarge As String
            Public Overridable Property Specialist As Boolean
            Public Overridable Property Priority As Integer
            Public Overridable Property ExcludeFromOnlineShowroomFilters As Boolean?
        End Class
    End Namespace
End Namespace

VB.NET GetVehicleWithOptimalRequest 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.

POST /v1/VehicleWithOptimal HTTP/1.1 
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"VehicleIdentifier":"String","IncludeAllocatedToBackOrder":false,"Gssn":"String","IsOneAdmin":false,"MotabilityPricingId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"OptimumVehicle":{"BodyStyle":"String","Vin":"String","Description":"String","Colour":"String","ColourCode":"String","ColourDescription":"String","ColourGroup":"String","Model":"String","CommissionNumber":"String","BrandId":0,"Brand":{"Id":0,"Description":"String","DisplayName":"String","BodyStyles":[{"Id":0,"Description":"String","Models":[{"Id":0,"Description":"String","DisplayName":"String","ImageUrlSmall":"String","ImageUrlMedium":"String","ImageUrlLarge":"String","Specialist":false,"Priority":0,"ExcludeFromOnlineShowroomFilters":false}]}]},"Engine":{"Id":0,"Badge":"String"},"EngineBadge":"String","Media":{"NoImage":false,"MainImageUrl":"String"},"Line":"String","UpholsteryCode":"String","UpholsteryType":"String","Upholstery":"String","UpholsteryDescription":"String","AvailablePackages":["String"],"Packages":["String"],"P11D":0,"PortArrivalDate":"\/Date(-62135596800000-0000)\/","Prices":[{"Id":"String","Description":"String","Net":0,"VAT":0,"Gross":0,"Product":"LIST_PRICE"}],"TransmissionType":"String","FuelType":"String","VehicleClass":"String","ProductRange":"String","VehicleType":"String","Emission":0,"IsAvailableOnline":false,"UnderOffer":false,"IsExcluded":false,"IsSellable":false,"OnHold":false,"ElectricConsumption":0,"ElectricRange":0,"ImageUrl":"String","Baumuster":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"Bm7NST":"String","OTR":0,"ActualPrice":0,"IsDisplayStock":false,"DisplayRetailerId":0,"DisplayRetailer":"String","DisplayRetailerGssnId":"String","DisplayRetailerMarketAreaId":"String","IsSmartDisplayRetailer":false,"IsSpecialistCar":false,"Age":0,"Secured":false,"IsHOBackOrderAccountVehicle":false,"IsAllocatedToBackOrder":false,"UsageCode":"String","EmissionCombined":0,"NormalisedEmissionDirective":"String","HasMildHybridEquipmentCode":false,"RetailPriceExVat":0,"RetailPrice_IncVAT":0,"RetailPrice_ExVAT":0,"ModelId":0,"VID":"String","ProductionDate":"String","FullModelYearCode":"String","ChassisNumber":"String","EligibleForIntegratedServiceCare":false,"AccountType":"String","ConsumptionCombined":{"Id":0,"Lkm":0,"Mpg":0},"ConsumptionExtraUrban":{"Id":0,"Lkm":0,"Mpg":0},"ConsumptionUrban":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionCombined":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionExtraHigh":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionHigh":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionLow":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionMedium":{"Id":0,"Lkm":0,"Mpg":0},"Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}],"EquipmentCategories":[{"Order":0,"Code":"String","Description":"String","Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}]}],"EnergyEfficiencyClass":{"Colour":"String","Rating":"String"},"VehicleData":[{"Description":"String","Value":"String"}],"IntegratedServiceCareOptions":[{"OptionCode":"String","BM7NST":"String","FullModelYear":"String","IntegratedProductType":"String","CustomerDescription":"String","OneAgentProductType":"String"}],"IspVehicleCustomerDescriptions":["String"]},"Vehicle":{"BodyStyle":"String","Vin":"String","Description":"String","Colour":"String","ColourCode":"String","ColourDescription":"String","ColourGroup":"String","Model":"String","CommissionNumber":"String","BrandId":0,"Brand":{"Id":0,"Description":"String","DisplayName":"String","BodyStyles":[{"Id":0,"Description":"String","Models":[{"Id":0,"Description":"String","DisplayName":"String","ImageUrlSmall":"String","ImageUrlMedium":"String","ImageUrlLarge":"String","Specialist":false,"Priority":0,"ExcludeFromOnlineShowroomFilters":false}]}]},"Engine":{"Id":0,"Badge":"String"},"EngineBadge":"String","Media":{"NoImage":false,"MainImageUrl":"String"},"Line":"String","UpholsteryCode":"String","UpholsteryType":"String","Upholstery":"String","UpholsteryDescription":"String","AvailablePackages":["String"],"Packages":["String"],"P11D":0,"PortArrivalDate":"\/Date(-62135596800000-0000)\/","Prices":[{"Id":"String","Description":"String","Net":0,"VAT":0,"Gross":0,"Product":"LIST_PRICE"}],"TransmissionType":"String","FuelType":"String","VehicleClass":"String","ProductRange":"String","VehicleType":"String","Emission":0,"IsAvailableOnline":false,"UnderOffer":false,"IsExcluded":false,"IsSellable":false,"OnHold":false,"ElectricConsumption":0,"ElectricRange":0,"ImageUrl":"String","Baumuster":"String","Retailer":{"Id":0,"GssnId":"String","Description":"String","Street":"String","City":"String","Postcode":"String","GoogleMapPostcode":"String","Phone":"String","Fax":"String","Email":"String","Website":"String","RetailerGroupId":"String","RetailerGroupName":"String","IsOnline":false,"IsNewCarRetailer":false,"IsUsedCarRetailer":false,"IsCentralRetailer":false,"ChatEnabled":false,"TradeInEnabled":false,"smart":false,"DisplayPhoneNumberNew":"String","DisplayPhoneNumberUsed":"String","Latitude":0,"Longitude":0,"smartDescription":"String","smartWebsite":"String","smartPhone":"String","LegacyId":"String","Agent":false,"MarketAreaId":0,"DigitalLoungeParentGssnId":"String","SendLeadsToDigitalLoungeParent":false,"OpeningTimes":{"New":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}],"Used":[{"Day":"String","OpenFrom":"String","OpenTo":"String","Special":"String"}]}},"Bm7NST":"String","OTR":0,"ActualPrice":0,"IsDisplayStock":false,"DisplayRetailerId":0,"DisplayRetailer":"String","DisplayRetailerGssnId":"String","DisplayRetailerMarketAreaId":"String","IsSmartDisplayRetailer":false,"IsSpecialistCar":false,"Age":0,"Secured":false,"IsHOBackOrderAccountVehicle":false,"IsAllocatedToBackOrder":false,"UsageCode":"String","EmissionCombined":0,"NormalisedEmissionDirective":"String","HasMildHybridEquipmentCode":false,"RetailPriceExVat":0,"RetailPrice_IncVAT":0,"RetailPrice_ExVAT":0,"ModelId":0,"VID":"String","ProductionDate":"String","FullModelYearCode":"String","ChassisNumber":"String","EligibleForIntegratedServiceCare":false,"AccountType":"String","ConsumptionCombined":{"Id":0,"Lkm":0,"Mpg":0},"ConsumptionExtraUrban":{"Id":0,"Lkm":0,"Mpg":0},"ConsumptionUrban":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionCombined":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionExtraHigh":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionHigh":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionLow":{"Id":0,"Lkm":0,"Mpg":0},"WltpFuelConsumptionMedium":{"Id":0,"Lkm":0,"Mpg":0},"Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}],"EquipmentCategories":[{"Order":0,"Code":"String","Description":"String","Equipment":[{"Importance":0,"IsAdditional":false,"Id":0,"Code":"String","Description":"String"}]}],"EnergyEfficiencyClass":{"Colour":"String","Rating":"String"},"VehicleData":[{"Description":"String","Value":"String"}],"IntegratedServiceCareOptions":[{"OptionCode":"String","BM7NST":"String","FullModelYear":"String","IntegratedProductType":"String","CustomerDescription":"String","OneAgentProductType":"String"}],"IspVehicleCustomerDescriptions":["String"]},"Errors":[{"Field":"String","Message":"String"}]}