Commerce
Subscribe to WooCommerce Back-In-Stock
Capture a WooCommerce storefront back-in-stock request
POST
/
api
/
woocommerce
/
back-in-stock
/
subscribe
Subscribe to WooCommerce Back-In-Stock
curl --request POST \
--url https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeUrl": "<string>",
"companyId": "<string>",
"email": "<string>",
"providerProductId": "<string>",
"providerVariantId": "<string>",
"productTitle": "<string>",
"variantTitle": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe"
payload = {
"storeUrl": "<string>",
"companyId": "<string>",
"email": "<string>",
"providerProductId": "<string>",
"providerVariantId": "<string>",
"productTitle": "<string>",
"variantTitle": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storeUrl: '<string>',
companyId: '<string>',
email: '<string>',
providerProductId: '<string>',
providerVariantId: '<string>',
productTitle: '<string>',
variantTitle: '<string>'
})
};
fetch('https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'storeUrl' => '<string>',
'companyId' => '<string>',
'email' => '<string>',
'providerProductId' => '<string>',
'providerVariantId' => '<string>',
'productTitle' => '<string>',
'variantTitle' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe"
payload := strings.NewReader("{\n \"storeUrl\": \"<string>\",\n \"companyId\": \"<string>\",\n \"email\": \"<string>\",\n \"providerProductId\": \"<string>\",\n \"providerVariantId\": \"<string>\",\n \"productTitle\": \"<string>\",\n \"variantTitle\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeUrl\": \"<string>\",\n \"companyId\": \"<string>\",\n \"email\": \"<string>\",\n \"providerProductId\": \"<string>\",\n \"providerVariantId\": \"<string>\",\n \"productTitle\": \"<string>\",\n \"variantTitle\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeUrl\": \"<string>\",\n \"companyId\": \"<string>\",\n \"email\": \"<string>\",\n \"providerProductId\": \"<string>\",\n \"providerVariantId\": \"<string>\",\n \"productTitle\": \"<string>\",\n \"variantTitle\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
{
"success": false,
"error": "Invalid request payload",
"details": "email must be valid"
}
{
"success": false,
"error": "Invalid WooCommerce store URL"
}
{
"success": false,
"error": "Invalid storefront origin"
}
{
"success": false,
"error": "WooCommerce store is not connected"
}
{
"success": false,
"error": "WooCommerce store connection is ambiguous"
}
{
"success": false,
"error": "Too many requests"
}
{
"success": false,
"error": "Failed to subscribe for stock alerts"
}
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
string
required
Connected WooCommerce storefront URL, such as
https://store.example.com.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.
string
required
Shopper email address.
string
required
WooCommerce product ID.
string
WooCommerce variation ID. For simple products, omit this field and Sequenzy
uses
providerProductId.string
required
Product title to snapshot on the waitlist row.
string
Variation title to snapshot on the waitlist row.
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
{
"success": true
}
{
"success": false,
"error": "Invalid request payload",
"details": "email must be valid"
}
{
"success": false,
"error": "Invalid WooCommerce store URL"
}
{
"success": false,
"error": "Invalid storefront origin"
}
{
"success": false,
"error": "WooCommerce store is not connected"
}
{
"success": false,
"error": "WooCommerce store connection is ambiguous"
}
{
"success": false,
"error": "Too many requests"
}
{
"success": false,
"error": "Failed to subscribe for stock alerts"
}
⌘I
Subscribe to WooCommerce Back-In-Stock
curl --request POST \
--url https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeUrl": "<string>",
"companyId": "<string>",
"email": "<string>",
"providerProductId": "<string>",
"providerVariantId": "<string>",
"productTitle": "<string>",
"variantTitle": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe"
payload = {
"storeUrl": "<string>",
"companyId": "<string>",
"email": "<string>",
"providerProductId": "<string>",
"providerVariantId": "<string>",
"productTitle": "<string>",
"variantTitle": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storeUrl: '<string>',
companyId: '<string>',
email: '<string>',
providerProductId: '<string>',
providerVariantId: '<string>',
productTitle: '<string>',
variantTitle: '<string>'
})
};
fetch('https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'storeUrl' => '<string>',
'companyId' => '<string>',
'email' => '<string>',
'providerProductId' => '<string>',
'providerVariantId' => '<string>',
'productTitle' => '<string>',
'variantTitle' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe"
payload := strings.NewReader("{\n \"storeUrl\": \"<string>\",\n \"companyId\": \"<string>\",\n \"email\": \"<string>\",\n \"providerProductId\": \"<string>\",\n \"providerVariantId\": \"<string>\",\n \"productTitle\": \"<string>\",\n \"variantTitle\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeUrl\": \"<string>\",\n \"companyId\": \"<string>\",\n \"email\": \"<string>\",\n \"providerProductId\": \"<string>\",\n \"providerVariantId\": \"<string>\",\n \"productTitle\": \"<string>\",\n \"variantTitle\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/woocommerce/back-in-stock/subscribe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeUrl\": \"<string>\",\n \"companyId\": \"<string>\",\n \"email\": \"<string>\",\n \"providerProductId\": \"<string>\",\n \"providerVariantId\": \"<string>\",\n \"productTitle\": \"<string>\",\n \"variantTitle\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
{
"success": false,
"error": "Invalid request payload",
"details": "email must be valid"
}
{
"success": false,
"error": "Invalid WooCommerce store URL"
}
{
"success": false,
"error": "Invalid storefront origin"
}
{
"success": false,
"error": "WooCommerce store is not connected"
}
{
"success": false,
"error": "WooCommerce store connection is ambiguous"
}
{
"success": false,
"error": "Too many requests"
}
{
"success": false,
"error": "Failed to subscribe for stock alerts"
}