| 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 |
|---|
package dtos
import (
"time"
)
type StockDataRow struct {
CommissionNumber string `json:"commissionNumber"`
Description string `json:"description"`
SalesDescriptionLong string `json:"salesDescriptionLong"`
Model string `json:"model"`
Colour string `json:"colour"`
ColourGroup string `json:"colourGroup"`
FuelType string `json:"fuelType"`
Transmission string `json:"transmission"`
TransmissionType string `json:"transmissionType"`
Packages string `json:"packages"`
Lines string `json:"lines"`
Upholstery string `json:"upholstery"`
UpholsteryCode string `json:"upholsteryCode"`
DisplayStockAgent string `json:"displayStockAgent"`
Location string `json:"location"`
Vin string `json:"vin"`
Vid string `json:"vid"`
VehicleType string `json:"vehicleType"`
VehicleClass string `json:"vehicleClass"`
CreationDate time.Time `json:"creationDate,omitempty"`
LastUpdated *time.Time `json:"lastUpdated,omitempty"`
PortArrivalDate *time.Time `json:"portArrivalDate,omitempty"`
CombinedGrossOfferValue float64 `json:"combinedGrossOfferValue,omitempty"`
CurrentLocation string `json:"currentLocation"`
NotVisibleOnlineShowroom bool `json:"notVisibleOnlineShowroom,omitempty"`
NvosReason string `json:"nvosReason"`
NvosReasonOneAdminExcluded bool `json:"nvosReasonOneAdminExcluded,omitempty"`
NvosReasonLinkedToBackOrder bool `json:"nvosReasonLinkedToBackOrder,omitempty"`
IncludedAfterDeduplication bool `json:"includedAfterDeduplication,omitempty"`
Unique bool `json:"unique,omitempty"`
Duplicate bool `json:"duplicate,omitempty"`
DuplicateGroup *int `json:"duplicateGroup,omitempty"`
LowestComm bool `json:"lowestComm,omitempty"`
Rule string `json:"rule"`
Fin string `json:"fin"`
ChassisNumber string `json:"chassisNumber"`
ModelYear string `json:"modelYear"`
ModelYearCode string `json:"modelYearCode"`
HalfModelYearCode string `json:"halfModelYearCode"`
FullModelYearCode string `json:"fullModelYearCode"`
BodyStyle string `json:"bodyStyle"`
Engine string `json:"engine"`
CesarIdShipToParty string `json:"cesarIdShipToParty"`
VehicleUsageCode string `json:"vehicleUsageCode"`
Acceleration *float64 `json:"acceleration,omitempty"`
BootCapacity *int `json:"bootCapacity,omitempty"`
TopSpeed *float64 `json:"topSpeed,omitempty"`
DriveConcept string `json:"driveConcept"`
CombustionPowerHp *float64 `json:"combustionPowerHp,omitempty"`
ElectricPowerKw *float64 `json:"electricPowerKw,omitempty"`
ElectricPowerHp *float64 `json:"electricPowerHp,omitempty"`
CombinedPowerKw *float64 `json:"combinedPowerKw,omitempty"`
CombinedPowerHP *float64 `json:"combinedPowerHP,omitempty"`
UnderOffer bool `json:"underOffer,omitempty"`
IsSellable bool `json:"isSellable,omitempty"`
MbukSecured bool `json:"mbukSecured,omitempty"`
IsDisplayStock bool `json:"isDisplayStock,omitempty"`
IsSpecialistCar bool `json:"isSpecialistCar,omitempty"`
Account string `json:"account"`
ProductRange string `json:"productRange"`
IsAMG bool `json:"isAMG,omitempty"`
ActualPrice float64 `json:"actualPrice,omitempty"`
RetailPriceExVAT float64 `json:"retailPrice_ExVAT,omitempty"`
RetailPriceIncVAT float64 `json:"retailPrice_IncVAT,omitempty"`
Otr float64 `json:"otr,omitempty"`
Nst string `json:"nst"`
Bm7NST string `json:"bm7NST"`
ElectricRange *float64 `json:"electricRange,omitempty"`
ElectricConsumption *float64 `json:"electricConsumption,omitempty"`
Emission *float64 `json:"emission,omitempty"`
EmissionDirective string `json:"emissionDirective"`
EmissionCombined string `json:"emissionCombined"`
EmissionExtraUrban string `json:"emissionExtraUrban"`
EmissionUrban string `json:"emissionUrban"`
EnergyEfficiencyClass string `json:"energyEfficiencyClass"`
WltpEmissionCombined string `json:"wltpEmissionCombined"`
WltpCombined string `json:"wltpCombined"`
WltpLow string `json:"wltpLow"`
WltpMedium string `json:"wltpMedium"`
WltpHigh string `json:"wltpHigh"`
WltpExtraHigh string `json:"wltpExtraHigh"`
TotalMoneyOffersExclDiscretionary float64 `json:"totalMoneyOffersExclDiscretionary,omitempty"`
DiscretionaryMoneyOffer float64 `json:"discretionaryMoneyOffer,omitempty"`
TotalMoneyOffersInclDiscretionary float64 `json:"totalMoneyOffersInclDiscretionary,omitempty"`
NonDiscretionaryNMOCount int `json:"nonDiscretionaryNMOCount,omitempty"`
NonDiscretionaryMOCount int `json:"nonDiscretionaryMOCount,omitempty"`
DiscretionaryNMOCount int `json:"discretionaryNMOCount,omitempty"`
DiscretionaryMOCount int `json:"discretionaryMOCount,omitempty"`
TotalOfferVIPAmount float64 `json:"totalOfferVIPAmount,omitempty"`
StockLevelIndicator *string `json:"stockLevelIndicator,omitempty"`
ConfirmedProductionDate *time.Time `json:"confirmedProductionDate,omitempty"`
ForecastedArrivalDate *time.Time `json:"forecastedArrivalDate,omitempty"`
}
type OnlineShowroomStockResponse struct {
TotalVehicles int `json:"totalVehicles,omitempty"`
Vehicles []StockDataRow `json:"vehicles"`
}
type OnlineShowroomStockRequest struct {
Gssns []string `json:"gssns"`
}
Go 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
}
]
}