---
title: "Get delivery settings"
description: "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 t"
url: https://docs.stoqapp.com/v2-reference/back-in-stock-settings/get-delivery-settings/
api: "API v2 reference"
method: GET
path: "/back_in_stock/settings/delivery"
---

# Get delivery settings

`GET https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery`

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.

**Note:** `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`](https://docs.stoqapp.com/v2-reference/back-in-stock-settings/update-delivery-settings/), where the two id lists replace the stored list.

## Returns

- `batching` (object)
  - `enabled` (boolean): e.g. `true`
  - `mode` (string): e.g. `fixed`
  - `multiplier` (integer): e.g. `100`
  - `batch_size` (integer): e.g. `50`
  - `wait_hours` (integer): e.g. `2`
- `stock_threshold` (integer): e.g. `3`
- `locations` (object)
  - `filter_enabled` (boolean): e.g. `true`
  - `shopify_location_ids` (array of strings)
- `any_variant` (object)
  - `enabled` (boolean): e.g. `true`
  - `all_products` (boolean): e.g. `false`
  - `shopify_product_ids` (array of strings)
  - `products` (array of objects)
    - `shopify_product_id` (string): e.g. `gid://shopify/Product/8784906035384`
    - `title` (string): e.g. `Trail Shoe`
  - `note` (string)
- `send_while_password_protected` (boolean): e.g. `false`
- `alert_on_publish` (boolean): e.g. `true`

Rate limit: this call costs 1 point ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Example request

```sh
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/settings/delivery" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: example response shown.

```json
{
  "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
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

