Note: This model is in beta.
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
Name | Type | Description | Notes |
---|---|---|---|
type | String | The type of this custom attribute. Cannot be modified after creation. Required. See CatalogCustomAttributeDefinitionType for possible values | |
name | String | The name of this definition for API and seller-facing UI purposes. The name must be unique within the (merchant, application_id) pair. Required. May not be empty and may not exceed 255 characters. Can be modified after creation. | |
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. | [optional] |
source_application | SourceApplication | Read only. Contains information about the application that created this custom attribute definition. | [optional] |
allowed_object_types | [String] | The set of Catalog Object Types that this Custom Attribute may be applied to. Currently, only `ITEM` and `ITEM_VARIATION` are allowed. See CatalogObjectType for possible values | [optional] |
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. See CatalogCustomAttributeDefinitionSellerVisibility for possible values | [optional] |
app_visibility | String | The visibility of a custom attribute to applications other than the application that created the attribute. See CatalogCustomAttributeDefinitionAppVisibility for possible values | [optional] |
string_config | CatalogCustomAttributeDefinitionStringConfig | Optionally, populated when `type` = `STRING`, unset otherwise. | [optional] |
selection_config | CatalogCustomAttributeDefinitionSelectionConfig | Populated when `type` is set to `SELECTION`, unset otherwise. | [optional] |
custom_attribute_usage_count | Number | 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`. | [optional] |
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. | [optional] |