Skip to main content

Products

List Products

Filtering Products

Use flat param keys — the SDK wraps them in q[...] automatically:

Sorting Products

Pass sort with one of the supported values. Prefix with - for descending order:

Field Selection

Request only specific fields to reduce payload size:
id is always included. Omit fields to return all fields.

Nested Expand

Use dot notation to expand nested associations (up to 4 levels):

Get a Product

Fetch a single product by slug or prefix ID:

Prior Price (EU Omnibus Directive)

When a product is on sale, EU regulations require displaying the lowest price in the last 30 days. Use the prior_price expand to fetch this:
Prior price is only relevant on product detail pages (PDP), not on listings. It returns null if no price history exists within the 30-day window. Price history tracking can be disabled globally via Spree::Config[:track_price_history] = false.

Product Filters

Get available filters (price range, availability, options, categories) and sort options for building filter UIs:

Categories

List Categories

Get a Category

Fetch by ID or permalink:

List Products in a Category

Geography