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.
| Field | Type | Description |
|---|---|---|
min | number (optional) | Minimum quantity that can be purchased. If not specified, there is no minimum requirement. |
increment | number (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. |
max | number (optional) | Maximum quantity that can be purchased. If not specified, there is no maximum limit. |
defaultValue | number (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. |
displayStyle is set to "number". When using "pills" or "dropdown" display styles, the presets array should be used instead.settings.onlineStore.rules in the Variant object. See the Get product with variants and Get specific variant endpoints.