Update Selling Policy
Queues a background job to update the inventory policy for multiple variants. The operation is performed asynchronously to handle large numbers of variants efficiently. Updates are processed in batches of up to 1000 variants to stay within message size limits.
Authorizations
Path parameters
idstringRequired
Selling plan ID
Header parameters
X-Auth-TokenstringRequired
API key for authentication
Body
shopify_variant_idsinteger[]Required
Array of Shopify variant IDs to update
inventory_policystring · enumRequiredPossible values:
The inventory policy to set for the variants
Responses
200
Inventory policy update has been queued successfully
application/json
400
Bad request - missing or invalid parameters
application/json
401
Unauthorized
404
Selling plan not found
application/json
422
Invalid inventory policy
application/json
post
POST /api/v1/external/preorders/{id}/bulk_toggle_inventory_policy HTTP/1.1
Host: app.stoqapp.com
X-Auth-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"shopify_variant_ids": [
1
],
"inventory_policy": "CONTINUE"
}
{
"success": true,
"message": "Inventory policy update has been queued",
"variants_queued": [
1
]
}
Last updated