Developer forum

Forum » Dynamicweb 10 » DWAPI - Get all products by ShopID

DWAPI - Get all products by ShopID

Joakim
Reply

Hi,

Im running a dw 10.19.9 installation and the site has 4 language layers. Im trying, via the DWAPI, fetch all the products by the given ShopID.
Looking at the documentation the most suitable query would be(if I'm reading it correctly) {{baseUrl}}/dwapi/ecommerce/products/search?RepositoryName=SwiftProducts&QueryName=Products&ShopId=SHOP10 .
 

It just returns the initially created products, without the translations.

Am I using it incorrectly?

Thanks


Replies

 
Brian Fredrick Ahlmann Boyles Dynamicweb Employee
Brian Fredrick Ahlmann Boyles
Reply

This should help? Just write /dwapi/docs in your solution and you'll come to the swagger view where you can also try this out and see all the parameters clearly

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Joakim,

It depends on how your Products query in the SwiftProducts repository is configured. It may default to a specific language or it may limit the result in other ways. The endpoint shouldn't change the result, so ultimately it's the query that needs to be configured correctly.

You may want to consider creating a new query specifically for this.

- Jeppe

 
Joakim
Reply
 
Joakim
Reply

This works as expected when supplying the GroupID but the problem persists when not supplying it. What I want is to recieve all the products under the specific language channel.

edit: Reply Brian Fredrick Ahlmann Boyles

 

You must be logged in to post in the forum