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

You are viewing an old version of the API
Update booking

PUT /v2/bookings/{booking_id}

Updates a booking.

To call this endpoint with buyer-level permissions, set APPOINTMENTS_WRITE for the OAuth scope. To call this endpoint with seller-level permissions, set APPOINTMENTS_ALL_WRITE and APPOINTMENTS_WRITE for the OAuth scope.

For calls to this endpoint with seller-level permissions to succeed, the seller must have subscribed to Appointments Plus or Appointments Premium.


Permissions
APPOINTMENTS_WRITE
Try in API Explorer
Name Description
booking_id
string

Required

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

Name Description
idempotency_key
string

A unique key to make this request an idempotent operation.

Max Length 255
booking
Booking

Required

The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking.

Response Fields

Name Description
booking
Booking

The booking that was updated.

errors
Error [ ]

Errors that occurred during the request.

Examples

You are viewing an old version of the API
PUT /v2/bookings/{booking_id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/bookings/zkras0xv0xwswx \
  -X PUT \
  -H 'Square-Version: 2022-11-16' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "booking": {
      "version": 1,
      "customer_note": "I would like to sit near the window please"
    }
  }'
Response JSON
{
  "booking": {
    "id": "zkras0xv0xwswx",
    "version": 2,
    "status": "ACCEPTED",
    "created_at": "2020-10-28T15:47:41Z",
    "updated_at": "2020-10-28T15:49:25Z",
    "location_id": "LEQHH0YY8B42M",
    "customer_id": "EX2QSVGTZN4K1E5QE1CBFNVQ8M",
    "customer_note": "I would like to sit near the window please",
    "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": []
}