> For the complete documentation index, see [llms.txt](https://docs.violet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violet.io/prism/merchants/configuration/inventory-location-filters.md).

# Inventory location filters

Inventory location filters choose which Shopify locations count toward whether a merchant's products are in stock.

{% hint style="warning" %}
Location filters are only supported for Shopify merchants. Requests for merchants on other platforms return `400 Bad Request`.
{% endhint %}

## How locations affect stock

By default, stock at every Shopify location counts toward whether a product is available.

Adding locations narrows that: once at least one location is added, only the listed locations count and stock anywhere else is ignored. That is usually the intent when some locations are retail floors or returns holding rather than fulfillment.

Remove every location to go back to counting all of them.

## The resource

The filter is a single list of Shopify location IDs on the [inventory location filters resource](/prism/merchants/merchant-configuration-resources.md#inventory-location-filters):

```
PUT /merchants/{merchant_id}/inventory-location-filters
```

```json
{
  "location_ids": ["12345678", "87654321"]
}
```

The `PUT` replaces the full set. To disable filtering, pass an empty list. The response includes `filtering_enabled`, which is read-only and derived: it is `true` whenever at least one location ID is configured, and it is ignored on writes.

{% hint style="warning" %}
Location IDs must be numeric strings, and anything else is rejected. Beyond that, they are not checked against the merchant's Shopify account: an ID with a typo is stored but never matches anything, so it silently has no effect. Copy location IDs from Shopify rather than typing them.
{% endhint %}

## One capability, one write path

Older configuration docs describe the same capability as the `filter_inventory_by_locations` platform feature flag plus `shopify_config.enabled_location_ids`. For Shopify merchants, that flag is now derived automatically from this resource: it turns on when `location_ids` is non-empty and off when the list is empty. Manage location filtering through this resource only, and do not set the flag or `enabled_location_ids` directly.

## Related

* [Merchant Configuration Resources](/prism/merchants/merchant-configuration-resources.md#inventory-location-filters) has the field table and read endpoint.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violet.io/prism/merchants/configuration/inventory-location-filters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
