Skip to content

Hotel Rooms, Menus and Cars, the Schema.org Way

ObjectsGrid already modeled shops, appointments, events and memberships. A hotel, a restaurant, a car dealer and an estate agent each needed one thing more: what they sell. Today they have it, in Schema.org's own terms.

Hotels: rooms that can't be sold twice

A room, a suite or a holiday flat is an Accommodation, in its hotel (containedInPlace). A stay is a LodgingReservation of it, and ObjectsGrid makes sure one room is never booked twice for the same night: the second booking is refused with 409 STAY_OVERLAPS, naming the stay that holds the dates, even when both arrive at the same moment. Check-out and check-in on the same day are fine. Hotels that sell by category book the hotel with a lodgingUnitType instead, and keep the free rooms in the Offer's inventoryLevel. Hotels and rentals has the details.

Restaurants: menus with allergens

A Menu has sections and dishes (MenuItems), each with the diets it suits, its nutrition and the 14 allergens EU law requires a menu to show. Prices are Offers, so takeaway orders are Carts like any other. A menu's JSON-LD document is what Google reads for a restaurant. Restaurants and menus.

Car dealers: a car is a Product

Schema.org says a vehicle is a kind of product, so in ObjectsGrid a car is a Product of kind Car, with its VIN, model year, mileage, fuel, transmission and engine. It keeps everything a Product has, offers and reviews included, and every vehicle field is searchable: "diesel, under 100,000 km, 2020 or later" is one list. Car dealers.

Estate agents: listings come and go, the property stays

The property is an Accommodation with its bedrooms, size and year built; each RealEstateListing offers it for sale or to rent for a while, with its Offers. Search reaches through the listing to the property: three bedrooms or more, in this postal code. Real estate listings.

When Schema.org isn't enough

Some fields aren't in Schema.org: allergens, a menu's hours, the links from a dish back to its section. ObjectsGrid adds them where an industry needs them, marks them x-objectsgrid-extension in the catalog, and leaves them out of JSON-LD documents, so what search engines see stays pure Schema.org.