Skip to content

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

PATCH
/external/preorders/{id}/update_variant_settings
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.

id
required
string

Selling plan ID

X-Auth-Token
required
string

API key for authentication

Media typeapplication/json
object
shopify_variant_id
required

Shopify variant ID to update settings for

integer
shipping_text

Custom shipping text for this variant. Send null or an empty string to clear the override.

string | null
preorder_max_count

Maximum number of preorders allowed for this variant. Send null or an empty string to clear the override.

integer | null

Example

{
"shopify_variant_id": 43900910010503,
"shipping_text": "Ships July 2026",
"preorder_max_count": 100
}

Variant settings updated successfully

Media typeapplication/json
object
success
boolean
message
string
variant
object
shopify_variant_id
integer
shipping_text
string
preorder_max_count
integer

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

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

Unauthorized

Selling plan or variant not found

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

Failed to update variant settings

Media typeapplication/json
object
error
string
details

List of validation error messages

Array<string>

Example generated

{
"error": "example",
"details": [
"example"
]
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support