Skip to content

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

PATCH/external/preorders/{id}/update_variant_settings

Costs 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

  • idstringRequired

    Selling plan ID

Headers

  • X-Auth-TokenstringRequired

    API key for authentication

Request body

  • shopify_variant_idintegerRequired

    Shopify variant ID to update settings for

  • shipping_textstring, nullable

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

  • preorder_max_countinteger, nullable

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

Returns

  • successboolean
    Example: true
  • messagestring
    Example: Variant settings updated
  • variantobject
    Show 3 child attributesHide child attributes
    • shopify_variant_idinteger
      Example: 43900910010503
    • shipping_textstring
      Example: Ships July 2026
    • preorder_max_countinteger
      Example: 100

Errors

400

Bad request - missing required parameters or no settings to update

401

Unauthorized

404

Selling plan or variant not found

422

Failed to update variant settings

PATCH/external/preorders/{id}/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
  }'
Response
{
  "success": true,
  "message": "Variant settings updated",
  "variant": {
    "shopify_variant_id": 43900910010503,
    "shipping_text": "Ships July 2026",
    "preorder_max_count": 100
  }
}