LocationCustomAttributes
CreateLocationCustomAttributeDefinition
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.
post/v2/locations/custom-attribute-definitions
Request body
Example request
{
"custom_attribute_definition": {
"description": "Bestselling item at location",
"key": "bestseller",
"name": "Bestseller",
"schema": {
"$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String"
},
"visibility": "VISIBILITY_READ_WRITE_VALUES"
}
}Response
Success
Example response
{
"custom_attribute_definition": {
"created_at": "2022-12-02T19:06:36.559Z",
"description": "Bestselling item at location",
"key": "bestseller",
"name": "Bestseller",
"schema": {
"$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String"
},
"updated_at": "2022-12-02T19:06:36.559Z",
"version": 1,
"visibility": "VISIBILITY_READ_WRITE_VALUES"
}
}