# Stock locations

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](https://docs.commercelayer.io/developers/v/how-tos/inventory-model-strategies) to learn more about the available inventory model strategies, how they work, and how stock locations are involved in the process.

</details>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/core-api-reference/stock_locations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
