Create location custom attribute definitionBeta
POST
/v2/locations/custom-attribute-definitions
Creates a location-related custom attribute definition for a Square seller account.
Use this endpoint to define a custom attribute that can be associated with locations.
A custom attribute definition specifies the key
, visibility
, schema
, and other properties
for a custom attribute. After the definition is created, you can call
UpsertLocationCustomAttribute or
BulkUpsertLocationCustomAttributes
to set the custom attribute for locations.
Permissions:MERCHANT_PROFILE_WRITE
Request body
Example code
The custom attribute definition to create. Note the following:
- With the exception of the
Selection
data type, theschema
is specified as a simple URL to the JSON schema definition hosted on the Square CDN. For more information, including supported values and constraints, see Supported data types. name
is required unlessvisibility
is set toVISIBILITY_HIDDEN
.
A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency.