You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/rest-api/filter.md
+34-34Lines changed: 34 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ When requesting a list of resources via the REST API, you can apply filters to g
7
7
To filter products by one of its properties, you can use the `search` query parameter. The value given to this query parameter should be a valid JSON as shown below.
You can even combine several filters on the same product properties. The example below will get you the products categorized on the Winter Collection category and that are not categorized on the Accessories category.
To get the products that are 100% complete on both the `en_US` and `fr_FR` locales for the `ecommerce` channel, you can use the following URL.
108
108
109
109
```
110
-
/api/rest/v1/products?search={"completeness":[{"operator":"GREATER OR EQUALS THAN ON ALL LOCALES","value":100,"locales":["en_US","fr_FR"],"scope":"ecommerce"}]}
110
+
/api/rest/v1/products-uuid?search={"completeness":[{"operator":"GREATER OR EQUALS THAN ON ALL LOCALES","value":100,"locales":["en_US","fr_FR"],"scope":"ecommerce"}]}
111
111
```
112
112
113
113
### On their group or family
@@ -129,13 +129,13 @@ Here are the allowed operators you can use to filter on these properties as well
129
129
To get the products that are in the `promotion` group, you can use the following URL.
To get the products that were updated during the last 4 days, you can use the following URL.
174
174
175
175
```
176
-
/api/rest/v1/products?search={"updated":[{"operator":"SINCE LAST N DAYS","value":4}]}
176
+
/api/rest/v1/products-uuid?search={"updated":[{"operator":"SINCE LAST N DAYS","value":4}]}
177
177
```
178
178
179
179
### On their parent
@@ -199,25 +199,25 @@ The `IN`, `EMPTY` and `NOT EMPTY` operators are only available for SaaS customer
199
199
To get all the variant products of the `apollon` root product model without having to filter on all its sub-product models, you can use the following URL.
@@ -432,7 +432,7 @@ To get all the sub-product models, you can use the following URL.
432
432
To filter products, and product models **since the v2.3**, on its [product values](/concepts/products.html#focus-on-the-product-values), you can use the `search` query parameter when requesting products. The value given to this query parameter should be a valid JSON as shown below.
To get products that are purple, purple being an option of the simple select `main_color` attribute and this attribute being neither localizable nor scopable, you can use the following URL.
To get products having a description begining with `Amazing` on the `en_US` locale, the `short_description` attribute being localizable but not scopable, you can use the following URL.
To get products that have a release date due after the 4th of July 2016 for the `ecommerce` channel, the `release_date` attribute being scopable but not localizable, you can use the following URL.
To get products that have a name that contains with `shirt` on the `en_US` locale for the `mobile` channel, the `name` attribute being both localizable and scopable, you can use the following URL.
Of course, you can combine as many filters as you want. The example below will get you the products with description starting with `Amazing` on the `en_US` locale for the `ecommerce` channel, and of purple color.
You can even combine several filters on the same attribute. The example below will get you the products with not empty description on the `en_US` locale and empty description on the `fr_FR` locale for the `ecommerce` channel.
@@ -683,7 +683,7 @@ Imagine that without this filter you get these product values:
683
683
To get only product values regarding the `en_US` locale (+ the product values of the non localizable attributes), you can use the following URL.
684
684
685
685
```
686
-
/api/rest/v1/products?locales=en_US
686
+
/api/rest/v1/products-uuid?locales=en_US
687
687
```
688
688
689
689
As a result you will receive the following answer:
@@ -729,7 +729,7 @@ If you want to get the localized label of this attribute option, you will have t
729
729
You can also filter product values on several locales at the same time.
730
730
731
731
```
732
-
/api/rest/v1/products?locales=en_US,fr_FR
732
+
/api/rest/v1/products-uuid?locales=en_US,fr_FR
733
733
```
734
734
735
735
### Via channel
@@ -746,7 +746,7 @@ There is also a `scope` query parameter that will allow you to:
746
746
To get products from the tree linked to the `ecommerce` channel with only product values regarding the `ecommerce` channel (+ the product values of the non scopable attributes), you can use the following URL.
This is the default method used for pagination on the products. So, in fact, you do not need to specify the `pagination_type` query parameter when requesting on products.
157
157
```bash
158
158
// This request
159
-
curl -X GET /api/rest/v1/products?pagination_type=page
159
+
curl -X GET /api/rest/v1/products-uuid?pagination_type=page
0 commit comments