Ajax filtering

Guide to the parameters you can use for the ajax filter

Support-billede
By Morten Vadskær
more than 2 weeks ago
Approx. {eight} minutes

On all shops there is an /ajax that returns the shop's products. The page takes the following GET arguments to filter the result:

price_range=100|1000

Price range of the products.

categories=1|2|3

List of categories the products should be in.

exclude=0

0 or 1 depending on whether you want to exclude products that are not in the categories

sort

The field to sort on. The options are popular, weight, name or price.

sort_order

The sort order. Asc or desc can be used.

limit

How many products you want to retrieve.

offset

Offset in relation to the above.

attribute_values=1|2|3

IDs of the attribute values the products should have.

suppliers=1|2|3

IDs of the suppliers you want to get products from.

landing_pages=1|2|3

IDs of the landing pages the products should be in.

brands=1|2|3

The IDs of the brands the products should have.

attribute_tags_in_stock=a|b|c

Tags of attribute values the products should have and be stocked in.

attribute_tags

Same as above but without stock requirements.

attribute_tag

Same as above but with only one argument.

attribute

Same as above but with only one argument and based on the ID.

force_categories=1|2|3

Force the products to be in the categories.

atags=female,black|white

Filtering on attribute value tags. Comma is read as and and pipe as or. The above returns products where the attribute value is tagged with female and (black or white).

product_ids=123|456

List of product IDs.

pretty=1

If you want nicely formatted json.

only_in_stock_variants=1|0

Specifies whether variant_stock should only contain variants that are in stock.

include_meta=1|0

Adds an extra level to the response, where the products are now in the product element and the meta element is added, which contains information on how to further narrow down the filtering. The meta element only contains what the response contains. The fields returned are categories, attributes and brands.

meta=foo|bar

Specifies which additional fields to return

meta=_all

Specifies that all extra fields should be returned

This website uses cookies.

We use cookies to personalize content and ads, provide social media features, and analyze our web traffic.

Information about your use of our website is also shared with our partners within social media, advertising, and analysis, who may combine them with other data from your interactions with their services.

Read more about our cookies