Skip to content

Car dealers

A car on a dealer's lot is a Product of a vehicle kind, as in Schema.org, where Vehicle is a kind of Product: it keeps a Product's brand, Offers, reviews and condition, and gains the vehicle fields. The dealer is a Place of kind AutoDealer (or MotorcycleDealer, AutoRental, AutoRepair...).

A car

curl -X POST https://apis.objectsgrid.com/products -H 'X-ObjectsGrid-AccessPoint: EU' -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' -d '{
    "name": [{"at_language": "en", "at_value": "Volkswagen Golf 2.0 TDI"}], "sku": "STOCK-1042",
    "additionalType": "Car", "brand": {"at_id": "https://apis.objectsgrid.com/brands/<volkswagen>"}, "model": "Golf",
    "vehicleIdentificationNumber": "WVWZZZ1JZXW000001", "vehicleModelDate": "2021",
    "itemCondition": "https://schema.org/UsedCondition",
    "mileageFromOdometer": {"value": 42000, "unitCode": "KMT"}, "numberOfPreviousOwners": 1,
    "bodyType": "Hatchback", "fuelType": "Diesel", "vehicleTransmission": "Manual",
    "vehicleEngine": [{"engineType": "Inline-4", "enginePower": {"value": 110, "unitCode": "KWT"}}],
    "emissionsCO2": 112, "numberOfDoors": 5, "vehicleSeatingCapacity": 5, "color": "Blue"}'
  • The kinds are Vehicle, Car, Motorcycle and BusOrCoach. The vehicle fields are refused on other Products.
  • vehicleIdentificationNumber is the 17-character VIN, without I, O or Q; vehicleModelDate the model year.
  • An electric car's battery capacity and range, which Schema.org has no fields for, go in additionalProperty.

Searching the stock

Every vehicle field can be filtered and sorted:

curl -G https://apis.objectsgrid.com/products -H 'X-ObjectsGrid-AccessPoint: EU' -H "Authorization: Bearer $TOKEN" \
  --data-urlencode 'where={"additionalType": {"equals": "Car"}, "fuelType": {"equals": "Diesel"},
    "mileageFromOdometer": {"value": {"lt": 100000}}, "vehicleModelDate": {"gte": "2020"}}' \
  --data-urlencode 'orderBy=[{"mileageFromOdometer": {"value": "asc"}}]'

groupBy counts the stock by fuelType or bodyType for a search page's filters. See Lists.

Prices, test drives and service

  • Prices are Offers of the car, with itemCondition and, for a lease, businessFunction LeaseOut.
  • A test drive is a Reservation of a Service "Test drive" with the salesperson as provider: appointments of one provider never overlap.
  • A service visit is a Reservation of the workshop's Service, and the work an Order.