Prompt

availability checking API for bookings

Technology / Scheduling & Booking Software2 observationsLast seen Oct 24, 2026

Latest observation

Oct 24, 2026OpenAI APIWeb search: off

Here’s a practical availability checking API design for bookings.

Core idea

An availability API answers:

  • Is this resource/bookable item available?
  • For what date/time range?
  • How many units are available?
  • What are the conflicting bookings or constraints?

Typical endpoint

GET /availability

Check availability for a resource.

Query parameters

  • resource_id — ID of the item/service/room
  • start — start datetime (ISO 8601)
  • end — end datetime (ISO 8601)
  • quantity — number requested
  • timezone — optional, e.g. UTC, America/New_York

Example request

GET /availability?resource_id=room_123&start=2026-10-24T10:00:00Z&end=2026-10-24T12:00:00Z&quantity=1

Example response

{
  "resource_id": "room_123",
  "start": "2026-10-24T10:00:00Z",
  "end": "2026-10-24T12:00:00Z",
  "requested_quantity": 1,
  "available": true,
  "available_quantity": 3,
  "conflicts": [],
  "hold_expires_at": null
}

If unavailable

{
  "resource_id": "room_123",
  "start": "2026-10-24T10:00:00Z",
  "end": "2026-10-24T12:00:00Z",
  "requested_quantity": 1,
  "available": false,
  "available_quantity": 0,
  "conflicts": [
    {
      "booking_id": "bk_789",
      "start": "2026-10-24T09:30:00Z",
      "end": "2026-10-24T12:30:00Z",
      "status": "confirmed"
    }
  ]
}

Recommended booking flow

  1. Check availability
  2. Create a temporary hold/reservation
  3. Confirm booking
  4. Release/expire hold if not completed

This avoids race conditions where two users see the same slot as available.


Better: use a hold API too

POST /availability/hold

Creates a short-lived hold.

{
  "resource_id": "room_123",
  "start": "2026-10-24T10:00:00Z",
  "end": "2026-10-24T12:00:00Z",
  "quantity": 1,
  "customer_id": "cust_456"
}

Response:

{
  "hold_id": "hold_001",
  "status": "held",
  "expires_at": "2026-10-24T10:10:00Z"
}

Then:

POST /bookings

Use the hold to create the booking safely.


Important availability rules

Define these clearly:

  • Time overlap logic: does end == another.start count as available?
  • Buffer time: cleaning/setup before or after bookings
  • Capacity: multiple simultaneous bookings allowed if quantity permits
  • Blocked times: maintenance, holidays, blackout periods
  • Timezone handling: store in UTC, display in local timezone
  • Minimum/maximum stay or duration
  • Booking lead time: cannot book within X hours of start

Useful response fields

  • available — boolean
  • available_quantity — remaining units
  • conflicts — overlapping bookings or blocks
  • next_available_at — next open time
  • hold_expires_at — if a hold is created
  • rules_applied — optional list of constraints used

Example: date-based availability

For hotel-style bookings, you may want:

GET /availability/calendar?resource_id=hotel_1&month=2026-10

Returns daily availability for a month.

{
  "resource_id": "hotel_1",
  "month": "2026-10",
  "days": [
    { "date": "2026-10-24", "available": true, "available_quantity": 5 },
    { "date": "2026-10-25", "available": false, "available_quantity": 0 }
  ]
}

If you want, I can also provide:

  1. a REST API spec (OpenAPI)
  2. a database schema for availability/bookings
  3. a Node.js / Python implementation for the endpoint

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.