> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Subscribe to WooCommerce Back-In-Stock

> Capture a WooCommerce storefront back-in-stock request

You can capture a shopper's back-in-stock request from a WooCommerce storefront. The store must already be connected to Sequenzy, and the request must come from that storefront origin.

## Request

<ParamField body="storeUrl" type="string" required>
  Connected WooCommerce storefront URL, such as `https://store.example.com`.
</ParamField>

<ParamField body="companyId" type="string">
  Sequenzy company ID. Use this when the same storefront URL could match more
  than one active connection, or when the storefront URL differs from the
  connected WooCommerce site URL.
</ParamField>

<ParamField body="email" type="string" required>
  Shopper email address.
</ParamField>

<ParamField body="providerProductId" type="string" required>
  WooCommerce product ID.
</ParamField>

<ParamField body="providerVariantId" type="string">
  WooCommerce variation ID. For simple products, omit this field and Sequenzy
  uses `providerProductId`.
</ParamField>

<ParamField body="productTitle" type="string" required>
  Product title to snapshot on the waitlist row.
</ParamField>

<ParamField body="variantTitle" type="string">
  Variation title to snapshot on the waitlist row.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe" \
  -H "Content-Type: application/json" \
  -H "Origin: https://store.example.com" \
  -d '{
    "storeUrl": "https://store.example.com",
    "email": "buyer@example.com",
    "providerProductId": "501",
    "providerVariantId": "777",
    "productTitle": "Coffee Refill Pack",
    "variantTitle": "1kg"
  }'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Invalid request payload",
    "details": "email must be valid"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Invalid WooCommerce store URL"
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "Invalid storefront origin"
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "WooCommerce store is not connected"
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": "WooCommerce store connection is ambiguous"
  }
  ```

  ```json 429 theme={null}
  {
    "success": false,
    "error": "Too many requests"
  }
  ```

  ```json 500 theme={null}
  {
    "success": false,
    "error": "Failed to subscribe for stock alerts"
  }
  ```
</ResponseExample>
