<- Booking Custom Attributes API

Booking Custom Attributes API

All versions ->

Create booking custom attribute definition

POST

 /v2/bookings/custom-attribute-definitions

Creates a bookings custom attribute definition.

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

Request body

Example code

Link to section

custom_attribute_definition

Required

The custom attribute definition to create, with the following fields:

  • key

  • name. If provided, name must be unique (case-sensitive) across all visible booking-related custom attribute definitions for the seller.

  • description

  • visibility. Note that all custom attributes are visible in exported booking data, including those set to VISIBILITY_HIDDEN.

  • schema. With the exception of the Selection data type, the schema is specified as a simple URL to the JSON schema definition hosted on the Square CDN. For more information, see Specifying the schema.

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_definition

The newly created custom attribute definition.

Link to section

errors

Any errors that occurred during the request.