<- Booking Custom Attributes API

Booking Custom Attributes API

All versions ->

Upsert booking custom attribute

PUT

 /v2/bookings/{booking_id}/custom-attributes/{key}

Upserts a bookings custom attribute.

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
Link to section

Path parameters

Example code

Link to section

booking_id

string

Required

Link to section

key

string

Required

The key of the custom attribute to create or update. This key must match the key of a custom attribute definition in the Square seller account. If the requesting application is not the definition owner, you must use the qualified key.

Link to section

Request body

Link to section

custom_attribute

Required

The custom attribute to create or update, with the following fields:

  • value. This value must conform to the schema specified by the definition. For more information, see Value data types.

  • version. To enable optimistic concurrency control for an update operation, include this optional field and specify the current version of the custom attribute.

Link to section

idempotency_key

string

A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency.

Link to section

Response fields

Link to section

custom_attribute

The new or updated custom attribute.

Link to section

errors

Any errors that occurred during the request.