Skip to content
The Bookwise guidev1.1.0Read as Markdown
Documentation menu
Docs/Booking management
Booking management

cancel_booking

Cancels a booking and applies the business's cancellation policy. Returns whether cancellation was free, any fee, and any refund. Notifies the business. This cannot be undone.

Scope & access

Directory + businessWrites dataChanges existing state

Follow the credential fields below. Public discovery does not require a login; private booking operations require the indicated token.

This tool advertises idempotent behavior. If an idempotencyKey is specified, reuse it with identical arguments only when retrying that same intended action.

Parameters

These are the directory endpoint parameters. Business endpoints scope public discovery to the published business; owner calls still require businessId. Inspect tools/list on your endpoint for the exact schema.

bookingIdRequired
string

bookingId: the booking ID (same as the holdId), e.g. "bkg_01j…"

accessTokenRequired
string

accessToken: secret returned after verification, immediate confirmation, or recover_booking_access; also works while awaiting payment or approval

reasonOptional
string

reason: optional short reason, e.g. "plans changed"

Example call

Pass this object to the MCP client's callTool method. Replace placeholders with returned IDs, saved credentials and the customer's details; use future dates appropriate to their request.

cancel_booking · MCP client arguments
json
{
  "name": "cancel_booking",
  "arguments": {
    "bookingId": "<bookingId>",
    "accessToken": "<saved-access-token>"
  }
}

JSON schemas

Nested fields, formats, enums and constraints are included in the complete schemas. Successful data is returned in structuredContent. SDK input validation and domain errors use different error shapes.

Input schemaJSON Schema
Input JSON Schema
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string",
      "minLength": 1,
      "description": "bookingId: the booking ID (same as the holdId), e.g. \"bkg_01j…\""
    },
    "accessToken": {
      "type": "string",
      "minLength": 10,
      "description": "accessToken: secret returned after verification, immediate confirmation, or recover_booking_access; also works while awaiting payment or approval"
    },
    "reason": {
      "description": "reason: optional short reason, e.g. \"plans changed\"",
      "type": "string",
      "maxLength": 500
    }
  },
  "required": [
    "bookingId",
    "accessToken"
  ]
}
Output schemaJSON Schema
Output JSON Schema
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "const": "cancelled"
    },
    "fee": {
      "type": "object",
      "properties": {
        "amountMinor": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "formatted": {
          "type": "string"
        }
      },
      "required": [
        "amountMinor",
        "currency",
        "formatted"
      ],
      "additionalProperties": false
    },
    "refund": {
      "type": "object",
      "properties": {
        "amountMinor": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "formatted": {
          "type": "string"
        }
      },
      "required": [
        "amountMinor",
        "currency",
        "formatted"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "bookingId",
    "status",
    "fee",
    "refund"
  ],
  "additionalProperties": {}
}
Behavior annotationsMCP
Tool annotations
json
{
  "readOnlyHint": false,
  "destructiveHint": true,
  "idempotentHint": true,
  "openWorldHint": true
}

Errors & next steps

Check isError before reading a success response. Follow nextStep where supplied, and never treat a pending booking as confirmed. See Errors and retries and the booking lifecycle for recovery paths.

Back to all tools