Skip to content

Prices

Every money value in the API is an integer number of cents (or the smallest unit of the currency). 4599000 is $45,990.00. Divide by 100 to display.

A vehicle’s prices live in pricing_config, a JSON object with one entry per state or country. Ask for one entry with path:

query VehiclePrice($id: uuid!) {
stocked_vehicles_by_pk(id: $id) {
id
price: pricing_config(path: "AU_NSW")
}
}
{
"version": "v2",
"driveAwayPrice": 6890000,
"isVariable": false,
"isExclOnRoads": false,
"lineItems": {
"dutiable": [{ "code": "vehicle-price", "value": 6890000 }],
"onRoad": [],
"additional": []
}
}
Field Meaning
driveAwayPrice The total the customer pays, in cents. Show this.
isExclOnRoads true: the price excludes government charges. Label it “excl. on-road costs”, not “drive away”.
isVariable true: price on application (for example, built to order). Don’t show a number.
lineItems.dutiable The vehicle price and options that duty is charged on: vehicle-price, paint, accessories, discount…
lineItems.onRoad Government and on-road charges: stamp-duty, registration, ctp, luxury-car-tax…
lineItems.additional Charges and savings outside duty: freight, discount, cashback, grant…

Discounts are line items with a negative value. driveAwayPrice already includes every line item, so you never need to add them up. Use the line items only if you want to show a breakdown.

Some older vehicles have a version: "v1" entry with totalAfterOnRoadCosts instead of driveAwayPrice. The Vyro storefront doesn’t show v1 prices, and you can skip them too.

Round up to whole dollars, which is how dealers advertise. Use the currency for the state (see State pricing).

function formatPrice(price, { locale = 'en-AU', currency = 'AUD' } = {}) {
if (!price || price.version !== 'v2') return null;
if (price.isVariable) return 'Price on application';
const dollars = Math.ceil(price.driveAwayPrice / 100);
const amount = new Intl.NumberFormat(locale, {
style: 'currency',
currency,
maximumFractionDigits: 0,
}).format(dollars);
return price.isExclOnRoads ? `${amount} excl. on-road costs` : `${amount} drive away`;
}
formatPrice({ version: 'v2', driveAwayPrice: 6890000 }); // "$68,900 drive away"

min_price and max_price are the cheapest and dearest drive-away prices across all of a vehicle’s states, in cents. They are good enough for “under $40k” filters:

query Under40k($showroomId: uuid!) {
stocked_vehicles(
where: {
showroom_stocked_vehicles: { showroom_id: { _eq: $showroomId } }
min_price: { _lt: 4000000 }
}
order_by: [{ min_price: asc }, { id: asc }]
limit: 20
) {
id
min_price
nsw: pricing_config(path: "AU_NSW")
}
}

For an exact per-state filter or sort, read pricing_config(path: …).driveAwayPrice and sort in your code.

  • has_discount is true when the vehicle has a discount in any state.
  • pricing_events is the vehicle’s price history across all states, so it suits a “was” price only for vehicles priced the same everywhere. The highest past price:
query WasPrice($id: uuid!) {
stocked_vehicles_by_pk(id: $id) {
pricing_events(order_by: { price: desc }, limit: 1) {
price
event_at
}
}
}

pricing_config is the advertised price. To quote a customer exactly (their state, concessions, used-vehicle duty, registration transfer), use the Pricing API.