POST | /v1/{VehicleType}/Vehicle/CentralCsv | Filter central vehicle data for CSV |
---|
export class CsvVehicleData
{
// @DataMember(Name="Comm")
public Comm: string;
public retailer: string;
public description: string;
public model: string;
public colour: string;
// @DataMember(Name="Fuel Type")
public Fuel_Type: string;
// @DataMember(Name="Trans")
public Trans: string;
public otr: string;
// @DataMember(Name="Age (Days)")
public Age__Days_?: number;
// @DataMember(Name="Current Offer")
public Current_Offer: string;
// @DataMember(Name="Offer To")
public Offer_To: string;
// @DataMember(Name="Active Offers")
public Active_Offers: string[] = [];
// @DataMember(Name="Ncl Modified")
public Ncl_Modified: string;
// @DataMember(Name="Net Price")
public Net_Price: string;
public vin: string;
// @DataMember(Name="Electric Range")
public Electric_Range: number;
// @DataMember(Name="Electric Consumption")
public Electric_Consumption: number;
// @DataMember(Name="Special Info")
public Special_Info: number;
// @DataMember(Name="Personalised")
public Personalised: number;
public constructor(init?: Partial<CsvVehicleData>) { (Object as any).assign(this, init); }
}
export class CentralStockResponse
{
public vehicles: CsvVehicleData[];
public constructor(init?: Partial<CentralStockResponse>) { (Object as any).assign(this, init); }
}
export class CentralVehiclesCsvRequest implements IPost
{
public min: number;
public max: number;
public noPortArrivalDate: boolean;
public vehicleType: string;
public constructor(init?: Partial<CentralVehiclesCsvRequest>) { (Object as any).assign(this, init); }
}
TypeScript CentralVehiclesCsvRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/{VehicleType}/Vehicle/CentralCsv HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CentralVehiclesCsvRequest 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>
</CentralVehiclesCsvRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CentralStockResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO"> <Vehicles xmlns:d2p1="http://schemas.datacontract.org/2004/07/Mercedes.VehicleManagement.API.Shared.POCO.V3" i:nil="true" /> </CentralStockResponse>