Update variant-specific settings for a selling plan
API v1 is the older API. It still works, but new integrations should use API v2. Migrating from v1 to v2
/external/preorders/{id}/update_variant_settingsCosts 2 rate-limit points · Rate limits
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.
Path parameters
idstringRequiredSelling plan ID
Headers
X-Auth-TokenstringRequiredAPI key for authentication
Request body
shopify_variant_idintegerRequiredShopify variant ID to update settings for
shipping_textstring, nullableCustom shipping text for this variant. Send null or an empty string to clear the override.
preorder_max_countinteger, nullableMaximum number of preorders allowed for this variant. Send null or an empty string to clear the override.
Returns
successbooleanExample:truemessagestringExample:Variant settings updatedvariantobjectShow 3 child attributesHide child attributes
shopify_variant_idintegerExample:43900910010503shipping_textstringExample:Ships July 2026preorder_max_countintegerExample:100
Errors
Bad request - missing required parameters or no settings to update
Unauthorized
Selling plan or variant not found
Failed to update variant settings
curl -X PATCH "https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/update_variant_settings" \
-H "X-Auth-Token: $STOQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"shopify_variant_id": 43900910010503,
"shipping_text": "Ships July 2026",
"preorder_max_count": 100
}'const res = await fetch("https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/update_variant_settings", {
method: "PATCH",
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"shopify_variant_id": 43900910010503,
"shipping_text": "Ships July 2026",
"preorder_max_count": 100
}),
});
const data = await res.json();import os
import requests
res = requests.patch(
"https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/update_variant_settings",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
json={
"shopify_variant_id": 43900910010503,
"shipping_text": "Ships July 2026",
"preorder_max_count": 100
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/update_variant_settings")
req = Net::HTTP::Patch.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"], "Content-Type" => "application/json")
req.body = {
shopify_variant_id: 43900910010503,
shipping_text: "Ships July 2026",
preorder_max_count: 100
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"success": true,
"message": "Variant settings updated",
"variant": {
"shopify_variant_id": 43900910010503,
"shipping_text": "Ships July 2026",
"preorder_max_count": 100
}
}