Mercedes.VehicleManagement.API

<back to all web services

AllAvailableVehiclesByCriteriaCsvRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/AllAvailableVehiclesCsv/{vehicleType}/{includeBackOrderAccounts}Get all available vehicles
# frozen_string_literal: true
# encoding: utf-8


require 'json'
require 'servicestack'


class BaseAllAvailableVehiclesRequest
    include ServiceStack::DTO

    # @return [String]
    attr_accessor :vehicle_type
    # @return [TrueClass]
    attr_accessor :include_back_order_accounts

    def self.properties
        {
            vehicle_type: { name: 'vehicleType' },
            include_back_order_accounts: { name: 'includeBackOrderAccounts' },
        }
    end

end

class CsvVehicle
    include ServiceStack::DTO

    # @DataMember(Name="Vehicle Type")
    # @return [String]
    attr_accessor :vehicle_type

    # @return [String]
    attr_accessor :vid
    # @return [String]
    attr_accessor :vin
    # @return [String]
    attr_accessor :fin
    # @DataMember(Name="Comm")
    # @return [String]
    attr_accessor :commission_number

    # @DataMember(Name="Chassis Number")
    # @return [String]
    attr_accessor :chassis_number

    # @DataMember(Name="Model Year")
    # @return [String]
    attr_accessor :model_year

    # @DataMember(Name="Model Year Code")
    # @return [String]
    attr_accessor :model_year_code

    # @DataMember(Name="Half Model Year Code")
    # @return [String]
    attr_accessor :half_model_year_code

    # @DataMember(Name="Full Model Year Code")
    # @return [String]
    attr_accessor :full_model_year_code

    # @DataMember(Name="Description")
    # @return [String]
    attr_accessor :sales_description_long

    # @DataMember(Name="Vehicle Class")
    # @return [String]
    attr_accessor :vehicle_class

    # @DataMember(Name="Body Style")
    # @return [String]
    attr_accessor :body_style

    # @return [String]
    attr_accessor :model
    # @return [String]
    attr_accessor :colour
    # @DataMember(Name="Colour Group")
    # @return [String]
    attr_accessor :colour_group

    # @DataMember(Name="Fuel Type")
    # @return [String]
    attr_accessor :fuel_type

    # @return [String]
    attr_accessor :transmission
    # @return [String]
    attr_accessor :packages
    # @return [String]
    attr_accessor :lines
    # @DataMember(Name="Product Range")
    # @return [String]
    attr_accessor :product_range

    # @return [String]
    attr_accessor :engine
    # @return [TrueClass]
    attr_accessor :is_a_m_g
    # @return [String]
    attr_accessor :upholstery
    # @return [String]
    attr_accessor :nst
    # @return [String]
    attr_accessor :baumuster
    # @return [String]
    attr_accessor :bm7_n_s_t
    # @return [BigDecimal]
    attr_accessor :acceleration
    # @DataMember(Name="Boot Capacity")
    # @return [Integer]
    attr_accessor :boot_capacity

    # @DataMember(Name="Top Speed")
    # @return [BigDecimal]
    attr_accessor :top_speed

    # @DataMember(Name="Drive Concept")
    # @return [String]
    attr_accessor :drive_concept

    # @DataMember(Name="Combustion Power HP")
    # @return [BigDecimal]
    attr_accessor :combustion_power_hp

    # @DataMember(Name="Electric Power KW")
    # @return [BigDecimal]
    attr_accessor :electric_power_kw

    # @DataMember(Name="Electric Power HP")
    # @return [BigDecimal]
    attr_accessor :electric_power_hp

    # @DataMember(Name="Combined Power KW")
    # @return [BigDecimal]
    attr_accessor :combined_power_kw

    # @DataMember(Name="Combined Power HP")
    # @return [BigDecimal]
    attr_accessor :combined_power_h_p

    # @DataMember(Name="Electric Range")
    # @return [BigDecimal]
    attr_accessor :electric_range

    # @DataMember(Name="Electric Consumption")
    # @return [BigDecimal]
    attr_accessor :electric_consumption

    # @DataMember(Name="Emission Combined")
    # @return [String]
    attr_accessor :emission_combined

    # @DataMember(Name="Emission Directive")
    # @return [String]
    attr_accessor :emission_directive

    # @DataMember(Name="Emission Extra Urban")
    # @return [String]
    attr_accessor :emission_extra_urban

    # @DataMember(Name="Emission Urban")
    # @return [String]
    attr_accessor :emission_urban

    # @return [BigDecimal]
    attr_accessor :emission
    # @DataMember(Name="Test Standard")
    # @return [String]
    attr_accessor :test_standard

    # @DataMember(Name="Energy Efficiency Class")
    # @return [String]
    attr_accessor :energy_efficiency_class

    # @DataMember(Name="WLTP Combined")
    # @return [String]
    attr_accessor :wltp_combined

    # @DataMember(Name="WLTP Low")
    # @return [String]
    attr_accessor :wltp_low

    # @DataMember(Name="WLTP Medium")
    # @return [String]
    attr_accessor :wltp_medium

    # @DataMember(Name="WLTP High")
    # @return [String]
    attr_accessor :wltp_high

    # @DataMember(Name="WLTP Extra High")
    # @return [String]
    attr_accessor :wltp_extra_high

    # @DataMember(Name="WLTP CO2 Emissions")
    # @return [String]
    attr_accessor :wltp_emission_combined

    # @DataMember(Name="Port Arrival Date")
    # @return [DateTime]
    attr_accessor :port_arrival_date

    # @DataMember(Name="Creation Date")
    # @return [DateTime]
    attr_accessor :creation_date

    # @DataMember(Name="Maintenance Date")
    # @return [DateTime]
    attr_accessor :last_updated

    # @DataMember(Name="Net Price")
    # @return [BigDecimal]
    attr_accessor :retail_price__ex_v_a_t

    # @DataMember(Name="Retail Price")
    # @return [BigDecimal]
    attr_accessor :retail_price__inc_v_a_t

    # @DataMember(Name="OTR Price")
    # @return [BigDecimal]
    attr_accessor :otr

    # @DataMember(Name="Actual Price")
    # @return [BigDecimal]
    attr_accessor :actual_price

    # @DataMember(Name="Usage Code")
    # @return [String]
    attr_accessor :usage_code

    # @return [String]
    attr_accessor :secured
    # @return [String]
    attr_accessor :account
    # @return [String]
    attr_accessor :is_display_stock
    # @DataMember(Name="Display Agent")
    # @return [String]
    attr_accessor :display_stock_agent

    # @return [String]
    attr_accessor :is_specialist_car
    # @return [String]
    attr_accessor :cesar_id_ship_to_party
    # @return [String]
    attr_accessor :is_sellable
    # @DataMember(Name="Under Offer")
    # @return [String]
    attr_accessor :under_offer

    # @DataMember(Name="Secured Date")
    # @return [String]
    attr_accessor :secured_date

    # @DataMember(Name="Secured Reason")
    # @return [String]
    attr_accessor :secured_reason

    # @DataMember(Name="Secured By Gas Id")
    # @return [String]
    attr_accessor :secured_by_gas_id

    # @DataMember(Name="Confirmed Production Date")
    # @return [String]
    attr_accessor :confirmed_production_date

    # @DataMember(Name="Forecasted Arrival Date")
    # @return [String]
    attr_accessor :forecasted_arrival_date

    def self.properties
        {
            vehicle_type: { name: 'Vehicle_Type' },
            vid: { name: 'vid' },
            vin: { name: 'vin' },
            fin: { name: 'fin' },
            commission_number: { name: 'Comm' },
            chassis_number: { name: 'Chassis_Number' },
            model_year: { name: 'Model_Year' },
            model_year_code: { name: 'Model_Year_Code' },
            half_model_year_code: { name: 'Half_Model_Year_Code' },
            full_model_year_code: { name: 'Full_Model_Year_Code' },
            sales_description_long: { name: 'Description' },
            vehicle_class: { name: 'Vehicle_Class' },
            body_style: { name: 'Body_Style' },
            model: { name: 'model' },
            colour: { name: 'colour' },
            colour_group: { name: 'Colour_Group' },
            fuel_type: { name: 'Fuel_Type' },
            transmission: { name: 'transmission' },
            packages: { name: 'packages' },
            lines: { name: 'lines' },
            product_range: { name: 'Product_Range' },
            engine: { name: 'engine' },
            is_a_m_g: { name: 'isAMG' },
            upholstery: { name: 'upholstery' },
            nst: { name: 'nst' },
            baumuster: { name: 'baumuster' },
            bm7_n_s_t: { name: 'bm7NST' },
            acceleration: { name: 'acceleration' },
            boot_capacity: { name: 'Boot_Capacity' },
            top_speed: { name: 'Top_Speed' },
            drive_concept: { name: 'Drive_Concept' },
            combustion_power_hp: { name: 'Combustion_Power_HP' },
            electric_power_kw: { name: 'Electric_Power_KW' },
            electric_power_hp: { name: 'Electric_Power_HP' },
            combined_power_kw: { name: 'Combined_Power_KW' },
            combined_power_h_p: { name: 'Combined_Power_HP' },
            electric_range: { name: 'Electric_Range' },
            electric_consumption: { name: 'Electric_Consumption' },
            emission_combined: { name: 'Emission_Combined' },
            emission_directive: { name: 'Emission_Directive' },
            emission_extra_urban: { name: 'Emission_Extra_Urban' },
            emission_urban: { name: 'Emission_Urban' },
            emission: { name: 'emission' },
            test_standard: { name: 'Test_Standard' },
            energy_efficiency_class: { name: 'Energy_Efficiency_Class' },
            wltp_combined: { name: 'WLTP_Combined' },
            wltp_low: { name: 'WLTP_Low' },
            wltp_medium: { name: 'WLTP_Medium' },
            wltp_high: { name: 'WLTP_High' },
            wltp_extra_high: { name: 'WLTP_Extra_High' },
            wltp_emission_combined: { name: 'WLTP_CO2_Emissions' },
            port_arrival_date: { name: 'Port_Arrival_Date', type: DateTime },
            creation_date: { name: 'Creation_Date', type: DateTime },
            last_updated: { name: 'Maintenance_Date', type: DateTime },
            retail_price__ex_v_a_t: { name: 'Net_Price' },
            retail_price__inc_v_a_t: { name: 'Retail_Price' },
            otr: { name: 'OTR_Price' },
            actual_price: { name: 'Actual_Price' },
            usage_code: { name: 'Usage_Code' },
            secured: { name: 'secured' },
            account: { name: 'account' },
            is_display_stock: { name: 'isDisplayStock' },
            display_stock_agent: { name: 'Display_Agent' },
            is_specialist_car: { name: 'isSpecialistCar' },
            cesar_id_ship_to_party: { name: 'cesarIdShipToParty' },
            is_sellable: { name: 'isSellable' },
            under_offer: { name: 'Under_Offer' },
            secured_date: { name: 'Secured_Date' },
            secured_reason: { name: 'Secured_Reason' },
            secured_by_gas_id: { name: 'Secured_By_Gas_Id' },
            confirmed_production_date: { name: 'Confirmed_Production_Date' },
            forecasted_arrival_date: { name: 'Forecasted_Arrival_Date' },
        }
    end

end

class InternalAvailableStockResponse
    include ServiceStack::DTO

    # @return [Integer]
    attr_accessor :total_vehicles
    # @return [IEnumerable]
    attr_accessor :vehicles

    def self.properties
        {
            total_vehicles: { name: 'totalVehicles' },
            vehicles: { name: 'vehicles', type: [CsvVehicle] },
        }
    end

end

class CampaignExclusion
    include ServiceStack::DTO

    # @return [Array]
    attr_accessor :vin
    # @return [Array]
    attr_accessor :commission_number
    # @return [String]
    attr_accessor :model_year_code
    # @return [String]
    attr_accessor :equipment_code
    # @return [Array]
    attr_accessor :gssn

    def self.properties
        {
            vin: { name: 'vin' },
            commission_number: { name: 'commissionNumber' },
            model_year_code: { name: 'modelYearCode' },
            equipment_code: { name: 'equipmentCode' },
            gssn: { name: 'gssn' },
        }
    end

end

class RegistrationDate
    include ServiceStack::DTO

    # @return [DateTime]
    attr_accessor :from
    # @return [DateTime]
    attr_accessor :to

    def self.properties
        {
            from: { name: 'from', type: DateTime },
            to: { name: 'to', type: DateTime },
        }
    end

end

class Age
    include ServiceStack::DTO

    # @return [DateTime]
    attr_accessor :date
    # @return [Integer]
    attr_accessor :min
    # @return [Integer]
    attr_accessor :max
    # @return [TrueClass]
    attr_accessor :include_pipeline_stock

    def self.properties
        {
            date: { name: 'date', type: DateTime },
            min: { name: 'min' },
            max: { name: 'max' },
            include_pipeline_stock: { name: 'includePipelineStock' },
        }
    end

end

class PortArrivalDate
    include ServiceStack::DTO

    # @return [TrueClass]
    attr_accessor :pipeline_stock
    # @return [DateTime]
    attr_accessor :from
    # @return [DateTime]
    attr_accessor :to

    def self.properties
        {
            pipeline_stock: { name: 'pipelineStock' },
            from: { name: 'from', type: DateTime },
            to: { name: 'to', type: DateTime },
        }
    end

end

class VehicleSearchV3Criteria
    include ServiceStack::DTO

    # @return [Array]
    attr_accessor :vin
    # @return [Array]
    attr_accessor :model
    # @return [Array]
    attr_accessor :fuel
    # @return [Array]
    attr_accessor :transmission
    # @return [Array]
    attr_accessor :engine
    # @return [Array]
    attr_accessor :line
    # @return [Array]
    attr_accessor :mapped_line
    # @return [Array]
    attr_accessor :commission_number
    # @return [String]
    attr_accessor :vehicle_type
    # @return [CampaignExclusion]
    attr_accessor :exclusion
    # @return [String]
    attr_accessor :reg_no
    # @return [TrueClass]
    attr_accessor :include_offline
    # @return [RegistrationDate]
    attr_accessor :registration_date
    # @return [Age]
    attr_accessor :age
    # @return [PortArrivalDate]
    attr_accessor :port_arrival_date
    # @return [TrueClass]
    attr_accessor :is_available_online
    # @return [TrueClass]
    attr_accessor :is_back_ordered
    # @return [TrueClass]
    attr_accessor :is_sellable
    # @return [TrueClass]
    attr_accessor :is_under_offer
    # @return [TrueClass]
    attr_accessor :mbuk_secured
    # @return [Array]
    attr_accessor :account
    # @return [Array]
    attr_accessor :baumuster
    # @return [Array]
    attr_accessor :colours
    # @return [Array]
    attr_accessor :upholstery
    # @return [Array]
    attr_accessor :package
    # @return [Array]
    attr_accessor :nst
    # @return [Array]
    attr_accessor :usage_code

    def self.properties
        {
            vin: { name: 'vin' },
            model: { name: 'model' },
            fuel: { name: 'fuel' },
            transmission: { name: 'transmission' },
            engine: { name: 'engine' },
            line: { name: 'line' },
            mapped_line: { name: 'mappedLine' },
            commission_number: { name: 'commissionNumber' },
            vehicle_type: { name: 'vehicleType' },
            exclusion: { name: 'exclusion', type: CampaignExclusion },
            reg_no: { name: 'regNo' },
            include_offline: { name: 'includeOffline' },
            registration_date: { name: 'registrationDate', type: RegistrationDate },
            age: { name: 'age', type: Age },
            port_arrival_date: { name: 'portArrivalDate', type: PortArrivalDate },
            is_available_online: { name: 'isAvailableOnline' },
            is_back_ordered: { name: 'isBackOrdered' },
            is_sellable: { name: 'isSellable' },
            is_under_offer: { name: 'isUnderOffer' },
            mbuk_secured: { name: 'mbukSecured' },
            account: { name: 'account' },
            baumuster: { name: 'baumuster' },
            colours: { name: 'colours' },
            upholstery: { name: 'upholstery' },
            package: { name: 'package' },
            nst: { name: 'nst' },
            usage_code: { name: 'usageCode' },
        }
    end

end

class AllAvailableVehiclesByCriteriaCsvRequest < BaseAllAvailableVehiclesRequest
    # @return [VehicleSearchV3Criteria]
    attr_accessor :criteria

    def self.properties
        {
            criteria: { name: 'criteria', type: VehicleSearchV3Criteria },
        }
    end

    def response_type() = InternalAvailableStockResponse
    def get_type_name() = 'AllAvailableVehiclesByCriteriaCsvRequest'
end

Ruby AllAvailableVehiclesByCriteriaCsvRequest DTOs

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

HTTP + OTHER

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

POST /v1/AllAvailableVehiclesCsv/{vehicleType}/{includeBackOrderAccounts} HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"criteria":{"vin":["String"],"model":[0],"fuel":[0],"transmission":[0],"engine":[0],"line":["String"],"mappedLine":[0],"commissionNumber":["String"],"vehicleType":"String","exclusion":{"vin":["String"],"commissionNumber":["String"],"modelYearCode":"String","equipmentCode":"String","gssn":["String"]},"regNo":"String","includeOffline":false,"registrationDate":{"from":"\/Date(-62135596800000-0000)\/","to":"\/Date(-62135596800000-0000)\/"},"age":{"date":"\/Date(-62135596800000-0000)\/","min":0,"max":0,"includePipelineStock":false},"portArrivalDate":{"pipelineStock":false,"from":"\/Date(-62135596800000-0000)\/","to":"\/Date(-62135596800000-0000)\/"},"isAvailableOnline":false,"isBackOrdered":false,"isSellable":false,"isUnderOffer":false,"mbukSecured":false,"account":["String"],"baumuster":["String"],"colours":[0],"upholstery":[0],"package":[0],"nst":["String"],"usageCode":["String"]},"vehicleType":"String","includeBackOrderAccounts":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"totalVehicles":0}