v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
BookingCustomAttributes

RetrieveBookingCustomAttributeDefinition

Retrieves a bookings custom attribute definition.

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.

get/v2/bookings/custom-attribute-definitions/{key}

Path parameters

keystring required

The key of the custom attribute definition to retrieve. If the requesting application is not the definition owner, you must use the qualified key.

Query parameters

versioninteger

The current version of the custom attribute definition, 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.

Response

Success

Example response

{
  "custom_attribute_definition": {
    "created_at": "2022-11-16T15:27:30Z",
    "description": "The favorite shampoo of the customer.",
    "key": "favoriteShampoo",
    "name": "Favorite shampoo",
    "schema": {
      "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String"
    },
    "updated_at": "2022-11-16T15:27:30Z",
    "version": 1,
    "visibility": "VISIBILITY_READ_WRITE_VALUES"
  },
  "errors": []
}