> For the complete documentation index, see [llms.txt](https://docs.commercelayer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.commercelayer.io/core-api-reference/stock_locations.md).

# Stock locations

The stock location object and the allowed CRUD operations on the related resource endpoint

Stock locations contain the inventory of the [SKUs](/core-api-reference/skus.md) that are being sold in terms of [stock items](/core-api-reference/stock_items.md) and their quantity. The stock location's address is the "From" address on the shipping labels.

The list of [inventory stock locations](/core-api-reference/inventory_stock_locations.md) determines the availability of SKUs that are being purchased. The list of [inventory return locations](/core-api-reference/inventory_return_locations.md) determines the available options for returns.

Based on the selected inventory model strategy [stock transfers](/core-api-reference/stock_transfers.md) might be created from a stock location (i.e. secondary) from another (i.e. primary).

You can optionally define a custom alphanumeric (case-sensitive) `code` for your stock locations, provided that it's unique across the environment (it can contain underscore and hyphens, spaces are not allowed , the maximum length is **25** characters).

<details>

<summary>Data model</summary>

Check the related [ER diagram](/data-model/inventory-management/stock-locations.md) and explore the flowchart that illustrates how the stock location resource relates to the other API entities.

</details>

<details>

<summary>How-to</summary>

Check the related [guide](/how-tos/inventory/strategies.md) to learn more about the available inventory model strategies, how they work, and how stock locations are involved in the process.

</details>


---

# 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.commercelayer.io/core-api-reference/stock_locations.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.
