I am using RESTful APIs of Magento and I want to get the last added product id of in the cart. All of my searches are using the Checkout Session method of Magento which is
But this is not applicable on my end since I am using the RESTful APIs. Can someone help me if there are any available functionality where I can put a one liner method and class to get this with Quote. My other solution is to fetch by Quote :: getAllVisibleItems() and get the last item's product id but I believe it would affect the performance.
Thank you for your help folks.