Skip to content

Square: Booking custom attributes schemas

20 Square schemas with complete fields and constraints.

← Booking custom attributes operations · All schemas

Bulk Delete Booking Custom Attributes — request body — body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) request.
valuesobjectRequired within parentA map containing 1 to 25 individual Delete requests. For each request, provide an
arbitrary ID that is unique for this `BulkDeleteBookingCustomAttributes` request and the
information needed to delete a custom attribute.
Additional keys: see wildcard field
values.*ModelAdditional keysExpand Bulk Delete Booking Custom Attributes — request body — body values value

Referenced models: Bulk Delete Booking Custom Attributes — request body — body values value

Bulk Delete Booking Custom Attributes — request body — body values value

FieldTypePresenceDescription and constraints
$objectRootRepresents an individual delete request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes)
request. An individual request contains a booking ID, the custom attribute to delete, and an optional idempotency key.
booking_idstringRequired within parentThe ID of the target [booking](entity:Booking).
Maximum length: 36
Minimum length: 1
keystringRequired within parentThe key of the custom attribute to delete. 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.
Minimum length: 1

Bulk Delete Booking Custom Attributes — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) response,
which contains a map of responses that each corresponds to an individual delete request.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
valuesobjectOptionalA map of responses that correspond to individual delete requests. Each response has the
same ID as the corresponding request and contains `booking_id` and `errors` field.
Additional keys: see wildcard field
values.*ModelAdditional keysExpand Bulk Delete Booking Custom Attributes — response body — values value

Referenced models: Bulk Delete Booking Custom Attributes — response body — values value, Get Shift — response body — errors item

Bulk Delete Booking Custom Attributes — response body — values value

FieldTypePresenceDescription and constraints
$objectRootRepresents a response for an individual upsert request in a [BulkDeleteBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkDeleteBookingCustomAttributes) operation.
booking_idstringOptionalThe ID of the [booking](entity:Booking) associated with the custom attribute.
errorsarrayOptionalAny errors that occurred while processing the individual request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Shift — response body — errors item

Bulk Upsert Booking Custom Attributes — request body — body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) request.
valuesobjectRequired within parentA map containing 1 to 25 individual upsert requests. For each request, provide an
arbitrary ID that is unique for this `BulkUpsertBookingCustomAttributes` request and the
information needed to create or update a custom attribute.
Additional keys: see wildcard field
values.*ModelAdditional keysExpand Bulk Upsert Booking Custom Attributes — request body — body values value

Referenced models: Bulk Upsert Booking Custom Attributes — request body — body values value

Bulk Upsert Booking Custom Attributes — request body — body values value

FieldTypePresenceDescription and constraints
$objectRootRepresents an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes)
request. An individual request contains a booking ID, the custom attribute to create or update,
and an optional idempotency key.
booking_idstringRequired within parentThe ID of the target [booking](entity:Booking).
Maximum length: 36
Minimum length: 1
custom_attributeModelRequired within parentExpand Upsert Order Custom Attribute — request body — body custom attribute
The custom attribute to create or update, with following fields:

- `key`. 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 provide the qualified key.

- `value`. This value must conform to the `schema` specified by the definition.
For more information, see [Value data types](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types).

- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
control for update operations, include this optional field in the request and set the
value to the current version of the custom attribute.
idempotency_keyJSONOptional
idempotency_key (anyOf 1)stringAlternativeA unique identifier for this individual upsert request, used to ensure idempotency.
For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
Maximum length: 45
idempotency_key (anyOf 2)nullAlternative

Referenced models: Upsert Order Custom Attribute — request body — body custom attribute

Bulk Upsert Booking Custom Attributes — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) response,
which contains a map of responses that each corresponds to an individual upsert request.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
valuesobjectOptionalA map of responses that correspond to individual upsert requests. Each response has the
same ID as the corresponding request and contains either a `booking_id` and `custom_attribute` or an `errors` field.
Additional keys: see wildcard field
values.*ModelAdditional keysExpand Bulk Upsert Booking Custom Attributes — response body — values value

Referenced models: Bulk Upsert Booking Custom Attributes — response body — values value, Get Shift — response body — errors item

Bulk Upsert Booking Custom Attributes — response body — values value

FieldTypePresenceDescription and constraints
$objectRootRepresents a response for an individual upsert request in a [BulkUpsertBookingCustomAttributes](api-endpoint:BookingCustomAttributes-BulkUpsertBookingCustomAttributes) operation.
booking_idstringOptionalThe ID of the [booking](entity:Booking) associated with the custom attribute.
custom_attributeModelOptionalExpand Upsert Order Custom Attribute — response body — custom attribute
The new or updated custom attribute.
errorsarrayOptionalAny errors that occurred while processing the individual request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Upsert Order Custom Attribute — response body — custom attribute, Get Shift — response body — errors item

Create Booking Custom Attribute Definition — request body — body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [CreateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-CreateBookingCustomAttributeDefinition) request.
custom_attribute_definitionModelRequired within parentExpand Create Order Custom Attribute Definition — request body — body custom attribute definition
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](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#specify-schema).
idempotency_keystringOptionalA unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
Maximum length: 45

Referenced models: Create Order Custom Attribute Definition — request body — body custom attribute definition

Create Booking Custom Attribute Definition — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [CreateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-CreateBookingCustomAttributeDefinition) response.
Either `custom_attribute_definition` or `errors` is present in the response.
custom_attribute_definitionModelOptionalExpand Create Order Custom Attribute Definition — response body — custom attribute definition
The newly created custom attribute definition.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Order Custom Attribute Definition — response body — custom attribute definition, Get Shift — response body — errors item

Delete Booking Custom Attribute Definition — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [DeleteBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttributeDefinition) response
containing error messages when errors occurred during the request. The successful response does not contain any payload.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Shift — response body — errors item

Delete Booking Custom Attribute — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [DeleteBookingCustomAttribute](api-endpoint:BookingCustomAttributes-DeleteBookingCustomAttribute) response.
Either an empty object `{}` (for a successful deletion) or `errors` is present in the response.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Shift — response body — errors item

List Booking Custom Attribute Definitions — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [ListBookingCustomAttributeDefinitions](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributeDefinitions) response.
Either `custom_attribute_definitions`, an empty object, or `errors` is present in the response.
If additional results are available, the `cursor` field is also present along with `custom_attribute_definitions`.
cursorstringOptionalThe cursor to provide in your next call to this endpoint to retrieve the next page of
results for your original request. This field is present only if the request succeeded and
additional results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
custom_attribute_definitionsarrayOptionalThe retrieved custom attribute definitions. If no custom attribute definitions are found,
Square returns an empty object (`{}`).
custom_attribute_definitions[]ModelEach itemExpand Create Order Custom Attribute Definition — response body — custom attribute definition
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Order Custom Attribute Definition — response body — custom attribute definition, Get Shift — response body — errors item

List Booking Custom Attributes — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [ListBookingCustomAttributes](api-endpoint:BookingCustomAttributes-ListBookingCustomAttributes) response.
Either `custom_attributes`, an empty object, or `errors` is present in the response. If additional
results are available, the `cursor` field is also present along with `custom_attributes`.
cursorstringOptionalThe cursor to use in your next call to this endpoint to retrieve the next page of results
for your original request. This field is present only if the request succeeded and additional
results are available. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
custom_attributesarrayOptionalThe retrieved custom attributes. If `with_definitions` was set to `true` in the request,
the custom attribute definition is returned in the `definition` field of each custom attribute.

If no custom attributes are found, Square returns an empty object (`{}`).
custom_attributes[]ModelEach itemExpand Upsert Order Custom Attribute — response body — custom attribute
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Upsert Order Custom Attribute — response body — custom attribute, Get Shift — response body — errors item

Retrieve Booking Custom Attribute Definition — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [RetrieveBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttributeDefinition) response.
Either `custom_attribute_definition` or `errors` is present in the response.
custom_attribute_definitionModelOptionalExpand Create Order Custom Attribute Definition — response body — custom attribute definition
The retrieved custom attribute definition.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Order Custom Attribute Definition — response body — custom attribute definition, Get Shift — response body — errors item

Retrieve Booking Custom Attribute — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents a [RetrieveBookingCustomAttribute](api-endpoint:BookingCustomAttributes-RetrieveBookingCustomAttribute) response.
Either `custom_attribute_definition` or `errors` is present in the response.
custom_attributeModelOptionalExpand Upsert Order Custom Attribute — response body — custom attribute
The retrieved custom attribute. If `with_definition` was set to `true` in the request,
the custom attribute definition is returned in the `definition` field.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Upsert Order Custom Attribute — response body — custom attribute, Get Shift — response body — errors item

Update Booking Custom Attribute Definition — request body — body

FieldTypePresenceDescription and constraints
$objectRootRepresents an [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) request.
custom_attribute_definitionModelRequired within parentExpand Create Order Custom Attribute Definition — request body — body custom attribute definition
The custom attribute definition that contains the fields to update. Only the following fields can be updated:
- `name`
- `description`
- `visibility`
- `schema` for a `Selection` data type. Only changes to the named options or the maximum number of allowed
selections are supported.

For more information, see
[Updatable definition fields](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields).

To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
control, include the optional `version` field and specify the current version of the custom attribute definition.
idempotency_keyJSONOptional
idempotency_key (anyOf 1)stringAlternativeA unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
Maximum length: 45
idempotency_key (anyOf 2)nullAlternative

Referenced models: Create Order Custom Attribute Definition — request body — body custom attribute definition

Update Booking Custom Attribute Definition — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents an [UpdateBookingCustomAttributeDefinition](api-endpoint:BookingCustomAttributes-UpdateBookingCustomAttributeDefinition) response.
Either `custom_attribute_definition` or `errors` is present in the response.
custom_attribute_definitionModelOptionalExpand Create Order Custom Attribute Definition — response body — custom attribute definition
The updated custom attribute definition.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Order Custom Attribute Definition — response body — custom attribute definition, Get Shift — response body — errors item

Upsert Booking Custom Attribute — request body — body

FieldTypePresenceDescription and constraints
$objectRootRepresents an [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) request.
custom_attributeModelRequired within parentExpand Upsert Order Custom Attribute — request body — body custom attribute
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](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attributes#value-data-types).

- `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency)
control for an update operation, include this optional field and specify the current version
of the custom attribute.
idempotency_keyJSONOptional
idempotency_key (anyOf 1)stringAlternativeA unique identifier for this request, used to ensure idempotency. For more information,
see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
Maximum length: 45
idempotency_key (anyOf 2)nullAlternative

Referenced models: Upsert Order Custom Attribute — request body — body custom attribute

Upsert Booking Custom Attribute — response body

FieldTypePresenceDescription and constraints
$objectRootRepresents an [UpsertBookingCustomAttribute](api-endpoint:BookingCustomAttributes-UpsertBookingCustomAttribute) response.
Either `custom_attribute_definition` or `errors` is present in the response.
custom_attributeModelOptionalExpand Upsert Order Custom Attribute — response body — custom attribute
The new or updated custom attribute.
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Upsert Order Custom Attribute — response body — custom attribute, Get Shift — response body — errors item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.