Prompt

How do I create, update, and cancel bookings programmatically?

Technology / Scheduling & Booking Software1 observationLast seen Oct 15, 2026

Latest observation

Oct 15, 2026OpenAI APIWeb search: off

To create, update, and cancel bookings programmatically, you generally use your booking system’s API. The exact endpoints and fields depend on the platform, but the workflow is usually:

1) Create a booking

Send a POST request to a bookings endpoint with the required details, such as:

  • customer/contact info
  • service/resource being booked
  • date and time
  • duration
  • location
  • notes or metadata

Example:

POST /bookings
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "customer": {
    "name": "Jane Doe",
    "email": "jane@example.com"
  },
  "service_id": "svc_123",
  "start_time": "2026-10-20T14:00:00Z",
  "duration_minutes": 60,
  "location_id": "loc_456"
}

Typical response:

{
  "id": "bk_789",
  "status": "confirmed",
  "start_time": "2026-10-20T14:00:00Z"
}

2) Update a booking

Use PATCH or PUT to modify an existing booking by ID.

  • PATCH is usually for partial updates
  • PUT often replaces the full record

Example:

PATCH /bookings/bk_789
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "start_time": "2026-10-20T15:00:00Z",
  "notes": "Client requested a later time"
}

3) Cancel a booking

Usually done with a DELETE request or a dedicated cancel endpoint.

Example with a cancel endpoint:

POST /bookings/bk_789/cancel
Authorization: Bearer YOUR_API_KEY

Or with delete:

DELETE /bookings/bk_789
Authorization: Bearer YOUR_API_KEY

Common implementation notes

  • Authenticate with an API key, OAuth token, or similar.
  • Validate availability before creating or updating.
  • Handle time zones carefully.
  • Expect conflict errors if a slot is already taken.
  • Check whether cancellations are soft (status change) or hard (delete record).
  • Use idempotency keys for create requests if the API supports them, to avoid duplicate bookings.

Example in JavaScript

const response = await fetch("https://api.example.com/bookings", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.API_KEY}`
  },
  body: JSON.stringify({
    customer: { name: "Jane Doe", email: "jane@example.com" },
    service_id: "svc_123",
    start_time: "2026-10-20T14:00:00Z",
    duration_minutes: 60
  })
});

const booking = await response.json();
console.log(booking);

If you want, I can also give you:

  • a Node.js / Python / cURL example,
  • or an example for a specific booking platform (e.g. Calendly, Square, Acuity, etc.).

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation 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.