<- Object

Object

CatalogCustomAttributeDefinition

Contains information defining a custom attribute.

Custom attributes are intended to store additional information about a catalog object or to associate a catalog object with an entity in another system. Do not use custom attributes to store any sensitive information (personally identifiable information, card details, etc.). Read more about custom attributes

Link to section

Properties

Link to section

type

string

Required

The type of this custom attribute. Cannot be modified after creation. Required.

Link to section

name

string

Required

The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation.

Link to section

description

string

Seller-oriented description of the meaning of this Custom Attribute, any constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs.

Link to section

source_application

Read only. Contains information about the application that created this custom attribute definition.

Link to section

allowed_object_types

string [ ]

Required

The set of CatalogObject types that this custom atttribute may be applied to. Currently, only ITEM, ITEM_VARIATION, MODIFIER, MODIFIER_LIST, and CATEGORY are allowed. At least one type must be included.

Link to section

seller_visibility

string

The visibility of a custom attribute in seller-facing UIs (including Square Point of Sale applications and Square Dashboard). May be modified.

Link to section

app_visibility

string

The visibility of a custom attribute to applications other than the application that created the attribute.

Link to section

string_config

Optionally, populated when type = STRING, unset otherwise.

Link to section

number_config

Optionally, populated when type = NUMBER, unset otherwise.

Link to section

selection_config

Populated when type is set to SELECTION, unset otherwise.

Link to section

custom_attribute_usage_count

integer(32-bit)

Read only The number of custom attributes that reference this custom attribute definition. Set by the server in response to a ListCatalog request with include_counts set to true. If the actual count is greater than 100, custom_attribute_usage_count will be set to 100.

Link to section

key

string

The name of the desired custom attribute key that can be used to access the custom attribute value on catalog objects. Cannot be modified after the custom attribute definition has been created. Must be between 1 and 60 characters, and may only contain the characters [a-zA-Z0-9_-].