For a text-based modifier, this encapsulates the modifier's text when its modifier_type
is TEXT
.
For example, to sell T-shirts with custom prints, a text-based modifier can be used to capture the buyer-supplied
text string to be selected for the T-shirt at the time of sale.
For non text-based modifiers, this encapsulates a non-empty list of modifiers applicable to items
at the time of sale. Each element of the modifier list is a CatalogObject
instance of the MODIFIER
type.
For example, a "Condiments" modifier list applicable to a "Hot Dog" item
may contain "Ketchup", "Mustard", and "Relish" modifiers.
A non text-based modifier can be applied to the modified item once or multiple times, if the selection_type
field
is set to SINGLE
or MULTIPLE
, respectively. On the other hand, a text-based modifier can be applied to the item
only once and the selection_type
field is always set to SINGLE
.
Catalog Modifier List
Name | Type | Tags | Description |
---|---|---|---|
name |
str |
Optional | The name of the CatalogModifierList instance. This is a searchable attribute for use in applicable query filters, and its value length is ofUnicode code points. Constraints: Maximum Length: 255 |
ordinal |
int |
Optional | The position of this CatalogModifierList within a list of CatalogModifierList instances. |
selection_type |
str (Catalog Modifier List Selection Type) |
Optional | Indicates whether a CatalogModifierList supports multiple selections. |
modifiers |
List Catalog Object |
Optional | A non-empty list of CatalogModifier objects to be included in the CatalogModifierList ,for non text-based modifiers when the modifier_type attribute is LIST . Each element of this listis a CatalogObject instance of the MODIFIER type, containing the following attributes:<br>{<br>"id": "{{catalog_modifier_id}}",<br>"type": "MODIFIER", <br>"modifier_data": {{a CatalogModifier instance>}} <br>}<br> |
image_ids |
List[str] |
Optional | The IDs of images associated with this CatalogModifierList instance.Currently these images are not displayed on Square products, but may be displayed in 3rd-party applications. |
modifier_type |
str (Catalog Modifier List Modifier Type) |
Optional | Defines the type of CatalogModifierList . |
max_length |
int |
Optional | The maximum length, in Unicode points, of the text string of the text-based modifier as represented by this CatalogModifierList object with the modifier_type set to TEXT . |
text_required |
bool |
Optional | Whether the text string must be a non-empty string (true ) or not (false ) for a text-based modifieras represented by this CatalogModifierList object with the modifier_type set to TEXT . |
internal_name |
str |
Optional | A note for internal use by the business. For example, for a text-based modifier applied to a T-shirt item, if the buyer-supplied text of "Hello, Kitty!" is to be printed on the T-shirt, this internal_name attribute can be "Use italic face" asan instruction for the business to follow. For non text-based modifiers, this internal_name attribute can beused to include SKUs, internal codes, or supplemental descriptions for internal use. Constraints: Maximum Length: 512 |
{
"name": "name4",
"ordinal": 226,
"selection_type": "SINGLE",
"modifiers": [
{
"type": "TAX",
"id": "id4",
"updated_at": "updated_at0",
"version": 210,
"is_deleted": false,
"custom_attribute_values": {
"key0": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
},
"key1": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
},
"key2": {
"name": "name8",
"string_value": "string_value2",
"custom_attribute_definition_id": "custom_attribute_definition_id4",
"type": "STRING",
"number_value": "number_value8"
}
},
"catalog_v1_ids": [
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
},
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
},
{
"catalog_v1_id": "catalog_v1_id4",
"location_id": "location_id4"
}
]
}
],
"image_ids": [
"image_ids9"
]
}