• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Cancel booking BETA

POST /v2/bookings/{booking_id}/cancel

Cancels an existing booking.


Permissions
APPOINTMENTS_WRITE
Try in API Explorer
Name Description
booking_id
string

Required
Beta

The ID of the Booking object representing the to-be-cancelled booking.

Name Description
idempotency_key
string

A unique key to make this request an idempotent operation.

Max Length 255
booking_version
integer (32-bit)

The revision number for the booking used for optimistic concurrency.

Response Fields

Name Description
booking
Booking

The booking that was cancelled.

errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
POST /v2/bookings/{booking_id}/cancel
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/bookings/zkras0xv0xwswx/cancel \
  -X POST \
  -H 'Square-Version: 2021-05-13' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "booking_version": 1
  }'
Response JSON
{
  "booking": {
    "id": "zkras0xv0xwswx",
    "version": 1,
    "status": "CANCELLED_BY_CUSTOMER",
    "created_at": "2020-10-28T15:47:41Z",
    "updated_at": "2020-10-28T15:49:25Z",
    "location_id": "LEQHH0YY8B42M",
    "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M",
    "customer_note": "",
    "seller_note": "",
    "start_at": "2020-11-26T13:00:00Z",
    "appointment_segments": [
      {
        "duration_minutes": 60,
        "service_variation_id": "RU3PBTZTK7DXZDQFCJHOK2MC",
        "team_member_id": "TMXUrsBWWcHTt79t",
        "service_variation_version": 1599775456731
      }
    ]
  },
  "errors": []
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?