OnlineStoreRules

Object

The OnlineStoreRules object defines purchase condition rules for variants when using the "number" display style in online stores. These rules control how customers can purchase measured products.

Fields

FieldTypeDescription
minnumber (optional)Minimum quantity that can be purchased. If not specified, there is no minimum requirement.
incrementnumber (optional)Quantity increment step. Customers can only purchase quantities in multiples of this value. If not specified, customers can purchase any quantity above the minimum.
maxnumber (optional)Maximum quantity that can be purchased. If not specified, there is no maximum limit.
defaultValuenumber (optional)Default quantity value displayed to customers when the product page loads. If not specified, the minimum value (or 0 if no minimum) is used.
Usage: This object is only applicable when the variant's displayStyle is set to "number". When using "pills" or "dropdown" display styles, the presets array should be used instead.
Related: This object is nested within settings.onlineStore.rules in the Variant object. See the Get product with variants and Get specific variant endpoints.