Skip to main content
GET
Spree Admin SDK

Filters

Filter with q[<attribute>_<predicate>]=value, for example q[name_cont]=…. Send a list as q[<attribute>_in][]=a&q[<attribute>_in][]=b. How filters work.
Prefix an associated record’s attribute with the association, as in q[categories_id_eq]. The same predicates apply.
Also filters and sorts on the store’s searchable custom fields, as q[cf_<namespace>_<key>_<predicate>] and sort=cf_<namespace>_<key>. Sort by: available_on, best_selling, created_at, description, discontinue_on, id, manual, name, price, seller_id, slug, status, updated_at. Prefix a field with - to sort descending.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Query Parameters

Matches product name or variant SKU (partial, case-insensitive), and the store's searchable custom fields.

q[ascend_by_price]
boolean

Set to true to apply ascend_by_price.

q[descend_by_price]
boolean

Set to true to apply descend_by_price.

q[in_categories][]
string[]

Applies in_categories to the given value.

q[in_category]
string

Applies in_category to the given value.

q[in_collection]
string

Applies in_collection to the given value.

q[in_stock]
boolean

Set to true to apply in_stock.

q[in_taxon]
string

Applies in_taxon to the given value.

q[not_discontinued]
boolean

Set to true to apply not_discontinued.

q[out_of_stock]
boolean

Set to true to apply out_of_stock.

q[price_between][]
number[]

Applies price_between to the given value.

Required array length: 2 elements
q[price_gte]
number

Applies price_gte to the given value.

q[price_lte]
number

Applies price_lte to the given value.

q[search_by_name]
string

Applies search_by_name to the given value.

q[with_option_value_ids][]
string[]

Applies with_option_value_ids to the given value.

page
integer

Page number

limit
integer

Number of records per page

sort
string

Sort field (e.g., name, -name, price, -price, best_selling)

expand
string

Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).

fields
string

Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.

q
object

Attribute filters, as q[<attribute>_<predicate>]=value. See Filters above for the list.

Response

products found

data
object[]
required
meta
object
required