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
| Field | Value |
|---|---|
| checkin | YYYY-MM-DD, no earlier than today in America/Los_Angeles |
| checkout | YYYY-MM-DD, 1–60 nights after check-in |
| guests | 1 or 2 |
| roomType | Economy 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
GET /api/booking/v1/status— read launch status before offering to book.GET /api/booking/v1/availabilitywith the four inputs — check dates and see a planned total. There are currently no bookable properties.POST /api/booking/v1/quoteswith a JSON stay — obtain the same server-calculated estimate used on the website.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.
- Check
GET /api/booking/v1/sandbox/availability. - Create
POST /api/booking/v1/sandbox/quotes. Save the quoteId; quotes expire after ten minutes and do not hold inventory. - After the traveler authorizes checkout, call
POST /api/booking/v1/sandbox/checkoutwith quoteId, email, and acceptedTerms: true. Send a uniqueIdempotency-Key(16–100 letters, numbers, hyphens or underscores). Reuse it unchanged on a retry. - Open the returned hosted Stripe test checkout URL. Payment details never pass through the booking API. Authentication may require human interaction.
- 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
| Code | Action |
|---|---|
| BOOKING_CLOSED | Explain that sales are closed. Do not retry payment. |
| INVALID_STAY | Correct the dates, guest count, or room type. |
| SOLD_OUT | Ask for different dates or room type. |
| QUOTE_EXPIRED | Request a new quote and ask the traveler to review it. |
| IDEMPOTENCY_CONFLICT | Do not reuse a key with different details. |
| SERVICE_UNAVAILABLE | Retry 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.