Developer forum

Forum » Ecommerce - Standard features » Change cart line price through WebApi

Change cart line price through WebApi

Martin Moen
Reply

Is it possble to change the cart line price through the webapi?
I tried this, and it did not work. I did change the quantity, but not the price.


Replies

 
Nicolai Pedersen
Reply

Nope. That would be awesome though to change prices on my orders using Postman!

You have to use a discount or a price provider.

 
Martin Moen
Reply

All jokes aside, it actually would be awesome!

Especially when trying to make a headless tool for sales people doing something similar to this:
https://doc.dynamicweb.com/rapido/features/customer-center/order-drafts

 
Nicolai Pedersen
Reply

Yes, but it would take less than 5 minutes before I have a lot of security folks poking around and beat me up while I am crying!

Jokes aside - Dynamicweb 10 is coming up - with a full management API - that might come in handy in that case.

An additional option would be to create and endpoint that requires authentication - so it will take a JWT bearer token and if user is allowed to, the unitprice of an orderline or the line discount can be altered. How would that work?

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

if you remember, I have posted a similar request a while ago. Security is a major concern.

I believe that we all have oversimplified the pricess thinking that the API request can be validated by checking the back-end of the front-end user that is making the request or simply by making sure some endpoints would not accept request from outside the solution. But I agree that things are more complicated than that.

Therefore, in my view, an endpoint requiring authentication would do the trick. Even if we have to use it just for changing prices.

Thank you,
Adrian 

 

You must be logged in to post in the forum