You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Calling Admin APIs from StroreFront

Received Response
edited Aug 23, 2020 12:25PM in Commerce 2 comments


Calling Admin APIs from StroreFront


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) {

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!