Update Selling Policy

Queue a bulk update of inventory policy for multiple variants

post

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 · enumRequired

The inventory policy to set for the variants

Possible values:
Responses
200
Inventory policy update has been queued successfully
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