Get Variant
/admin/variants/{variantId}Path Parameters
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/admin/variants/string"{ "validForMs": 0, "maxUses": 0, "licensesGenerated": 0, "keySource": { "_tag": "generated" }}Disable Variant POST
Turns license keys off for a product variant: its later buyers get no key. It deletes the variant's terms and its unsold supplied keys for good, and turning keys on again does not bring them back. Licenses already sold keep working with their own terms.
Update Variant PUT
Turns license keys on for a product variant, or sets the terms of its licenses. validForMs is how long a license lasts from its sale, in milliseconds, and 0 means it never expires; maxUses is how many times its key may be activated, and 0 means unlimited. Licenses already sold keep the terms they were sold with. A "generated" keySource makes a key for each sale; a "supplied" one sells its keys, and either replaces the variant's unsold keys, so saving "generated" drops them. You never see those keys: the form keeps them, whereas with "review": "approval" this payload runs as it is and replaces them, so use the form for a variant whose keys the store supplies.
