Calling Admin APIs from StroreFront
Summary
Calling Admin APIs from StroreFrontContent
Hi ,
How can any Admin API s be called from Store front (from a custom widget).
I have a requirement to display all the active Promotions to storefront shoppers. So I called the API to fetch the Promotions from a Custom widget I created. but I am not getting a response as 404 page not Error is occurring . Below I have mentioned the code in which I am trying to call the rest API and also attached the Error Response I am getting.
Code Snippet
promoUrl = "/ccadmin/v1/promotions"; ccRestClient.request(promoUrl, promoData, function(result) { console.log(result.items);
Tagged:
1