Jump to content

How to create REST API for my custom module


Recommended Posts

Hi!

I am working on a module, that allows users to configure product, and then buy it. So the user can pick color, amount of things he/she would like to buy, some additional parameters, etc. 

I want to react to changes on website, for example when user selects some parameter, I would like to update some data in a table. However, I don't want to calculate some things (price in this example), on both backend, and frontend - I think that's clear why - it's too sensitive data, to leave it to client code (JS). 

My question is, how to create REST API, so I can send request from store to module, receive some JSON, and then safely update view. MVC seemed appropriate here, so I had a look at those docs, but they weren't helpful.

Any help would be greatly appreciated!
Kink regards,

Bartek

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...