Update variant-specific settings for a selling plan
LegacyAPI v1 is the older API. It still works and is supported, but new integrations should use API v2. Migrating from v1 to v2
const url = 'https://app.stoqapp.com/api/v1/external/preorders/example/update_variant_settings';const options = { method: 'PATCH', headers: {'X-Auth-Token': '<X-Auth-Token>', 'Content-Type': 'application/json'}, body: '{"shopify_variant_id":43900910010503,"shipping_text":"Ships July 2026","preorder_max_count":100}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.stoqapp.com/api/v1/external/preorders/example/update_variant_settings \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: <X-Auth-Token>' \ --data '{ "shopify_variant_id": 43900910010503, "shipping_text": "Ships July 2026", "preorder_max_count": 100 }'Update per-variant preorder settings within a selling plan, such as the variant’s custom shipping_text and preorder_max_count (the cap on preorder units). Identify the variant with shopify_variant_id; only the settings you include are changed. Returns the updated variant settings.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Selling plan ID
Header Parameters
Section titled “Header Parameters”API key for authentication
Request Bodyrequired
Section titled “Request Bodyrequired”object
Shopify variant ID to update settings for
Custom shipping text for this variant. Send null or an empty string to clear the override.
Maximum number of preorders allowed for this variant. Send null or an empty string to clear the override.
Example
{ "shopify_variant_id": 43900910010503, "shipping_text": "Ships July 2026", "preorder_max_count": 100}Responses
Section titled “Responses”Variant settings updated successfully
object
object
Example
{ "success": true, "message": "Variant settings updated", "variant": { "shopify_variant_id": 43900910010503, "shipping_text": "Ships July 2026", "preorder_max_count": 100 }}Bad request - missing required parameters or no settings to update
object
Example generated
{ "error": "example"}Unauthorized
Selling plan or variant not found
object
Example generated
{ "error": "example"}Failed to update variant settings
object
List of validation error messages
Example generated
{ "error": "example", "details": [ "example" ]}Thanks for letting us know.
Still stuck? Ask Quinn or chat with support