By default, the Store API returns only the primary resource attributes to keep responses fast and lightweight. Use the expand parameter to expand related resources inline.
Including Relations
Pass a comma-separated list of relation names via the expand query parameter:
Without expand, relation fields are omitted from the response:
With ?expand=variants,media, the related resources are embedded:
Available Relations by Resource
Products
| Relation | Description |
|---|
variants | All purchasable variants |
default_variant | The default variant |
media | All product media (images and videos across all variants) |
primary_media | The main product image |
option_types | Option types (e.g., Size, Color) |
categories | Categories this product belongs to |
custom_fields | Public custom fields (structured metadata) |
prior_price | Previous price history (for showing strikethrough) |
Categories
| Relation | Description |
|---|
parent | Parent category |
ancestors | All ancestor categories (for breadcrumbs) |
children | Direct child categories |
custom_fields | Public custom fields (structured metadata) |
Countries
| Relation | Description |
|---|
states | States/provinces within the country |
Collections with Includes
The expand parameter also works on collection endpoints:
Nested Includes
Use dot notation to include nested relations:
Only include relations you actually need. Each included relation requires additional database queries, so requesting unnecessary relations will slow down the response.