Skip to content

Get delivery settings

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/back_in_stock/settings/delivery

Costs 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

  • batchingobject
    Show 5 child attributesHide child attributes
    • enabledboolean
      Example: true
    • modestring
      Example: fixed
    • multiplierinteger
      Example: 100
    • batch_sizeinteger
      Example: 50
    • wait_hoursinteger
      Example: 2
  • stock_thresholdinteger
    Example: 3
  • locationsobject
    Show 2 child attributesHide child attributes
    • filter_enabledboolean
      Example: true
    • shopify_location_idsarray of strings
  • any_variantobject
    Show 5 child attributesHide child attributes
    • enabledboolean
      Example: true
    • all_productsboolean
      Example: false
    • shopify_product_idsarray of strings
    • productsarray of objects
      Show 2 child attributesHide child attributes
      • shopify_product_idstring
        Example: gid://shopify/Product/8784906035384
      • titlestring
        Example: Trail Shoe
    • notestring
  • send_while_password_protectedboolean
    Example: false
  • alert_on_publishboolean
    Example: true

Errors

404
not_found

The path is valid but nothing with that id exists in this store.

422
validation_failed

The 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.

GET/back_in_stock/settings/delivery
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "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
}