<- Booking Custom Attributes API

Booking Custom Attributes API

Retrieve booking custom attribute

GET

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

Retrieves a bookings custom attribute.

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

Permissions:APPOINTMENTS_READ
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 retrieve. 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

Query parameters

Link to section

with_definition

boolean

Indicates whether to return the custom attribute definition in the definition field of the custom attribute. Set this parameter to true to get the name and description of the custom attribute, information about the data type, or other definition details. The default value is false.

Link to section

version

integer(32-bit)

The current version of the custom attribute, which is used for strongly consistent reads to guarantee that you receive the most up-to-date data. When included in the request, Square returns the specified version or a higher version if one exists. If the specified version is higher than the current version, Square returns a BAD_REQUEST error.

Link to section

Response fields

Link to section

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.

Link to section

errors

Any errors that occurred during the request.