Get delivery settings
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/back_in_stock/settings/deliveryCosts 1 rate-limit point · Rate limits
Read back-in-stock delivery settings (batching, stock threshold, locations, any-variant, password-protected sending, alerts on publish). any_variant.products names each of any_variant.shopify_product_ids by its Shopify title (products Shopify no longer has are left out). any_variant only decides which restocks alert a signup (any variant of those products, not just the one signed up for); it never limits where the Notify me button shows, and does nothing while any_variant.enabled is false.
batching.multiplier applies while batching.mode is multiplier, and batching.batch_size while it is fixed; both are always returned. stock_threshold is the smallest restock that sends any alert. With send_while_password_protected false, alerts wait while the storefront password is on. any_variant.products is looked up in Shopify on each call. Change these with PATCH /back_in_stock/settings/delivery, where the two id lists replace the stored list.
Also searched asget delivery settingsshow delivery settingsview batchingview stock thresholdview location filterdelivery
Returns
batchingobjectShow 5 child attributesHide child attributes
enabledbooleanExample:truemodestringExample:fixedmultiplierintegerExample:100batch_sizeintegerExample:50wait_hoursintegerExample:2
stock_thresholdintegerExample:3locationsobjectShow 2 child attributesHide child attributes
filter_enabledbooleanExample:trueshopify_location_idsarray of strings
any_variantobjectShow 5 child attributesHide child attributes
enabledbooleanExample:trueall_productsbooleanExample:falseshopify_product_idsarray of stringsproductsarray of objectsShow 2 child attributesHide child attributes
shopify_product_idstringExample:gid://shopify/Product/8784906035384titlestringExample:Trail Shoe
notestring
send_while_password_protectedbooleanExample:falsealert_on_publishbooleanExample:true
Errors
not_foundThe path is valid but nothing with that id exists in this store.
validation_failedThe request failed validation.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"batching": {
"enabled": true,
"mode": "fixed",
"multiplier": 100,
"batch_size": 50,
"wait_hours": 2
},
"stock_threshold": 3,
"locations": {
"filter_enabled": true,
"shopify_location_ids": [
"gid://shopify/Location/71234568281"
]
},
"any_variant": {
"enabled": true,
"all_products": false,
"shopify_product_ids": [
"gid://shopify/Product/8784906035384"
],
"products": [
{
"shopify_product_id": "gid://shopify/Product/8784906035384",
"title": "Trail Shoe"
}
]
},
"send_while_password_protected": false,
"alert_on_publish": true
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}