| POST | /v1/OnlineShowroom/Stock | Search for Online Showroom Stock | Calls Vehicle Data API online showroom stock endpoint and searches for vehicles given a list of retailers. The results are used to populate the Online Showroom Stock datatable grid in OneAdmin |
|---|
const std = @import("std");
pub const StockDataRow = struct {
commissionNumber: ?[]const u8 = null,
description: ?[]const u8 = null,
salesDescriptionLong: ?[]const u8 = null,
model: ?[]const u8 = null,
colour: ?[]const u8 = null,
colourGroup: ?[]const u8 = null,
fuelType: ?[]const u8 = null,
transmission: ?[]const u8 = null,
transmissionType: ?[]const u8 = null,
packages: ?[]const u8 = null,
lines: ?[]const u8 = null,
upholstery: ?[]const u8 = null,
upholsteryCode: ?[]const u8 = null,
displayStockAgent: ?[]const u8 = null,
location: ?[]const u8 = null,
vin: ?[]const u8 = null,
vid: ?[]const u8 = null,
vehicleType: ?[]const u8 = null,
vehicleClass: ?[]const u8 = null,
creationDate: ?[]const u8 = null,
lastUpdated: ?[]const u8 = null,
portArrivalDate: ?[]const u8 = null,
combinedGrossOfferValue: f64 = 0,
currentLocation: ?[]const u8 = null,
notVisibleOnlineShowroom: bool = false,
nvosReason: ?[]const u8 = null,
nvosReasonOneAdminExcluded: bool = false,
nvosReasonLinkedToBackOrder: bool = false,
includedAfterDeduplication: bool = false,
unique: bool = false,
duplicate: bool = false,
duplicateGroup: ?i32 = null,
lowestComm: bool = false,
rule: ?[]const u8 = null,
fin: ?[]const u8 = null,
chassisNumber: ?[]const u8 = null,
modelYear: ?[]const u8 = null,
modelYearCode: ?[]const u8 = null,
halfModelYearCode: ?[]const u8 = null,
fullModelYearCode: ?[]const u8 = null,
bodyStyle: ?[]const u8 = null,
engine: ?[]const u8 = null,
cesarIdShipToParty: ?[]const u8 = null,
vehicleUsageCode: ?[]const u8 = null,
acceleration: ?f64 = null,
bootCapacity: ?i32 = null,
topSpeed: ?f64 = null,
driveConcept: ?[]const u8 = null,
combustionPowerHp: ?f64 = null,
electricPowerKw: ?f64 = null,
electricPowerHp: ?f64 = null,
combinedPowerKw: ?f64 = null,
combinedPowerHP: ?f64 = null,
underOffer: bool = false,
isSellable: bool = false,
mbukSecured: bool = false,
isDisplayStock: bool = false,
isSpecialistCar: bool = false,
account: ?[]const u8 = null,
productRange: ?[]const u8 = null,
isAMG: bool = false,
actualPrice: f64 = 0,
retailPrice_ExVAT: f64 = 0,
retailPrice_IncVAT: f64 = 0,
otr: f64 = 0,
nst: ?[]const u8 = null,
bm7NST: ?[]const u8 = null,
electricRange: ?f64 = null,
electricConsumption: ?f64 = null,
emission: ?f64 = null,
emissionDirective: ?[]const u8 = null,
emissionCombined: ?[]const u8 = null,
emissionExtraUrban: ?[]const u8 = null,
emissionUrban: ?[]const u8 = null,
energyEfficiencyClass: ?[]const u8 = null,
wltpEmissionCombined: ?[]const u8 = null,
wltpCombined: ?[]const u8 = null,
wltpLow: ?[]const u8 = null,
wltpMedium: ?[]const u8 = null,
wltpHigh: ?[]const u8 = null,
wltpExtraHigh: ?[]const u8 = null,
totalMoneyOffersExclDiscretionary: f64 = 0,
discretionaryMoneyOffer: f64 = 0,
totalMoneyOffersInclDiscretionary: f64 = 0,
nonDiscretionaryNMOCount: i32 = 0,
nonDiscretionaryMOCount: i32 = 0,
discretionaryNMOCount: i32 = 0,
discretionaryMOCount: i32 = 0,
totalOfferVIPAmount: f64 = 0,
stockLevelIndicator: ?[]const u8 = null,
confirmedProductionDate: ?[]const u8 = null,
forecastedArrivalDate: ?[]const u8 = null,
};
pub const OnlineShowroomStockResponse = struct {
totalVehicles: i32 = 0,
vehicles: []StockDataRow = &.{},
};
pub const OnlineShowroomStockRequest = struct {
gssns: [][]const u8 = &.{},
};
Zig OnlineShowroomStockRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/OnlineShowroom/Stock HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
gssns:
[
String
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
totalVehicles: 0,
vehicles:
[
{
commissionNumber: String,
description: String,
salesDescriptionLong: String,
model: String,
colour: String,
colourGroup: String,
fuelType: String,
transmission: String,
transmissionType: String,
packages: String,
lines: String,
upholstery: String,
upholsteryCode: String,
displayStockAgent: String,
location: String,
vin: String,
vid: String,
vehicleType: String,
vehicleClass: String,
creationDate: 0001-01-01,
lastUpdated: 0001-01-01,
portArrivalDate: 0001-01-01,
combinedGrossOfferValue: 0,
currentLocation: String,
notVisibleOnlineShowroom: False,
nvosReason: String,
nvosReasonOneAdminExcluded: False,
nvosReasonLinkedToBackOrder: False,
includedAfterDeduplication: False,
unique: False,
duplicate: False,
duplicateGroup: 0,
lowestComm: False,
rule: String,
fin: String,
chassisNumber: String,
modelYear: String,
modelYearCode: String,
halfModelYearCode: String,
fullModelYearCode: String,
bodyStyle: String,
engine: String,
cesarIdShipToParty: String,
vehicleUsageCode: String,
acceleration: 0,
bootCapacity: 0,
topSpeed: 0,
driveConcept: String,
combustionPowerHp: 0,
electricPowerKw: 0,
electricPowerHp: 0,
combinedPowerKw: 0,
combinedPowerHP: 0,
underOffer: False,
isSellable: False,
mbukSecured: False,
isDisplayStock: False,
isSpecialistCar: False,
account: String,
productRange: String,
isAMG: False,
actualPrice: 0,
retailPrice_ExVAT: 0,
retailPrice_IncVAT: 0,
otr: 0,
nst: String,
bm7NST: String,
electricRange: 0,
electricConsumption: 0,
emission: 0,
emissionDirective: String,
emissionCombined: String,
emissionExtraUrban: String,
emissionUrban: String,
energyEfficiencyClass: String,
wltpEmissionCombined: String,
wltpCombined: String,
wltpLow: String,
wltpMedium: String,
wltpHigh: String,
wltpExtraHigh: String,
totalMoneyOffersExclDiscretionary: 0,
discretionaryMoneyOffer: 0,
totalMoneyOffersInclDiscretionary: 0,
nonDiscretionaryNMOCount: 0,
nonDiscretionaryMOCount: 0,
discretionaryNMOCount: 0,
discretionaryMOCount: 0,
totalOfferVIPAmount: 0,
stockLevelIndicator: String,
confirmedProductionDate: 0001-01-01,
forecastedArrivalDate: 0001-01-01
}
]
}