CORS Issue

mpisanchikmpisanchik Posts: 7Member

So I'm working on a clients site trying to integrate some rewards feature. The site is a a single shop (so no partner account) and I keep running into CORS issue when making any kind of AJAX calls. Is there a way to resolve these CORS issue on the frontend? Or is this something lightspeed will need to open up on their site? The docs pretty much say a partner account isn't needed for single shops but if this is true than why am I running into so many issue just trying to get the data I need?


  • Adrian SamuelAdrian Samuel Posts: 400Moderator, Lightspeed Staff moderator

    @mpisanchik, if you're making an AJAX call to your own endpoint then cors is something you'll need to enable for your app on your server.

    Making making API request to Lightspeed API resources on the client side is disabled (to my knowledge).

  • mpisanchikmpisanchik Posts: 7Member

    @Adrian Samuel, so right now we are developing directly in the lightspeed admin. We only have a single shop, and from what I saw in the docs we don't need a partner account for single shops. So my question for you is, is it better to get a partner account and will that help us get around the CORS issue? Will it give us more freedom when developing? The clients site is within lightspeed and they want a rewards program added (which we are trying to integrate lightspeed and their 3rd party rewards system).

    So if there is no way to get around the CORS issue, what is the best way to develop features like this? Maybe we are approaching the development of this feature the wrong way.

  • TradingboTradingbo Posts: 15Member

    I totally agree, what is the point of enabling API access client-side if we can't access it even when content is located on Lightspeed's servers. Any more here support?

  • Adrian SamuelAdrian Samuel Posts: 400Moderator, Lightspeed Staff moderator

    @mpisanchik, we offer no such support for developing an app using the back-office APIs within the back-office UI. It isn't recommended or supported and the back-office API access and data is liable to change

    For loyalty programs, you ought to build an app which links to your own interface. Your users would log in there and manage their loyalty program there.

  • Adrian SamuelAdrian Samuel Posts: 400Moderator, Lightspeed Staff moderator

    @Tradingbo, I don't believe the APIs being spoken of here are the same you've mentioned you wanted information about on your other post. I've sent you documentation relevant to that there

  • TradingboTradingbo Posts: 15Member

    Ok thanks

Sign In or Register to comment.