Skip to content

Remove multiple product variants from 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

DELETE
/external/preorders/{id}/remove_variant
curl --request DELETE \
--url 'https://app.stoqapp.com/api/v1/external/preorders/example/remove_variant?shopify_variant_ids=1&inventory_policy=CONTINUE' \
--header 'X-Auth-Token: <X-Auth-Token>'

Remove multiple product variants from a selling plan. Optionally, you can also update the inventory policy of the removed variants in the same request to avoid making separate API calls.

When inventory_policy is provided, the inventory policy update is performed synchronously (inline) for better performance and to avoid race conditions.

id
required
string

Selling plan ID

X-Auth-Token
required
string

API key for authentication

shopify_variant_ids
required
Array<integer>

Array of Shopify variant IDs to remove

inventory_policy
string
Allowed values: CONTINUE DENY

Optional. Inventory policy to set for the removed variants. CONTINUE allows overselling, DENY prevents it.

Variants removed successfully

Media typeapplication/json
object
success
boolean
message
string
variants_removed

List of variant IDs that were removed

Array<integer>
inventory_policy_updated

Whether the inventory policy was successfully updated (only present when inventory_policy is provided)

boolean
inventory_policy

The inventory policy that was set (only present when inventory_policy_updated is true)

string
Allowed values: CONTINUE DENY

Example

{
"success": true,
"message": "1 variant removed",
"variants_removed": [
43900910010503
],
"inventory_policy_updated": true,
"inventory_policy": "DENY"
}

Bad request - missing or invalid parameters

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

Unauthorized

Selling plan or variants not found

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

Failed to remove variants or invalid inventory policy

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support