Update Variant
/admin/variants/{variantId}/updateTurns 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.
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})$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
0 <= value <= 31536000000000 <= value <= 1000000Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/admin/variants/string/update" \ -H "Content-Type: application/json" \ -d '{ "validForMs": 0, "maxUses": 0, "keySource": { "_tag": "generated" } }'{ "outcome": "created"}