STAGINGOpen PROD

Build on the Partner API

View as Markdown

Hotel stays

Last updated

Nobody reads documentation.

Here are the instructions for your agent. Give it this prompt: it reads the guides and the API contract, then walks you through the integration step by step, what to do, where and how.

Download agent instructions

This guide is for builders of a website, app or agent on the Partner API.

A hotel stay is booked by its dates, never through a cart. A product that is a hotel stay says hotelStay: true (and availabilityRequired: true), and its own bookingUrl is its page on groupon.com. Read its rooms for the shopper's dates, show them on your own page, and hand the shopper the bookingUrl of the room they chose: it opens Groupon's checkout for that room and those dates, where the shopper pays.

Groupon sells hotel stays in two ways, and the stays answer says which one a product is in kind.

market_ratecontracted
Where Groupon sells itA page under groupon.com/hotels, where Groupon's hotel partner prices every room liveA product page on groupon.com, from Groupon's own contract with the hotel
The roomsEvery room and rate the partner offers for the dates and guestsThe product's options that can be booked for every night of the stay
GuestsThe ones you ask for with adults and childrenAlways 2 adults and no children: guests.fixed is true, and the guests you send make no difference
priceThe whole stay before taxes and feesThe sum of the nights at the contracted rate, before taxes and fees
total and payAtHotelThe stay with taxes and every fee, and the part the hotel collectsAlways null: Groupon's checkout states the taxes and fees
bookingUrl of a roomGroupon's checkout for that room, with Groupon's quote for those dates and guestsGroupon's checkout for that option and those dates
Rooms that cannot be bookedNot listedunavailableRooms, each with its nights

Read the rooms of a stay

bash
curl -s "https://api-staging-core.livingsocial.com/partner_storefront/products/$PRODUCT_ID/stays?checkIn=2026-12-04&checkOut=2026-12-06&adults=2&children=7" \
  -H "Authorization: Bearer $GROUPON_API_KEY"
ParameterMeaning
checkInRequired: the check-in day, YYYY-MM-DD, from yesterday to a year ahead
checkOutRequired: the check-out day, 1 to 28 nights after checkIn
adultsAdults in the room of a market-rate stay, 1 to 4; 2 when absent. A contracted stay ignores it
childrenEach child's age in the room of a market-rate stay, 0 to 17, comma-separated, at most 2 (4,9). A contracted stay ignores it

One call reads one stay for one room's guests. Anything outside these limits is refused with 400 BAD_REQUEST, which says what to fix, and so is a product that is not a hotel stay (read its availability, or put it in a cart).

What the answer holds

FieldMeaning
kindmarket_rate or contracted, as in the table above
statusknown: the rooms are Groupon's answer. unknown: they could not be read right now
asOfWhen Groupon was read; rooms are kept a few minutes
checkIn, checkOut, nightsThe stay you asked about
adults, childrenAgesThe guests the rooms are priced for: the ones you asked for in a market-rate stay, and 2 adults with no children in a contracted stay
guestsThe same guests as adults, children (a count) and fixed: true when Groupon's checkout books exactly these guests whatever you ask
priceNoteWhat the prices are, in one sentence to show beside them
roomsEvery room you can book for the stay, cheapest first
unavailableRoomsA contracted stay's options that cannot be booked for these dates; always empty for a market-rate stay

Each room:

FieldMeaning
idThe room and rate, unique within one answer. In a contracted stay, Groupon's option for these dates
title, descriptionThe room as the hotel names it. In a contracted stay, title is the name of the product's option and description is empty
refundable, cancellationPolicyWhether the rate can be cancelled for a refund, and the terms in Groupon's or the hotel partner's words. In a contracted stay with no terms stated, refundable is false and the terms are empty
priceThe whole stay before taxes and fees (in a contracted stay, the sum of its nights)
totalThe whole stay with taxes and every fee, the fees paid at the hotel included; null when Groupon does not state it, and always null in a contracted stay
payAtHotelOf total, the fees the hotel collects at the stay, such as a resort fee; null when Groupon does not state them, and always null in a contracted stay
nightsEach night at its base rate, before taxes and fees
bookingUrlGroupon's checkout for this room and these dates

Each room that cannot be booked, in a contracted stay:

FieldMeaning
id, titleThe option, as in rooms
nightsEach night of the stay with date and available. A night that is false is sold out, closed, or not in Groupon's calendar; when every night is true, the length of the stay is what the option does not allow

Every amount is in minor units with its currency and currencyPrecision, as in the rest of the API. Show price and, where it is there, total as they are, and say which is which; Groupon's checkout states the amount it charges. A room is seen, not held: it can go before the shopper pays, and Groupon's checkout then says so. A contracted room is held only when the shopper places the order.

bookingUrl is tagged with your storefront and, when your storefront has a CJ publisher id, wrapped in Commission Junction's click link like a cart's buyLink, so a stay booked through it earns your commission. Hand it to the shopper unchanged; never open it for them, and never build it yourself.

The link carries what Groupon's checkout books. A market-rate room's link carries Groupon's quote for that room: its dates and its guests are the ones the checkout books, and an edited link books the original stay while the order shows the edited one. A contracted room's link names the option, the dates and the product, and the checkout reads the dates from it. Never change any part of either link. For other dates or guests, read the stays again and hand the new room's link.

When the rooms cannot be read

status: unknown means Groupon could not be read right now: never show the hotel as fully booked. Hand the shopper the product's own bookingUrl instead, its page on groupon.com, where they pick the dates and pay. A known answer with no room means no room is offered for those dates and guests, or Groupon's hotel partner did not price them, or, in a contracted stay, every option has a night that cannot be booked: read unavailableRooms to tell the shopper which nights are the problem, and offer other dates.

Which hotels

The stays answer reads both kinds, and both kinds are in the catalog. A product says hotelStay: true in a walk, a search and a read, and the stays answer says its kind. Hotels Groupon contracts itself are sold as a few fixed room options on a nightly calendar; Groupon's market-rate hotels are priced live for the dates and guests asked.

A market-rate hotel has no price in the catalog: its options list is empty (in the agent API its price is null too), because its rooms and rates exist only for dates. Its bookingUrl is its page on groupon.com. Read the stays to get prices. A search with a price bound leaves it out.

For an AI agent

The agent API answers the same rooms in the offer read: GET /ls_agent_api/offers/{permalink} with checkIn, checkOut, adults and children answers stays on an offer whose hotelStay is true, with the same kind, guests, rooms and unavailableRooms, and a bookingUrl for the person on each room. A search result carries hotelStay too, so an agent knows an offer is a hotel stay before it reads the offer. The consumer MCP server's get_offer takes the same four arguments.