Add To Cart (custom ajax request)

I need a help regarding add to cart functionality

I am building an app for WIX where we need to programatically to call add to cart function and insert manually product ID, quantity, custom product option etc…
Question is is there an option for me to via ajax/jquery add items to the cart from our side, or is there a way which is more wix friendly?
What I am doing is calling URL - “/_api/wixstores-graphql-server/graphql”, via ajax post requestand passing the data I need to pass, also sending tokens for authorization but what happens quite often is that Wix platform updates URL or some other parameters so our APP will break in that case

Would anyone be able to help please?