← capabilitiesscheduling.write

cancel_booking

booking.cancel_booking · v0.1.0

Cancel a previously created booking.

Semantics

Marks the booking cancelled and frees the held slot back into availability. The provider is notified per their notification settings. Refund handling is provider-specific and exposed via the `refund_status` output field.

Invariants

  • Idempotent. Cancelling a booking that is already cancelled returns `cancelled: true` with no further side effects.
  • If `booking_id` is unknown, returns `error: "unknown_booking"`.
  • Once a booking is cancelled, its slot becomes available to subsequent `check_availability` calls.

When to use

When the user has explicitly confirmed they want to cancel. Confirm with the user first because this action is not reversible.

Input schema

{
  "type": "object",
  "required": [
    "booking_id"
  ],
  "properties": {
    "reason": {
      "type": "string",
      "description": "Free-text cancellation reason; surfaced to the provider."
    },
    "booking_id": {
      "type": "string"
    },
    "agent_vendor": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

Output schema

{
  "type": "object",
  "required": [
    "ok"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "error": {
      "enum": [
        "unknown_booking",
        "already_cancelled",
        "unauthorized"
      ],
      "type": "string"
    },
    "cancelled": {
      "type": "boolean"
    },
    "freed_slot": {
      "type": "object",
      "properties": {
        "end_at": {
          "type": "string",
          "format": "date-time"
        },
        "start_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "refund_status": {
      "enum": [
        "none",
        "pending",
        "refunded",
        "denied"
      ],
      "type": "string"
    }
  }
}

Recent conformance runs

passprovidertestmswhen
bookio:studio-sangharejects_unknown_booking3105-18 19:50
bookio:studio-sanghaidempotent_double_cancel11105-18 19:50
bookio:studio-sanghacancels_real_booking38405-18 19:50
bookio:verde-wellness-austinrejects_unknown_booking3105-18 19:50
bookio:verde-wellness-austinidempotent_double_cancel9205-18 19:50
bookio:verde-wellness-austincancels_real_booking36205-18 19:50
bookio:aurora-hair-brooklynrejects_unknown_booking2805-18 19:50
bookio:aurora-hair-brooklynidempotent_double_cancel10405-18 19:50
bookio:aurora-hair-brooklyncancels_real_booking39405-18 19:50
bookio:salon-aurorarejects_unknown_booking3305-18 19:50
bookio:salon-auroraidempotent_double_cancel9905-18 19:50
bookio:salon-auroracancels_real_booking39005-18 19:50
bookio:massage-relaxrejects_unknown_booking3305-18 19:50
bookio:massage-relaxidempotent_double_cancel10505-18 19:50
bookio:massage-relaxcancels_real_booking37905-18 19:50
bookio:ink-quarter-portlandrejects_unknown_booking3205-18 19:50
bookio:ink-quarter-portlandidempotent_double_cancel10205-18 19:50
bookio:ink-quarter-portlandcancels_real_booking40605-18 19:50
bookio:ink-houserejects_unknown_booking3505-18 19:50
bookio:ink-houseidempotent_double_cancel10205-18 19:50
bookio:ink-housecancels_real_booking37605-18 19:50
bookio:fitness-zelenarejects_unknown_booking3505-18 19:50
bookio:fitness-zelenaidempotent_double_cancel9905-18 19:50
bookio:fitness-zelenacancels_real_booking38905-18 19:50
bookio:dental-vinohradyrejects_unknown_booking3305-18 19:50
bookio:dental-vinohradyidempotent_double_cancel9705-18 19:50
bookio:dental-vinohradycancels_real_booking39505-18 19:50
bookio:bistro-modra-houbarejects_unknown_booking3405-18 19:50
bookio:bistro-modra-houbaidempotent_double_cancel10005-18 19:50
bookio:bistro-modra-houbacancels_real_booking44505-18 19:50