Skip to content

Commit 7f532cc

Browse files
authored
Merge pull request #93 from akeneo/scope-query-param
More accuracy concerning the scope query parameter on `/products`
2 parents dfc6770 + 7e25a45 commit 7f532cc

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

content/rest-api/filter.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ You can filter product values on several attributes at the same time.
295295
```
296296

297297
### 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.
299299

300300
#### 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.
302302
```
303303
/api/rest/v1/products?locales=en_US
304304
```
@@ -309,16 +309,22 @@ You can filter product values on several locales at the same time.
309309
```
310310

311311
### 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.
313315

314316
#### 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.
316318
```
317319
/api/rest/v1/products?scope=ecommerce
318320
```
319321

320322
:::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.
322328
:::
323329

324330
## Filter locales

0 commit comments

Comments
 (0)