Skip to content

SLEEP SPACE FOR AGENTS & DEVELOPERS

Find a room.
See the total.

One small HTTP interface for dates, guests, room type, and price. Use it from any assistant that supports HTTP tools.

Live reservations are closed. Public endpoints return planned prices and unavailable inventory. Public checkout always returns 409 BOOKING_CLOSED. The isolated sandbox uses fictional inventory and Stripe test payments only.

Download OpenAPI 3.1 → · Discovery document · Site facts

Four stay inputs

FieldValue
checkinYYYY-MM-DD, no earlier than today in America/Los_Angeles
checkoutYYYY-MM-DD, 1–60 nights after check-in
guests1 or 2
roomTypeEconomy or Economy Plus

All amounts are integer US cents. The planned nightly room rates are 7900 and 10900 cents, tax included. A second Economy guest adds 1000 cents per night. Economy Plus includes a second guest. Check-in may be at most one year ahead. These are planning rules, not a promise that a location is open.

Public workflow

  1. GET /api/booking/v1/status — read launch status before offering to book.
  2. GET /api/booking/v1/availability with the four inputs — check dates and see a planned total. There are currently no bookable properties.
  3. POST /api/booking/v1/quotes with a JSON stay — obtain the same server-calculated estimate used on the website.
  4. POST /api/booking/v1/checkout — currently closed; never tell the traveler a stay was booked.
curl 'https://www.sleepspace.net/api/booking/v1/status'

curl 'https://www.sleepspace.net/api/booking/v1/availability?checkin=2026-12-01&checkout=2026-12-03&guests=1&roomType=Economy'

Example dates must be replaced when they are in the past. Availability is never inferred from a price. A planned total is neither a quote valid for purchase nor an inventory hold.

Test checkout

The sandbox is disabled by default and requires operator setup. Its routes use Authorization: Bearer <sandbox-token>. The token belongs on your server, never in a public page or client-side agent prompt. Inventory is explicitly seeded by the operator for fictional property sandbox.

  1. Check GET /api/booking/v1/sandbox/availability.
  2. Create POST /api/booking/v1/sandbox/quotes. Save the quoteId; quotes expire after ten minutes and do not hold inventory.
  3. After the traveler authorizes checkout, call POST /api/booking/v1/sandbox/checkout with quoteId, email, and acceptedTerms: true. Send a unique Idempotency-Key (16–100 letters, numbers, hyphens or underscores). Reuse it unchanged on a retry.
  4. Open the returned hosted Stripe test checkout URL. Payment details never pass through the booking API. Authentication may require human interaction.
  5. Read GET /api/booking/v1/sandbox/bookings/{bookingId}. Only a verified paid webhook can produce confirmed status. A redirect is not payment proof.
{
  "quoteId": "q_from_the_quote_response",
  "email": "traveler@example.com",
  "acceptedTerms": true
}

Checkout reserves test inventory across every night, uses the server's quoted amount, and creates one payment session per idempotency key. Test sessions expire after 35 minutes. An ambiguous payment request keeps its hold until a signed expiry event or operator reconciliation; it is not automatically offered to another traveler. Duplicate paid webhooks do not create duplicate bookings.

Errors agents can act on

CodeAction
BOOKING_CLOSEDExplain that sales are closed. Do not retry payment.
INVALID_STAYCorrect the dates, guest count, or room type.
SOLD_OUTAsk for different dates or room type.
QUOTE_EXPIREDRequest a new quote and ask the traveler to review it.
IDEMPOTENCY_CONFLICTDo not reuse a key with different details.
SERVICE_UNAVAILABLERetry with the same key after a short delay; do not create another payment.

Compatibility and privacy

This is a provider-neutral REST interface, not an automatic integration with Meta, Grok, or any specific assistant. Import the OpenAPI schema into the agent's tool layer. Do not submit card numbers, identification documents, or passwords. Sandbox booking status is authenticated and excludes the guest email. This implementation does not send confirmations or marketing emails.

Before a live launch

Real property inventory, property time zones, room assignment, cancellation and refund rules, guest communications, operational reservation integration, and a separately reviewed live payment configuration are still required. The sandbox cannot be enabled for real sales through an environment variable. The public closure is intentional.

Implementation references: Stripe Checkout Sessions and Stripe payment fulfillment.

THE SLEEP SPACE NEWSLETTER

Good trips start here.

Travel tips, ways to spend less, and Sleep Space opening updates.