Fast way to get article details

Hello Shopware Community, I’m trying to update all article stocks. For that I need our article number. The REST-API provides the controller /api/articles where all articles can be fetched. However, when I’m using this controller for all articles I’m not getting the article details(which contain our article number). Is there a way to fetch the articles with the article details in a batch or do I need to fetch the details article by article? P.S.: only using the API. Not changing the Shop itself. Another solution would be a controller where I could put in a custom sql query.

Number is a property of article-detail (variant) and not article. If you are using Shopware 5 I suggest using “/api/variants” to get it. For Shopware 4 I suggest adding custom API. Tutorial how to do it can be found here.