-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to the REST API #4350
Comments
Mark--can yu examine if this is working as designed and if so this is a feature request vs a bug |
Not sure if this is the case but it feels like this REST api didn't really have web apps in mind (or any apps used by endusers). For instance when requesting "/V1/products?&searchCriteria[page_size]=5" The items have "custom_attributes".. in there we find data like description and images, are they really considered custom_attributes? Now I'm pretty new to Magento as a plattform but for me, the logical place to find this data would be someting like product.description and product.image (you get the idea). Also there are other data that I only get references to.. Let´s say I have a product that comes in 8 different materials.. do I need to make 1 request for each material? Even if it's only 1 extra request to get the attributes it can become a problem. I know that we can customise the REST API but I think it should be the other way around.. the default should be to get the product data I would expect to find on a product page on a site.. (like in the Luma Theme) In a backend language I can accept it but to be forced to make extra requests to get data seems weird. :) |
Thank you @mackelito, I have created internal ticket MAGETWO-53521 to track your request. |
Awesome! BTW.. can I track the ticket somewhere? |
@mackelito we don't have a way for external users to view our internal issues in JIRA, but I will comment here if we have more questions in the future. |
Hi. You can do this in way represented in devdocs: http://devdocs.magento.com/guides/v2.0/get-started/product-categry-filter.html |
I did figure out how to do it with searchCriteria params, sorry to not getting back on this ticket sooner.. So in other words.. it works fine :) |
Sorry for reposting in this closed ticket.. but I realised I still do have some questions. If I make a request to "V1/guest-carts/666ef786077b70c95016727cfaf21830/items" I get a response with the items in that cart.
Does that mean that in order to get product image for each item I need to do another request? Maybe It´s just that I don´t fully understand how to use the rest api.. is there any other (more extensive) docs? |
@sereban or @slavvka perhaps someone of you can explain to me how to get product images when requesting the cart? ("V1/guest-carts/666ef786077b70c95016727cfaf21830/items" or "V1/guest-carts/666ef786077b70c95016727cfaf21830/totals"). (Obviously we do not want to do api requests to each product just to get the urls for the images) |
Please reopen this ticket |
Hi. @mackelito about getting product images: |
[arcticfoxes] Bug fixes
Steps to reproduce
Expected result
When creating a web using the API this forces me to make multiple requests If I want to show products from category x
Actual result
is there some way to get more data for each product like I get if I do "rest/V1//products"?
The text was updated successfully, but these errors were encountered: