Hotels & multi-unit listings

TL;DR

A hotel is a set of room types, and each room type is a listing that sells several identical rooms. Every listing tells you its kind, its hotel and its unitCount; availability gives availableUnits (rooms left) per night; a reservation names the room it was given.

The model

  • Hotel: the property. It is never booked itself. List them with GET /v1/hotels.
  • Room type: a listing ("Deluxe Queen", "Double or Twin Room"). Prices, availability, restrictions and reservations live here, exactly like any other listing.
  • Room(unit): one physical room of a room type ("DQ(3)"). Hotel PMSs name their rooms; Booking.com only gives a count.

A vacation rental is a listing with kind: "home", hotel: null and unitCount: 1. Nothing about homes changes.

Where hotels come from

  • Hotel PMS (Cloudbeds, Mews, Zeevou): each property becomes a hotel and each room type (Zeevou: unit type) a listing with its named rooms. The PMS owns the rooms, room assignments and room counts; Repull mirrors them within minutes.
  • Booking.com: a property with several room types, or a room type with several rooms, is presented as a hotel with the id booking:<hotelId>. Room counts are the ones set on Booking.com.

On every listing

GET /v1/listings and GET /v1/listings/{id} return:

{
  "id": "30908",
  "name": "Deluxe Queen",
  "kind": "room_type",
  "hotel": { "id": "30910", "name": "Harbor Hotel", "source": "pms" },
  "unitCount": 10,
  "units": [
    { "id": "679314-0", "name": "DQ(1)", "active": true, "housekeepingStatus": null, "floor": null, "source": "cloudbeds" }
  ]
}
  • kind: room_type when the listing sells several identical rooms (or is a hotel PMS room type); otherwise home.
  • hotel: the hotel it belongs to, or null. A one-room apartment that shares a Booking.com property with others keeps kind: "home" and shows the property here.
  • unitCount: how many rooms of this type exist.
  • units (detail only, and GET /v1/listings/{id}/units): the named rooms, for hotel PMS room types.

Hotels and their room types

curl https://api.repull.dev/v1/hotels/booking:255832 \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
{
  "id": "booking:255832",
  "name": "Marie Luisa",
  "source": "booking",
  "provider": "booking",
  "roomTypeCount": 4,
  "unitCount": 31,
  "roomTypes": [
    { "listingId": "33095", "name": "Double or Twin Room", "unitCount": 19 },
    { "listingId": "33315", "name": "Single Room", "unitCount": 5 }
  ]
}

Rooms left per night

GET /v1/availability/{propertyId} on a room type returns availableUnits per night: the rooms still for sale. A night is available while at least one room is left.

{ "date": "2026-10-17", "available": true, "price": 89, "minNights": 1, "availableUnits": 14 }

Setting rooms to sell

For a Booking.com room type, send availableUnits with PUT /v1/availability/{propertyId} (or the batch endpoint). It can't exceed the room type's unitCount.

curl -X PUT https://api.repull.dev/v1/availability/33095 \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "dates": ["2026-12-24", "2026-12-25"], "availableUnits": 6 }'

Hotel PMS rooms are managed in the PMS

For a Cloudbeds, Mews or Zeevou room type, rooms and room counts are set in the PMS. Writing availableUnits there returns 409 managed_by_pms. Prices and restrictions work as on any listing where the PMS allows them.

Which room a guest got

A reservation on a hotel PMS room type carries the room it was assigned, on GET /v1/reservations, GET /v1/reservations/{id} and the reservation webhooks. It is null until the PMS assigns a room.

{ "id": "241362", "listingId": "30908", "unit": { "id": "679314-2", "name": "DQ(3)" } }
  • Connect: connect Cloudbeds, Mews or Booking.com.
  • Webhooks: reservation events include unit.
AI