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
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -295,10 +295,10 @@ You can filter product values on several attributes at the same time.
295
295
```
296
296
297
297
### Via locale
298
-
If you want to receive for each product only product values on specific locales, you can specify it thanks to the `locales` query parameter.
298
+
If you want to receive for each product only product values on specific locales, as well as the product values of the non localizable attributes, you can specify it thanks to the `locales` query parameter.
299
299
300
300
#### Example
301
-
To get products with only product values regarding the `en_US` locale, you can use the following URL.
301
+
To get products with only product values regarding the `en_US` locale (+ the product values of the non localizable attributes), you can use the following URL.
302
302
```
303
303
/api/rest/v1/products?locales=en_US
304
304
```
@@ -309,16 +309,22 @@ You can filter product values on several locales at the same time.
309
309
```
310
310
311
311
### Via channel
312
-
If you want to receive for each product only product values about a specific channel, you can specify it thanks to the `scope` query parameter.
312
+
There is also a `scope` query parameter that will allow you to:
313
+
- get only the selection of products that are in the tree linked to the channel you specified,
314
+
- get only the product values for this specific channel, as well as the product values of the non scopable attributes.
313
315
314
316
#### Example
315
-
To get products with only product values regarding the `ecommerce`scope, you can use the following URL.
317
+
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.
316
318
```
317
319
/api/rest/v1/products?scope=ecommerce
318
320
```
319
321
320
322
:::warning
321
-
Note that you cannot filter product values on several channels.
323
+
Note that you cannot use this filter on several channels.
324
+
:::
325
+
326
+
:::info
327
+
When using this query parameter, you will never be able to retrieve products that are not categorized. This is due to the fact that we only return the selection of products that are in the tree linked to the given channel. In other words, if a given product is not categorized in this tree, you won't receive it.
0 commit comments