Skip to main content
A JSON-encoded object used by Supercycle’s cart validation to enforce rules at checkout. Multiple validations are merged into a single object — only the relevant keys will be present for a given line item.
Example
{
  "membership": { "credits": 5 },
  "required_variant": { "id": 987654, "per_line": 1 },
  "quantity": { "max": 3 },
  "uniformity": { "key": "rental_start", "value": "2025-01-01" }
}

Validations

membership
object
Validates that the customer has enough membership credits to complete the rental.
required_variant
object
Validates that a specific variant (e.g. a deposit) is present in the cart alongside this line item.
quantity
object
Validates that the quantity of this line item does not exceed available inventory.
uniformity
object
Validates that all rental line items in the cart share the same value for a given property. Used to prevent mixing incompatible options (e.g. different rental start dates).