Datasheets
Full hotel content for one hotel or up to 100 at a time, including images, facilities, description, ratings and category. Use it for hotel pages, maps and filters, never for prices.
A datasheet is the full static content of one hotel. Fetch one for a hotel page, or up to 100 per call when you sync your catalogue. Prices and availability never come from here: only Quote returns them.
One hotel
Up to 100 hotels
Datasheet fields
Both endpoints return the same datasheet shape. Optional text fields can be empty strings ("").
Images
- There is no thumbnail: use
images[0]. You can also choose by classification, for example a high-confidenceBuildingorPool. - Images are full-size originals. Proxy them through a resizing CDN rather than sending them to browsers as they are.
- The spec writes classification types as
Aerial ViewandHallway-Staircase. The docs samples writeAERIAL_VIEWandHALLWAY_OR_STAIRCASE. Normalise both sides before comparing: upper-case, replace every run of non-alphanumerics with_, then drop_OR_. Both examples becomeHALLWAY_STAIRCASE.
export const normaliseClassification = (s: string) =>
s.toUpperCase().replace(/[^A-Z0-9]+/g, '_').replace(/_OR_/g, '_');
normaliseClassification('Hallway-Staircase'); // HALLWAY_STAIRCASE
normaliseClassification('HALLWAY_OR_STAIRCASE'); // HALLWAY_STAIRCASEThe full list is in Enums.
Facilities
Use accommodationFacilities[] and roomFacilities[]. Sort by priority, highest first, for "top amenities", and map icon to your own icon set. Whether a facility costs extra is not specified.
Old docs and samples also show facilities { includedFacilities[], nonIncludedFacilities[], otherFacilities[] } and plain-string lists (includedServices[], nonIncludedServices[], otherServices[]). Don't build on them. The full facility catalogues are in Facilities.
Category
The datasheet gives category as a string such as S4. The booking flow gives an object such as { "code": "S4", "name": "4 STARS" }. Normalise both into one type. Codes: S1 to S6 stars, L1 to L5 keys, H1 to H5 suns, IN none.
type Category = { code: string; name?: string };
export const toCategory = (c: string | Category): Category =>
typeof c === 'string' ? { code: c } : c;Storing datasheets
- Keep content per language.
descriptionand facilitytranslationschange withlang. - Store the raw datasheet JSON next to your normalised columns. Shapes have changed before (the facilities deprecation), and the raw copy lets you re-parse without a new download.
- Never store or show prices from the catalogue.
Related
- Accommodation list: which datasheets to fetch
- Facilities: facility catalogues and labels
- Preferred hotels: promoted hotels as datasheets
- Hotel catalogue guide
Accommodation list
Page through every hotel your microsite can sell, with its code, GIATA id, location and last update time. Download it weekly and use lastUpdate to decide which datasheets to fetch again.
Preferred hotels
The hotels your microsite promotes, returned as full datasheets. Use them for landing pages and recommended rails, then quote them for prices.